get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/73775/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73775,
    "url": "http://patchwork.dpdk.org/api/patches/73775/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200710171946.23246-2-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200710171946.23246-2-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200710171946.23246-2-hemant.agrawal@nxp.com",
    "date": "2020-07-10T17:19:39",
    "name": "[v2,2/9] net/dpaa: add support for fmlib in dpdk",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b438118abe24c4919ffc29bf9a007203171d0a4b",
    "submitter": {
        "id": 477,
        "url": "http://patchwork.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200710171946.23246-2-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 10958,
            "url": "http://patchwork.dpdk.org/api/series/10958/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10958",
            "date": "2020-07-10T17:19:38",
            "name": "[v2,1/9] net/dpaa: support Rxq and Txq info routines",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/10958/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/73775/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/73775/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5E954A052A;\n\tFri, 10 Jul 2020 19:24:43 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 894B31DE4B;\n\tFri, 10 Jul 2020 19:24:19 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id 8559E1DDB3\n for <dev@dpdk.org>; Fri, 10 Jul 2020 19:24:13 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3ED701A04A5;\n Fri, 10 Jul 2020 19:24:13 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BAB0B1A14A2;\n Fri, 10 Jul 2020 19:24:08 +0200 (CEST)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1C5FC402F0;\n Sat, 11 Jul 2020 01:24:04 +0800 (SGT)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, Sachin Saxena <sachin.saxena@nxp.com>,\n Hemant Agrawal <hemant.agrawal@nxp.com>",
        "Date": "Fri, 10 Jul 2020 22:49:39 +0530",
        "Message-Id": "<20200710171946.23246-2-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200710171946.23246-1-hemant.agrawal@nxp.com>",
        "References": "<20200710171946.23246-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v2 2/9] net/dpaa: add support for fmlib in dpdk",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "DPAA platorm MAC interface is known as FMAN i.e. Frame Manager.\nThere are two ways to control it.\n1. Statically configure the queues and classification rules before the\nstart of the application using FMC tool.\n2. Dynamically configure it within application by making API calls of\nfmlib.\n\nThe fmlib or Frame Manager library provides an API on top of the\nFrame Manager driver ioctl calls, that provides a user space application\nwith a simple way to configure driver parameters and PCD\n(parse - classify - distribute) rules.\n\nThis patch integrates the base fmlib so that various queue config, RSS\nand classification related features can be supported on DPAA platform.\n\nThis base fmlib is shared across multiple project.\n- it is not following block comments style for doxygen and other\ncomments.\n- it usages camel case for naming.\n- it is not following the 80 char limits in code\n\nSigned-off-by: Sachin Saxena <sachin.saxena@nxp.com>\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/net/dpaa/Makefile                 |    4 +-\n drivers/net/dpaa/fmlib/dpaa_integration.h |   50 +\n drivers/net/dpaa/fmlib/fm_ext.h           |  968 ++++\n drivers/net/dpaa/fmlib/fm_lib.c           |  557 +++\n drivers/net/dpaa/fmlib/fm_pcd_ext.h       | 5190 +++++++++++++++++++++\n drivers/net/dpaa/fmlib/fm_port_ext.h      | 3512 ++++++++++++++\n drivers/net/dpaa/fmlib/ncsw_ext.h         |  153 +\n drivers/net/dpaa/fmlib/net_ext.h          |  383 ++\n drivers/net/dpaa/meson.build              |    3 +-\n 9 files changed, 10818 insertions(+), 2 deletions(-)\n create mode 100644 drivers/net/dpaa/fmlib/dpaa_integration.h\n create mode 100644 drivers/net/dpaa/fmlib/fm_ext.h\n create mode 100644 drivers/net/dpaa/fmlib/fm_lib.c\n create mode 100644 drivers/net/dpaa/fmlib/fm_pcd_ext.h\n create mode 100644 drivers/net/dpaa/fmlib/fm_port_ext.h\n create mode 100644 drivers/net/dpaa/fmlib/ncsw_ext.h\n create mode 100644 drivers/net/dpaa/fmlib/net_ext.h",
    "diff": "diff --git a/drivers/net/dpaa/Makefile b/drivers/net/dpaa/Makefile\nindex d7bbc0e15..0d2f32ba1 100644\n--- a/drivers/net/dpaa/Makefile\n+++ b/drivers/net/dpaa/Makefile\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright 2017 NXP\n+# Copyright 2017-2019 NXP\n #\n \n include $(RTE_SDK)/mk/rte.vars.mk\n@@ -15,6 +15,7 @@ CFLAGS += -O3 $(WERROR_FLAGS)\n CFLAGS += -Wno-pointer-arith\n CFLAGS += -I$(RTE_SDK_DPAA)/\n CFLAGS += -I$(RTE_SDK_DPAA)/include\n+CFLAGS += -I$(RTE_SDK_DPAA)/fmlib\n CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa\n CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include/\n CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman\n@@ -26,6 +27,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include\n EXPORT_MAP := rte_pmd_dpaa_version.map\n \n # Interfaces with DPDK\n+SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += fmlib/fm_lib.c\n SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_ethdev.c\n SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_rxtx.c\n \ndiff --git a/drivers/net/dpaa/fmlib/dpaa_integration.h b/drivers/net/dpaa/fmlib/dpaa_integration.h\nnew file mode 100644\nindex 000000000..cc599b432\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/dpaa_integration.h\n@@ -0,0 +1,50 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2009-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#ifndef __DPAA_INTEGRATION_H\n+#define __DPAA_INTEGRATION_H\n+\n+#include \"ncsw_ext.h\"\n+\n+#define DPAA_VERSION\t11\n+\n+#define BM_MAX_NUM_OF_POOLS\t64\t/**< Number of buffers pools */\n+\n+#define INTG_MAX_NUM_OF_FM\t2\n+\n+/* Ports defines */\n+#define FM_MAX_NUM_OF_1G_MACS\t6\n+#define FM_MAX_NUM_OF_10G_MACS\t2\n+#define FM_MAX_NUM_OF_MACS\t(FM_MAX_NUM_OF_1G_MACS + FM_MAX_NUM_OF_10G_MACS)\n+#define FM_MAX_NUM_OF_OH_PORTS\t6\n+\n+#define FM_MAX_NUM_OF_1G_RX_PORTS   FM_MAX_NUM_OF_1G_MACS\n+#define FM_MAX_NUM_OF_10G_RX_PORTS  FM_MAX_NUM_OF_10G_MACS\n+#define FM_MAX_NUM_OF_RX_PORTS\t\\\n+\t(FM_MAX_NUM_OF_10G_RX_PORTS + FM_MAX_NUM_OF_1G_RX_PORTS)\n+\n+#define FM_MAX_NUM_OF_1G_TX_PORTS   FM_MAX_NUM_OF_1G_MACS\n+#define FM_MAX_NUM_OF_10G_TX_PORTS  FM_MAX_NUM_OF_10G_MACS\n+#define FM_MAX_NUM_OF_TX_PORTS\t\\\n+\t(FM_MAX_NUM_OF_10G_TX_PORTS + FM_MAX_NUM_OF_1G_TX_PORTS)\n+\n+#define FM_PORT_MAX_NUM_OF_EXT_POOLS\t\t4\n+\t/**< Number of external BM pools per Rx port */\n+#define FM_PORT_NUM_OF_CONGESTION_GRPS\t\t256\n+\t/**< Total number of congestion groups in QM */\n+#define FM_MAX_NUM_OF_SUB_PORTALS\t\t16\n+#define FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS   0\n+\n+/* PCD defines */\n+#define FM_PCD_PLCR_NUM_ENTRIES\t\t256\n+\t\t/**< Total number of policer profiles */\n+#define FM_PCD_KG_NUM_OF_SCHEMES\t32\n+\t\t/**< Total number of KG schemes */\n+#define FM_PCD_MAX_NUM_OF_CLS_PLANS\t256\n+\t\t/**< Number of classification plan entries. */\n+\n+#define FM_MAX_NUM_OF_PFC_PRIORITIES\t\t8\n+\n+#endif /* __DPAA_INTEGRATION_H */\ndiff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h\nnew file mode 100644\nindex 000000000..aff0c06e5\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_ext.h\n@@ -0,0 +1,968 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#ifndef __FM_EXT_H\n+#define __FM_EXT_H\n+\n+#include \"ncsw_ext.h\"\n+#include \"dpaa_integration.h\"\n+\n+#define FM_IOC_TYPE_BASE\t(NCSW_IOC_TYPE_BASE + 1)\n+#define FMT_IOC_TYPE_BASE\t(NCSW_IOC_TYPE_BASE + 3)\n+\n+#define MODULE_FM\t\t0x00010000\n+#define __ERR_MODULE__\tMODULE_FM\n+\n+/* #define FM_LIB_DBG */\n+\n+#if defined(FM_LIB_DBG)\n+\t#define _fml_dbg(format, arg...) \\\n+\tprintf(\"fmlib [%s:%u] - \" format, \\\n+\t\t__func__, __LINE__, ##arg)\n+#else\n+\t#define _fml_dbg(arg...)\n+#endif\n+\n+/*#define FM_IOCTL_DBG*/\n+\n+#if defined(FM_IOCTL_DBG)\n+\t#define _fm_ioctl_dbg(format, arg...) \\\n+\tprintf(\"fm ioctl [%s:%u] - \" format, \\\n+\t\t__func__, __LINE__, ##arg)\n+#else\n+\t#define _fm_ioctl_dbg(arg...)\n+#endif\n+\n+/**\n+ @Group\tlnx_ioctl_ncsw_grp\tNetCommSw Linux User-Space (IOCTL) API\n+ @{\n+*/\n+\n+#define NCSW_IOC_TYPE_BASE\t0xe0\n+\t/**< defines the IOCTL type for all the NCSW Linux module commands */\n+\n+/**\n+ @Group\tlnx_usr_FM_grp Frame Manager API\n+\n+ @Description   FM API functions, definitions and enums.\n+\n+ @{\n+*/\n+\n+/**\n+ @Group\tlnx_usr_FM_lib_grp FM library\n+\n+ @Description   FM API functions, definitions and enums\n+\n+\t\tThe FM module is the main driver module and is a mandatory module\n+\t\tfor FM driver users. This module must be initialized first prior\n+\t\tto any other drivers modules.\n+\t\tThe FM is a \"singleton\" module. It is responsible of the common\n+\t\tHW modules: FPM, DMA, common QMI and common BMI initializations and\n+\t\trun-time control routines. This module must be initialized always\n+\t\twhen working with any of the FM modules.\n+\t\tNOTE - We assume that the FM library will be initialized only by core No. 0!\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   Enum for defining port types\n+*/\n+typedef enum e_FmPortType {\n+\te_FM_PORT_TYPE_OH_OFFLINE_PARSING = 0,  /**< Offline parsing port */\n+\te_FM_PORT_TYPE_RX,\t\t\t/**< 1G Rx port */\n+\te_FM_PORT_TYPE_RX_10G,\t\t\t/**< 10G Rx port */\n+\te_FM_PORT_TYPE_TX,\t\t\t/**< 1G Tx port */\n+\te_FM_PORT_TYPE_TX_10G,\t\t\t/**< 10G Tx port */\n+\te_FM_PORT_TYPE_RX_2_5G,\t\t\t/**< 2.5G Rx port */\n+\te_FM_PORT_TYPE_TX_2_5G,\t\t\t/**< 2.5G Tx port */\n+\te_FM_PORT_TYPE_DUMMY\n+} e_FmPortType;\n+\n+/**\n+ @Description   Parse results memory layout\n+*/\n+typedef struct t_FmPrsResult {\n+\tvolatile uint8_t\tlpid;\t\t/**< Logical port id */\n+\tvolatile uint8_t\tshimr;\t\t/**< Shim header result  */\n+\tvolatile uint16_t\tl2r;\t\t/**< Layer 2 result */\n+\tvolatile uint16_t\tl3r;\t\t/**< Layer 3 result */\n+\tvolatile uint8_t\tl4r;\t\t/**< Layer 4 result */\n+\tvolatile uint8_t\tcplan;\t\t/**< Classification plan id */\n+\tvolatile uint16_t\tnxthdr;\t\t/**< Next Header  */\n+\tvolatile uint16_t\tcksum;\t\t/**< Running-sum */\n+\tvolatile uint16_t\tflags_frag_off;\n+\t\t\t/**< Flags & fragment-offset field of the last IP-header */\n+\tvolatile uint8_t\troute_type;\n+\t\t\t/**< Routing type field of a IPv6 routing extension header */\n+\tvolatile uint8_t\trhp_ip_valid;\n+\t\t\t/**< Routing Extension Header Present; last bit is IP valid */\n+\tvolatile uint8_t\tshim_off[2];\t/**< Shim offset */\n+\tvolatile uint8_t\tip_pid_off;\t/**< IP PID (last IP-proto) offset */\n+\tvolatile uint8_t\teth_off;\t/**< ETH offset */\n+\tvolatile uint8_t\tllc_snap_off;\t/**< LLC_SNAP offset */\n+\tvolatile uint8_t\tvlan_off[2];\t/**< VLAN offset */\n+\tvolatile uint8_t\tetype_off;\t/**< ETYPE offset */\n+\tvolatile uint8_t\tpppoe_off;\t/**< PPP offset */\n+\tvolatile uint8_t\tmpls_off[2];\t/**< MPLS offset */\n+\tvolatile uint8_t\tip_off[2];\t/**< IP offset */\n+\tvolatile uint8_t\tgre_off;\t/**< GRE offset */\n+\tvolatile uint8_t\tl4_off;\t\t/**< Layer 4 offset */\n+\tvolatile uint8_t\tnxthdr_off;\t/**< Parser end point */\n+} __rte_packed t_FmPrsResult;\n+\n+/**\n+ @Collection   FM Parser results\n+*/\n+#define FM_PR_L2_VLAN_STACK\t0x00000100  /**< Parse Result: VLAN stack */\n+#define FM_PR_L2_ETHERNET\t0x00008000  /**< Parse Result: Ethernet*/\n+#define FM_PR_L2_VLAN\t\t0x00004000  /**< Parse Result: VLAN */\n+#define FM_PR_L2_LLC_SNAP\t0x00002000  /**< Parse Result: LLC_SNAP */\n+#define FM_PR_L2_MPLS\t\t0x00001000  /**< Parse Result: MPLS */\n+#define FM_PR_L2_PPPoE\t\t0x00000800  /**< Parse Result: PPPoE */\n+/* @} */\n+\n+/**\n+ @Collection   FM Frame descriptor macros\n+*/\n+#define FM_FD_CMD_FCO\t\t0x80000000  /**< Frame queue Context Override */\n+#define FM_FD_CMD_RPD\t\t0x40000000  /**< Read Prepended Data */\n+#define FM_FD_CMD_UPD\t\t0x20000000  /**< Update Prepended Data */\n+#define FM_FD_CMD_DTC\t\t0x10000000  /**< Do L4 Checksum */\n+#define FM_FD_CMD_DCL4C\t\t0x10000000  /**< Didn't calculate L4 Checksum */\n+#define FM_FD_CMD_CFQ\t\t0x00ffffff  /**< Confirmation Frame Queue */\n+\n+#define FM_FD_ERR_UNSUPPORTED_FORMAT\t0x04000000\n+\t\t\t\t\t/**< Not for Rx-Port! Unsupported Format */\n+#define FM_FD_ERR_LENGTH\t0x02000000  /**< Not for Rx-Port! Length Error */\n+#define FM_FD_ERR_DMA\t\t0x01000000  /**< DMA Data error */\n+\n+#define FM_FD_IPR\t\t0x00000001  /**< IPR frame (not error) */\n+\n+#define FM_FD_ERR_IPR_NCSP\t(0x00100000 | FM_FD_IPR)\n+\t\t\t\t\t\t/**< IPR non-consistent-sp */\n+#define FM_FD_ERR_IPR\t\t(0x00200000 | FM_FD_IPR) /**< IPR error */\n+#define FM_FD_ERR_IPR_TO\t(0x00300000 | FM_FD_IPR) /**< IPR timeout */\n+\n+#ifdef FM_CAPWAP_SUPPORT\n+#define FM_FD_ERR_CRE\t\t0x00200000\n+#define FM_FD_ERR_CHE\t\t0x00100000\n+#endif /* FM_CAPWAP_SUPPORT */\n+\n+#define FM_FD_ERR_PHYSICAL\t0x00080000\n+\t\t\t/**< Rx FIFO overflow, FCS error, code error, running disparity\n+\t\t\terror (SGMII and TBI modes), FIFO parity error. PHY\n+\t\t\tSequence error, PHY error control character detected. */\n+#define FM_FD_ERR_SIZE\t\t0x00040000\n+\t\t/**< Frame too long OR Frame size exceeds max_length_frame  */\n+#define FM_FD_ERR_CLS_DISCARD\t0x00020000  /**< classification discard */\n+#define FM_FD_ERR_EXTRACTION\t0x00008000  /**< Extract Out of Frame */\n+#define FM_FD_ERR_NO_SCHEME\t0x00004000  /**< No Scheme Selected */\n+#define FM_FD_ERR_KEYSIZE_OVERFLOW\t0x00002000  /**< Keysize Overflow */\n+#define FM_FD_ERR_COLOR_RED\t0x00000800  /**< Frame color is red */\n+#define FM_FD_ERR_COLOR_YELLOW\t0x00000400  /**< Frame color is yellow */\n+#define FM_FD_ERR_ILL_PLCR\t0x00000200  /**< Illegal Policer Profile selected */\n+#define FM_FD_ERR_PLCR_FRAME_LEN 0x00000100  /**< Policer frame length error */\n+#define FM_FD_ERR_PRS_TIMEOUT\t0x00000080  /**< Parser Time out Exceed */\n+#define FM_FD_ERR_PRS_ILL_INSTRUCT 0x00000040  /**< Invalid Soft Parser instruction */\n+#define FM_FD_ERR_PRS_HDR_ERR\t0x00000020\n+\t\t/**< Header error was identified during parsing */\n+#define FM_FD_ERR_BLOCK_LIMIT_EXCEEDED  0x00000008\n+\t\t\t/**< Frame parsed beyind 256 first bytes */\n+\n+#define FM_FD_TX_STATUS_ERR_MASK\t(FM_FD_ERR_UNSUPPORTED_FORMAT   | \\\n+\t\t\t\t\tFM_FD_ERR_LENGTH\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_DMA) /**< TX Error FD bits */\n+\n+#define FM_FD_RX_STATUS_ERR_MASK\t(FM_FD_ERR_UNSUPPORTED_FORMAT   | \\\n+\t\t\t\t\tFM_FD_ERR_LENGTH\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_DMA\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_IPR\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_IPR_TO\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_IPR_NCSP\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_PHYSICAL\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_SIZE\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_CLS_DISCARD\t| \\\n+\t\t\t\t\tFM_FD_ERR_COLOR_RED\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_COLOR_YELLOW\t| \\\n+\t\t\t\t\tFM_FD_ERR_ILL_PLCR\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_PLCR_FRAME_LEN\t| \\\n+\t\t\t\t\tFM_FD_ERR_EXTRACTION\t| \\\n+\t\t\t\t\tFM_FD_ERR_NO_SCHEME\t\t| \\\n+\t\t\t\t\tFM_FD_ERR_KEYSIZE_OVERFLOW\t| \\\n+\t\t\t\t\tFM_FD_ERR_PRS_TIMEOUT\t| \\\n+\t\t\t\t\tFM_FD_ERR_PRS_ILL_INSTRUCT\t| \\\n+\t\t\t\t\tFM_FD_ERR_PRS_HDR_ERR\t| \\\n+\t\t\t\t\tFM_FD_ERR_BLOCK_LIMIT_EXCEEDED)\n+\t\t\t\t\t/**< RX Error FD bits */\n+\n+#define FM_FD_RX_STATUS_ERR_NON_FM\t0x00400000 /**< non Frame-Manager error */\n+/* @} */\n+\n+/**\n+ @Description   FM Exceptions\n+*/\n+typedef enum e_FmExceptions {\n+\te_FM_EX_DMA_BUS_ERROR = 0,\t/**< DMA bus error. */\n+\te_FM_EX_DMA_READ_ECC,\n+\t\t/**< Read Buffer ECC error (Valid for FM rev < 6)*/\n+\te_FM_EX_DMA_SYSTEM_WRITE_ECC,\n+\t\t/**< Write Buffer ECC error on system side (Valid for FM rev < 6)*/\n+\te_FM_EX_DMA_FM_WRITE_ECC,\n+\t\t/**< Write Buffer ECC error on FM side (Valid for FM rev < 6)*/\n+\te_FM_EX_DMA_SINGLE_PORT_ECC,\n+\t\t/**< Single Port ECC error on FM side (Valid for FM rev > 6)*/\n+\te_FM_EX_FPM_STALL_ON_TASKS,\t/**< Stall of tasks on FPM */\n+\te_FM_EX_FPM_SINGLE_ECC,\t\t/**< Single ECC on FPM. */\n+\te_FM_EX_FPM_DOUBLE_ECC,\t\t/**< Double ECC error on FPM ram access */\n+\te_FM_EX_QMI_SINGLE_ECC,\t\t/**< Single ECC on QMI. */\n+\te_FM_EX_QMI_DOUBLE_ECC,\t\t/**< Double bit ECC occurred on QMI */\n+\te_FM_EX_QMI_DEQ_FROM_UNKNOWN_PORTID,/**< Dequeue from unknown port id */\n+\te_FM_EX_BMI_LIST_RAM_ECC,\t/**< Linked List RAM ECC error */\n+\te_FM_EX_BMI_STORAGE_PROFILE_ECC,/**< Storage Profile ECC Error */\n+\te_FM_EX_BMI_STATISTICS_RAM_ECC,\t/**< Statistics Count RAM ECC Error Enable */\n+\te_FM_EX_BMI_DISPATCH_RAM_ECC,\t/**< Dispatch RAM ECC Error Enable */\n+\te_FM_EX_IRAM_ECC,\t\t/**< Double bit ECC occurred on IRAM*/\n+\te_FM_EX_MURAM_ECC\t\t/**< Double bit ECC occurred on MURAM*/\n+} e_FmExceptions;\n+\n+/**\n+ @Description   Enum for defining port DMA swap mode\n+*/\n+typedef enum e_FmDmaSwapOption {\n+\te_FM_DMA_NO_SWP,\t/**< No swap, transfer data as is.*/\n+\te_FM_DMA_SWP_PPC_LE,\t/**< The transferred data should be swapped\n+\t\t\t\t\tin PowerPc Little Endian mode. */\n+\te_FM_DMA_SWP_BE\t\t/**< The transferred data should be swapped\n+\t\t\t\t\tin Big Endian mode */\n+} e_FmDmaSwapOption;\n+\n+/**\n+ @Description   Enum for defining port DMA cache attributes\n+*/\n+typedef enum e_FmDmaCacheOption {\n+\te_FM_DMA_NO_STASH = 0,\t/**< Cacheable, no Allocate (No Stashing) */\n+\te_FM_DMA_STASH = 1\t/**< Cacheable and Allocate (Stashing on) */\n+} e_FmDmaCacheOption;\n+/**\n+ @Group\tlnx_usr_FM_init_grp FM Initialization Unit\n+\n+ @Description   FM Initialization Unit\n+\n+\t\tInitialization Flow\n+\t\tInitialization of the FM Module will be carried out by the application\n+\t\taccording to the following sequence:\n+\t\t-  Calling the configuration routine with basic parameters.\n+\t\t-  Calling the advance initialization routines to change driver's defaults.\n+\t\t-  Calling the initialization routine.\n+\n+ @{\n+*/\n+\n+t_Handle FM_Open(uint8_t id);\n+void\tFM_Close(t_Handle h_Fm);\n+\n+/**\n+ @Description   A structure for defining buffer prefix area content.\n+*/\n+typedef struct t_FmBufferPrefixContent {\n+\tuint16_t\tprivDataSize;\t/**< Number of bytes to be left at the beginning\n+\t\t\t\tof the external buffer; Note that the private-area will\n+\t\t\t\tstart from the base of the buffer address. */\n+\tbool\tpassPrsResult;\t/**< TRUE to pass the parse result to/from the FM;\n+\t\t\t\tUser may use FM_PORT_GetBufferPrsResult() in order to\n+\t\t\t\tget the parser-result from a buffer. */\n+\tbool\tpassTimeStamp;\t/**< TRUE to pass the timeStamp to/from the FM\n+\t\t\t\tUser may use FM_PORT_GetBufferTimeStamp() in order to\n+\t\t\t\tget the parser-result from a buffer. */\n+\tbool\tpassHashResult;\t/**< TRUE to pass the KG hash result to/from the FM\n+\t\t\t\tUser may use FM_PORT_GetBufferHashResult() in order to\n+\t\t\t\tget the parser-result from a buffer. */\n+\tbool\tpassAllOtherPCDInfo;/**< Add all other Internal-Context information:\n+\t\t\t\t\tAD, hash-result, key, etc. */\n+\tuint16_t\tdataAlign;\n+\t\t/**< 0 to use driver's default alignment [64],\n+\t\tother value for selecting a data alignment (must be a power of 2);\n+\t\tif write optimization is used, must be >= 16. */\n+\tuint8_t\tmanipExtraSpace;\n+\t\t/**< Maximum extra size needed (insertion-size minus removal-size);\n+\t\tNote that this field impacts the size of the buffer-prefix\n+\t\t(i.e. it pushes the data offset);\n+\t\tThis field is irrelevant if DPAA_VERSION==10 */\n+} t_FmBufferPrefixContent;\n+\n+/**\n+ @Description   A structure of information about each of the external\n+\t\tbuffer pools used by a port or storage-profile.\n+*/\n+typedef struct t_FmExtPoolParams {\n+\tuint8_t\t\tid;\t/**< External buffer pool id */\n+\tuint16_t\t\tsize;   /**< External buffer pool buffer size */\n+} t_FmExtPoolParams;\n+\n+/**\n+ @Description   A structure for informing the driver about the external\n+\t\tbuffer pools allocated in the BM and used by a port or a\n+\t\tstorage-profile.\n+*/\n+typedef struct t_FmExtPools {\n+\tuint8_t\t\tnumOfPoolsUsed;\t/**< Number of pools use by this port */\n+\tt_FmExtPoolParams\textBufPool[FM_PORT_MAX_NUM_OF_EXT_POOLS];\n+\t\t\t\t\t\t/**< Parameters for each port */\n+} t_FmExtPools;\n+\n+/**\n+ @Description   A structure for defining backup BM Pools.\n+*/\n+typedef struct t_FmBackupBmPools {\n+\tuint8_t\tnumOfBackupPools;\t/**< Number of BM backup pools -\n+\t\t\t\t\tmust be smaller than the total number of\n+\t\t\t\t\tpools defined for the specified port.*/\n+\tuint8_t\tpoolIds[FM_PORT_MAX_NUM_OF_EXT_POOLS];\n+\t\t\t\t/**< numOfBackupPools pool id's, specifying which\n+\t\t\t\tpools should be used only as backup. Pool\n+\t\t\t\tid's specified here must be a subset of the\n+\t\t\t\tpools used by the specified port.*/\n+} t_FmBackupBmPools;\n+\n+/**\n+ @Description   A structure for defining BM pool depletion criteria\n+*/\n+typedef struct t_FmBufPoolDepletion {\n+\tbool\tpoolsGrpModeEnable;\n+\t\t/**< select mode in which pause frames will be sent after\n+\t\t\ta number of pools (all together!) are depleted */\n+\tuint8_t\tnumOfPools;\n+\t\t/**< the number of depleted pools that will invoke\n+\t\t\tpause frames transmission. */\n+\tbool\tpoolsToConsider[BM_MAX_NUM_OF_POOLS];\n+\t\t/**< For each pool, TRUE if it should be considered for\n+\t\t\tdepletion (Note - this pool must be used by this port!). */\n+\tbool\tsinglePoolModeEnable;\n+\t\t/**< select mode in which pause frames will be sent after\n+\t\t\ta single-pool is depleted; */\n+\tbool\tpoolsToConsiderForSingleMode[BM_MAX_NUM_OF_POOLS];\n+\t\t/**< For each pool, TRUE if it should be considered for\n+\t\t\tdepletion (Note - this pool must be used by this port!) */\n+#if (DPAA_VERSION >= 11)\n+\tbool\tpfcPrioritiesEn[FM_MAX_NUM_OF_PFC_PRIORITIES];\n+\t\t/**< This field is used by the MAC as the Priority Enable Vector\n+\t\t\tin the PFC frame which is transmitted */\n+#endif /* (DPAA_VERSION >= 11) */\n+} t_FmBufPoolDepletion;\n+\n+/** @} */ /* end of lnx_usr_FM_init_grp group */\n+\n+/**\n+ @Group\tlnx_usr_FM_runtime_control_grp FM Runtime Control Unit\n+\n+ @Description   FM Runtime control unit API functions, definitions and enums.\n+\t\tThe FM driver provides a set of control routines.\n+\t\tThese routines may only be called after the module was fully\n+\t\tinitialized (both configuration and initialization routines were\n+\t\tcalled). They are typically used to get information from hardware\n+\t\t(status, counters/statistics, revision etc.), to modify a current\n+\t\tstate or to force/enable a required action. Run-time control may\n+\t\tbe called whenever necessary and as many times as needed.\n+ @{\n+*/\n+\n+/**\n+ @Collection   General FM defines.\n+*/\n+#define FM_MAX_NUM_OF_VALID_PORTS   (FM_MAX_NUM_OF_OH_PORTS +\t\\\n+\t\t\t\tFM_MAX_NUM_OF_1G_RX_PORTS +\t\\\n+\t\t\t\tFM_MAX_NUM_OF_10G_RX_PORTS +   \\\n+\t\t\t\tFM_MAX_NUM_OF_1G_TX_PORTS +\t\\\n+\t\t\t\tFM_MAX_NUM_OF_10G_TX_PORTS)\n+\t\t\t\t/**< Number of available FM ports */\n+/* @} */\n+\n+/**\n+ @Description   A structure for Port bandwidth requirement. Port is identified\n+\t\tby type and relative id.\n+*/\n+typedef struct t_FmPortBandwidth {\n+\te_FmPortType\ttype;\t/**< FM port type */\n+\tuint8_t\t\trelativePortId; /**< Type relative port id */\n+\tuint8_t\t\tbandwidth;\t/**< bandwidth - (in term of percents) */\n+} t_FmPortBandwidth;\n+\n+/**\n+ @Description   A Structure containing an array of Port bandwidth requirements.\n+\t\tThe user should state the ports requiring bandwidth in terms of\n+\t\tpercentage - i.e. all port's bandwidths in the array must add\n+\t\tup to 100.\n+*/\n+typedef struct t_FmPortsBandwidthParams {\n+\tuint8_t\t\tnumOfPorts;\n+\t\t/**< The number of relevant ports, which is the\n+\t\t\tnumber of valid entries in the array below */\n+\tt_FmPortBandwidth   portsBandwidths[FM_MAX_NUM_OF_VALID_PORTS];\n+\t\t/**< for each port, it's bandwidth (all port's bw must add up to 100.*/\n+} t_FmPortsBandwidthParams;\n+\n+/**\n+ @Description   Enum for defining FM counters\n+*/\n+typedef enum e_FmCounters {\n+\te_FM_COUNTERS_ENQ_TOTAL_FRAME = 0,/**< QMI total enqueued frames counter */\n+\te_FM_COUNTERS_DEQ_TOTAL_FRAME,\t/**< QMI total dequeued frames counter */\n+\te_FM_COUNTERS_DEQ_0,\t\t/**< QMI 0 frames from QMan counter */\n+\te_FM_COUNTERS_DEQ_1,\t\t/**< QMI 1 frames from QMan counter */\n+\te_FM_COUNTERS_DEQ_2,\t\t/**< QMI 2 frames from QMan counter */\n+\te_FM_COUNTERS_DEQ_3,\t\t/**< QMI 3 frames from QMan counter */\n+\te_FM_COUNTERS_DEQ_FROM_DEFAULT,\t/**< QMI dq from default queue counter */\n+\te_FM_COUNTERS_DEQ_FROM_CONTEXT,\t/**< QMI dq from FQ context counter */\n+\te_FM_COUNTERS_DEQ_FROM_FD,\t/**< QMI dq from FD command field counter */\n+\te_FM_COUNTERS_DEQ_CONFIRM\t/**< QMI dq confirm counter */\n+} e_FmCounters;\n+\n+/**\n+ @Description   A structure for returning FM revision information\n+*/\n+typedef struct t_FmRevisionInfo {\n+\tuint8_t\tmajorRev;\t\t/**< Major revision */\n+\tuint8_t\tminorRev;\t\t/**< Minor revision */\n+} t_FmRevisionInfo;\n+\n+/**\n+ @Description   A structure for returning FM ctrl code revision information\n+*/\n+typedef struct t_FmCtrlCodeRevisionInfo {\n+\tuint16_t\tpackageRev;\t\t/**< Package revision */\n+\tuint8_t\tmajorRev;\t\t/**< Major revision */\n+\tuint8_t\tminorRev;\t\t/**< Minor revision */\n+} t_FmCtrlCodeRevisionInfo;\n+\n+/**\n+ @Description   A Structure for obtaining FM controller monitor values\n+*/\n+typedef struct t_FmCtrlMon {\n+\tuint8_t percentCnt[2];\t/**< Percentage value */\n+} t_FmCtrlMon;\n+\n+/**\n+ @Function\tFM_SetPortsBandwidth\n+\n+ @Description   Sets relative weights between ports when accessing common resources.\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+ @Param[in]\tp_PortsBandwidth\tA structure of ports bandwidths in percentage, i.e.\n+\t\t\t\t\ttotal must equal 100.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+uint32_t FM_SetPortsBandwidth(t_Handle h_Fm,\n+\tt_FmPortsBandwidthParams *p_PortsBandwidth);\n+\n+/**\n+ @Function\tFM_GetRevision\n+\n+ @Description   Returns the FM revision\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+ @Param[out]\tp_FmRevisionInfo\tA structure of revision information parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+uint32_t  FM_GetRevision(t_Handle h_Fm,\n+\tt_FmRevisionInfo *p_FmRevisionInfo);\n+\n+/**\n+ @Function\tFM_GetFmanCtrlCodeRevision\n+\n+ @Description   Returns the Fman controller code revision\n+\t\t(Not implemented in fm-lib just yet!)\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+ @Param[out]\tp_RevisionInfo\tA structure of revision information parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+uint32_t FM_GetFmanCtrlCodeRevision(t_Handle h_Fm,\n+\tt_FmCtrlCodeRevisionInfo *p_RevisionInfo);\n+\n+/**\n+ @Function\tFM_GetCounter\n+\n+ @Description   Reads one of the FM counters.\n+\n+ @Param[in]\th_Fm\tA handle to an FM Module.\n+ @Param[in]\tcounter\tThe requested counter.\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+\t\tNote that it is user's responsibility to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+uint32_t  FM_GetCounter(t_Handle h_Fm, e_FmCounters counter);\n+\n+/**\n+ @Function\tFM_ModifyCounter\n+\n+ @Description   Sets a value to an enabled counter. Use \"0\" to reset the counter.\n+\n+ @Param[in]\th_Fm\tA handle to an FM Module.\n+ @Param[in]\tcounter\tThe requested counter.\n+ @Param[in]\tval\tThe requested value to be written into the counter.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+uint32_t  FM_ModifyCounter(t_Handle h_Fm,\n+\te_FmCounters counter, uint32_t val);\n+\n+/**\n+ @Function\tFM_CtrlMonStart\n+\n+ @Description   Start monitoring utilization of all available FM controllers.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID).\n+*/\n+uint32_t FM_CtrlMonStart(t_Handle h_Fm);\n+\n+/**\n+ @Function\tFM_CtrlMonStop\n+\n+ @Description   Stop monitoring utilization of all available FM controllers.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID).\n+*/\n+uint32_t FM_CtrlMonStop(t_Handle h_Fm);\n+\n+/**\n+ @Function\tFM_CtrlMonGetCounters\n+\n+ @Description   Obtain FM controller utilization parameters.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+ @Param[in]\tfmCtrlIndex\tFM Controller index for that utilization results\n+\t\t\t\tare requested.\n+ @Param[in]\tp_Mon\tPointer to utilization results structure.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID).\n+*/\n+uint32_t FM_CtrlMonGetCounters(t_Handle h_Fm,\n+\tuint8_t fmCtrlIndex, t_FmCtrlMon *p_Mon);\n+\n+/*\n+ @Function\tFM_ForceIntr\n+\n+ @Description   Causes an interrupt event on the requested source.\n+\n+ @Param[in]\th_Fm\t\tA handle to an FM Module.\n+ @Param[in]\texception\tAn exception to be forced.\n+\n+ @Return\tE_OK on success; Error code if the exception is not enabled,\n+\t\tor is not able to create interrupt.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+uint32_t FM_ForceIntr(t_Handle h_Fm, e_FmExceptions exception);\n+\n+/** @} */ /* end of lnx_usr_FM_runtime_control_grp group */\n+/** @} */ /* end of lnx_usr_FM_lib_grp group */\n+/** @} */ /* end of lnx_usr_FM_grp group */\n+\n+/**\n+@Description   FM Char device ioctls\n+*/\n+\n+/**\n+ @Group\tlnx_ioctl_FM_grp Frame Manager Linux IOCTL API\n+\n+ @Description   FM Linux ioctls definitions and enums\n+\n+ @{\n+*/\n+\n+/**\n+ @Collection\tFM IOCTL device ('/dev') definitions\n+*/\n+#define DEV_FM_NAME\t\t\"fm\" /**< Name of the FM chardev */\n+\n+#define DEV_FM_MINOR_BASE\t0\n+#define DEV_FM_PCD_MINOR_BASE\t(DEV_FM_MINOR_BASE + 1)\n+\t\t\t\t/*/dev/fmx-pcd */\n+#define DEV_FM_OH_PORTS_MINOR_BASE  (DEV_FM_PCD_MINOR_BASE + 1)\n+\t\t\t\t/*/dev/fmx-port-ohy */\n+#define DEV_FM_RX_PORTS_MINOR_BASE  (DEV_FM_OH_PORTS_MINOR_BASE + FM_MAX_NUM_OF_OH_PORTS)   /*/dev/fmx-port-rxy */\n+#define DEV_FM_TX_PORTS_MINOR_BASE  (DEV_FM_RX_PORTS_MINOR_BASE + FM_MAX_NUM_OF_RX_PORTS)   /*/dev/fmx-port-txy */\n+#define DEV_FM_MAX_MINORS\t(DEV_FM_TX_PORTS_MINOR_BASE + FM_MAX_NUM_OF_TX_PORTS)\n+\n+#define FM_IOC_NUM(n)\t(n)\n+#define FM_PCD_IOC_NUM(n)   (n + 20)\n+#define FM_PORT_IOC_NUM(n)  (n + 70)\n+/* @} */\n+\n+#define IOC_FM_MAX_NUM_OF_PORTS\t64\n+\n+/**\n+ @Description   Enum for defining port types\n+\t\t(must match enum e_FmPortType defined in fm_ext.h)\n+*/\n+typedef enum ioc_fm_port_type {\n+\te_IOC_FM_PORT_TYPE_OH_OFFLINE_PARSING = 0,  /**< Offline parsing port */\n+\te_IOC_FM_PORT_TYPE_RX,\t\t\t/**< 1G Rx port */\n+\te_IOC_FM_PORT_TYPE_RX_10G,\t\t/**< 10G Rx port */\n+\te_IOC_FM_PORT_TYPE_TX,\t\t\t/**< 1G Tx port */\n+\te_IOC_FM_PORT_TYPE_TX_10G,\t\t/**< 10G Tx port */\n+\te_IOC_FM_PORT_TYPE_DUMMY\n+} ioc_fm_port_type;\n+\n+/**\n+ @Group\tlnx_ioctl_FM_lib_grp FM library\n+\n+ @Description   FM API functions, definitions and enums\n+\t\tThe FM module is the main driver module and is a mandatory module\n+\t\tfor FM driver users. Before any further module initialization,\n+\t\tthis module must be initialized.\n+\t\tThe FM is a \"single-tone\" module. It is responsible of the common\n+\t\tHW modules: FPM, DMA, common QMI, common BMI initializations and\n+\t\trun-time control routines. This module must be initialized always\n+\t\twhen working with any of the FM modules.\n+\t\tNOTE - We assumes that the FML will be initialize only by core No. 0!\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   FM Exceptions\n+*/\n+typedef enum ioc_fm_exceptions {\n+\te_IOC_FM_EX_DMA_BUS_ERROR,\t/**< DMA bus error. */\n+\te_IOC_EX_DMA_READ_ECC,\n+\t\t\t\t/**< Read Buffer ECC error (Valid for FM rev < 6)*/\n+\te_IOC_EX_DMA_SYSTEM_WRITE_ECC,\n+\t\t/**< Write Buffer ECC error on system side (Valid for FM rev < 6)*/\n+\te_IOC_EX_DMA_FM_WRITE_ECC,\n+\t\t/**< Write Buffer ECC error on FM side (Valid for FM rev < 6)*/\n+\te_IOC_EX_DMA_SINGLE_PORT_ECC,\n+\t\t/**< Single Port ECC error on FM side (Valid for FM rev > 6)*/\n+\te_IOC_EX_FPM_STALL_ON_TASKS,\t/**< Stall of tasks on FPM */\n+\te_IOC_EX_FPM_SINGLE_ECC,\t/**< Single ECC on FPM. */\n+\te_IOC_EX_FPM_DOUBLE_ECC,\t/**< Double ECC error on FPM ram access */\n+\te_IOC_EX_QMI_SINGLE_ECC,\t/**< Single ECC on QMI. */\n+\te_IOC_EX_QMI_DOUBLE_ECC,\t/**< Double bit ECC occurred on QMI */\n+\te_IOC_EX_QMI_DEQ_FROM_UNKNOWN_PORTID,/**< Dequeue from unknown port id */\n+\te_IOC_EX_BMI_LIST_RAM_ECC,\t/**< Linked List RAM ECC error */\n+\te_IOC_EX_BMI_STORAGE_PROFILE_ECC,/**< Storage Profile ECC Error */\n+\te_IOC_EX_BMI_STATISTICS_RAM_ECC,/**< Statistics Count RAM ECC Error Enable */\n+\te_IOC_EX_BMI_DISPATCH_RAM_ECC,\t/**< Dispatch RAM ECC Error Enable */\n+\te_IOC_EX_IRAM_ECC,\t\t/**< Double bit ECC occurred on IRAM*/\n+\te_IOC_EX_MURAM_ECC\t\t/**< Double bit ECC occurred on MURAM*/\n+} ioc_fm_exceptions;\n+\n+/**\n+ @Group\tlnx_ioctl_FM_runtime_control_grp FM Runtime Control Unit\n+\n+ @Description   FM Runtime control unit API functions, definitions and enums.\n+\t\tThe FM driver provides a set of control routines for each module.\n+\t\tThese routines may only be called after the module was fully\n+\t\tinitialized (both configuration and initialization routines were\n+\t\tcalled). They are typically used to get information from hardware\n+\t\t(status, counters/statistics, revision etc.), to modify a current\n+\t\tstate or to force/enable a required action. Run-time control may\n+\t\tbe called whenever necessary and as many times as needed.\n+ @{\n+*/\n+\n+/**\n+ @Collection   General FM defines.\n+ */\n+#define IOC_FM_MAX_NUM_OF_VALID_PORTS  (FM_MAX_NUM_OF_OH_PORTS + \\\n+\t\t\t\t\tFM_MAX_NUM_OF_1G_RX_PORTS +  \\\n+\t\t\t\t\tFM_MAX_NUM_OF_10G_RX_PORTS + \\\n+\t\t\t\t\tFM_MAX_NUM_OF_1G_TX_PORTS +  \\\n+\t\t\t\t\tFM_MAX_NUM_OF_10G_TX_PORTS)\n+/* @} */\n+\n+/**\n+ @Description   Structure for Port bandwidth requirement. Port is identified\n+\t\tby type and relative id.\n+\t\t(must be identical to t_FmPortBandwidth defined in fm_ext.h)\n+*/\n+typedef struct ioc_fm_port_bandwidth_t {\n+\tioc_fm_port_type\ttype;\t/**< FM port type */\n+\tuint8_t\t\trelative_port_id; /**< Type relative port id */\n+\tuint8_t\t\tbandwidth;\t/**< bandwidth - (in term of percents) */\n+} ioc_fm_port_bandwidth_t;\n+\n+/**\n+ @Description   A Structure containing an array of Port bandwidth requirements.\n+\t\tThe user should state the ports requiring bandwidth in terms of\n+\t\tpercentage - i.e. all port's bandwidths in the array must add\n+\t\tup to 100.\n+\t\t(must be identical to t_FmPortsBandwidthParams defined in fm_ext.h)\n+*/\n+typedef struct ioc_fm_port_bandwidth_params {\n+\tuint8_t\t\t\tnum_of_ports;\n+\t\t\t\t/**< num of ports listed in the array below */\n+\tioc_fm_port_bandwidth_t\tports_bandwidths[IOC_FM_MAX_NUM_OF_VALID_PORTS];\n+\t\t\t\t/**< for each port, it's bandwidth (all port's\n+\t\t\t\tbandwidths must add up to 100.*/\n+} ioc_fm_port_bandwidth_params;\n+\n+/**\n+ @Description   enum for defining FM counters\n+*/\n+typedef enum ioc_fm_counters {\n+\te_IOC_FM_COUNTERS_ENQ_TOTAL_FRAME,/**< QMI total enqueued frames counter */\n+\te_IOC_FM_COUNTERS_DEQ_TOTAL_FRAME,/**< QMI total dequeued frames counter */\n+\te_IOC_FM_COUNTERS_DEQ_0,\t/**< QMI 0 frames from QMan counter */\n+\te_IOC_FM_COUNTERS_DEQ_1,\t/**< QMI 1 frames from QMan counter */\n+\te_IOC_FM_COUNTERS_DEQ_2,\t/**< QMI 2 frames from QMan counter */\n+\te_IOC_FM_COUNTERS_DEQ_3,\t/**< QMI 3 frames from QMan counter */\n+\te_IOC_FM_COUNTERS_DEQ_FROM_DEFAULT,\n+\t\t\t\t/**< QMI dequeue from default queue counter */\n+\te_IOC_FM_COUNTERS_DEQ_FROM_CONTEXT,\n+\t\t\t\t/**< QMI dequeue from FQ context counter */\n+\te_IOC_FM_COUNTERS_DEQ_FROM_FD,\n+\t\t\t\t/**< QMI dequeue from FD command field counter */\n+\te_IOC_FM_COUNTERS_DEQ_CONFIRM,\t/**< QMI dequeue confirm counter */\n+} ioc_fm_counters;\n+\n+typedef struct ioc_fm_obj_t {\n+\tvoid\t\t*obj;\n+} ioc_fm_obj_t;\n+\n+/**\n+ @Description   A structure for returning revision information\n+\t\t(must match struct t_FmRevisionInfo declared in fm_ext.h)\n+*/\n+typedef struct ioc_fm_revision_info_t {\n+\tuint8_t\tmajor;\t\t/**< Major revision */\n+\tuint8_t\tminor;\t\t/**< Minor revision */\n+} ioc_fm_revision_info_t;\n+\n+/**\n+ @Description   A structure for FM counters\n+*/\n+typedef struct ioc_fm_counters_params_t {\n+\tioc_fm_counters cnt;/**< The requested counter */\n+\tuint32_t\tval;/**< The requested value to get/set from/into the counter */\n+} ioc_fm_counters_params_t;\n+\n+typedef union ioc_fm_api_version_t {\n+\tstruct {\n+\tuint8_t major;\n+\tuint8_t minor;\n+\tuint8_t respin;\n+\tuint8_t reserved;\n+\t} version;\n+\tuint32_t ver;\n+} ioc_fm_api_version_t;\n+\n+typedef struct fm_ctrl_mon_t {\n+\tuint8_t\tpercent_cnt[2];\n+} fm_ctrl_mon_t;\n+\n+typedef struct ioc_fm_ctrl_mon_counters_params_t {\n+\tuint8_t\tfm_ctrl_index;\n+\tfm_ctrl_mon_t *p_mon;\n+} ioc_fm_ctrl_mon_counters_params_t;\n+\n+/**\n+ @Function\tFM_IOC_SET_PORTS_BANDWIDTH\n+\n+ @Description   Sets relative weights between ports when accessing common resources.\n+\n+ @Param[in]\tioc_fm_port_bandwidth_params\tPort bandwidth percentages,\n+ their sum must equal 100.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_SET_PORTS_BANDWIDTH\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(2), ioc_fm_port_bandwidth_params)\n+\n+/**\n+ @Function\tFM_IOC_GET_REVISION\n+\n+ @Description   Returns the FM revision\n+\n+ @Param[out]\tioc_fm_revision_info_t  A structure of revision information parameters.\n+\n+ @Return\tNone.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_GET_REVISION\t\\\n+\t_IOR(FM_IOC_TYPE_BASE, FM_IOC_NUM(3), ioc_fm_revision_info_t)\n+\n+/**\n+ @Function\tFM_IOC_GET_COUNTER\n+\n+ @Description   Reads one of the FM counters.\n+\n+ @Param[in,out] ioc_fm_counters_params_t The requested counter parameters.\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+\t\tNote that it is user's responsibilty to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+#define FM_IOC_GET_COUNTER\t\\\n+\t_IOWR(FM_IOC_TYPE_BASE, FM_IOC_NUM(4), ioc_fm_counters_params_t)\n+\n+/**\n+ @Function\tFM_IOC_SET_COUNTER\n+\n+ @Description   Sets a value to an enabled counter. Use \"0\" to reset the counter.\n+\n+ @Param[in]\tioc_fm_counters_params_t The requested counter parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_SET_COUNTER\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(5), ioc_fm_counters_params_t)\n+\n+/**\n+ @Function\tFM_IOC_FORCE_INTR\n+\n+ @Description   Causes an interrupt event on the requested source.\n+\n+ @Param[in]\tioc_fm_exceptions   An exception to be forced.\n+\n+ @Return\tE_OK on success; Error code if the exception is not enabled,\n+\t\tor is not able to create interrupt.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_FORCE_INTR\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(6), ioc_fm_exceptions)\n+\n+/**\n+ @Function\tFM_IOC_GET_API_VERSION\n+\n+ @Description   Reads the FMD IOCTL API version.\n+\n+ @Param[in,out] ioc_fm_api_version_t The requested counter parameters.\n+\n+ @Return\tVersion's value.\n+*/\n+#define FM_IOC_GET_API_VERSION\t\\\n+\t_IOR(FM_IOC_TYPE_BASE, FM_IOC_NUM(7), ioc_fm_api_version_t)\n+\n+/**\n+ @Function\tFM_CtrlMonStart\n+\n+ @Description   Start monitoring utilization of all available FM controllers.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_CTRL_MON_START\t\\\n+\t_IO(FM_IOC_TYPE_BASE, FM_IOC_NUM(15))\n+\n+/**\n+ @Function\tFM_CtrlMonStop\n+\n+ @Description   Stop monitoring utilization of all available FM controllers.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_IOC_CTRL_MON_STOP\t\\\n+\t_IO(FM_IOC_TYPE_BASE, FM_IOC_NUM(16))\n+\n+/**\n+ @Function\tFM_CtrlMonGetCounters\n+\n+ @Description   Obtain FM controller utilization parameters.\n+\n+\t\tIn order to obtain FM controllers utilization the following sequence\n+\t\tshould be used:\n+\t\t-# FM_CtrlMonStart()\n+\t\t-# FM_CtrlMonStop()\n+\t\t-# FM_CtrlMonGetCounters() - issued for each FM controller\n+\n+ @Param[in]\tioc_fm_ctrl_mon_counters_params_t\n+\t\tA structure holding the required parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_IOC_CTRL_MON_GET_COUNTERS_COMPAT\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(17), ioc_compat_fm_ctrl_mon_counters_params_t)\n+#endif\n+#define FM_IOC_CTRL_MON_GET_COUNTERS\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(17), ioc_fm_ctrl_mon_counters_params_t)\n+\n+/** @} */ /* end of lnx_ioctl_FM_runtime_control_grp group */\n+/** @} */ /* end of lnx_ioctl_FM_lib_grp group */\n+/** @} */ /* end of lnx_ioctl_FM_grp */\n+\n+#define FMD_API_VERSION_MAJOR 21\n+#define FMD_API_VERSION_MINOR 1\n+#define FMD_API_VERSION_RESPIN 0\n+\n+#endif /* __FM_EXT_H */\ndiff --git a/drivers/net/dpaa/fmlib/fm_lib.c b/drivers/net/dpaa/fmlib/fm_lib.c\nnew file mode 100644\nindex 000000000..46d4bb766\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_lib.c\n@@ -0,0 +1,557 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <fcntl.h>\n+#include <errno.h>\n+#include <unistd.h>\n+#include <termios.h>\n+#include <sys/ioctl.h>\n+#include <stdbool.h>\n+#include <rte_common.h>\n+\n+#include \"fm_ext.h\"\n+#include \"fm_pcd_ext.h\"\n+#include \"fm_port_ext.h\"\n+#include <dpaa_ethdev.h>\n+\n+#define DEV_TO_ID(p) \\\n+\tdo { \\\n+\tt_Device *p_Dev = (t_Device *)p; \\\n+\tp = UINT_TO_PTR(p_Dev->id); \\\n+\t} while (0)\n+\n+/* Major and minor are in sync with FMD, respin is for fmlib identification */\n+#define FM_LIB_VERSION_MAJOR\t21\n+#define FM_LIB_VERSION_MINOR\t1\n+#define FM_LIB_VERSION_RESPIN\t0\n+\n+#if (FMD_API_VERSION_MAJOR != FM_LIB_VERSION_MAJOR) || \\\n+\t(FMD_API_VERSION_MINOR != FM_LIB_VERSION_MINOR)\n+#warning FMD and FMLIB version mismatch\n+#endif\n+\n+uint32_t FM_GetApiVersion(t_Handle h_Fm, ioc_fm_api_version_t *p_version);\n+\n+t_Handle FM_Open(uint8_t id)\n+{\n+\tt_Device\t*p_Dev;\n+\tint\tfd;\n+\tchar\tdevName[20];\n+\tstatic bool called;\n+\tioc_fm_api_version_t ver;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(devName, 0, 20);\n+\tsprintf(devName, \"%s%s%d\", \"/dev/\", DEV_FM_NAME, id);\n+\tfd = open(devName, O_RDWR);\n+\tif (fd < 0) {\n+\t\tfree(p_Dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tp_Dev->id = id;\n+\tp_Dev->fd = fd;\n+\tif (!called) {\n+\t\tcalled = true;\n+\t\tFM_GetApiVersion((t_Handle)p_Dev, &ver);\n+\n+\t\tif (FMD_API_VERSION_MAJOR != ver.version.major ||\n+\t\t    FMD_API_VERSION_MINOR != ver.version.minor ||\n+\t\t\tFMD_API_VERSION_RESPIN != ver.version.respin) {\n+\t\t\tDPAA_PMD_WARN(\"Compiled against FMD API ver %u.%u.%u\",\n+\t\t\t\t      FMD_API_VERSION_MAJOR,\n+\t\t\t\tFMD_API_VERSION_MINOR, FMD_API_VERSION_RESPIN);\n+\t\t\tDPAA_PMD_WARN(\"Running with FMD API ver %u.%u.%u\",\n+\t\t\t\t      ver.version.major, ver.version.minor,\n+\t\t\t\tver.version.respin);\n+\t\t}\n+\t}\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+void FM_Close(t_Handle h_Fm)\n+{\n+\tt_Device\t*p_Dev = (t_Device *)h_Fm;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tclose(p_Dev->fd);\n+\tfree(p_Dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+}\n+\n+uint32_t  FM_GetApiVersion(t_Handle h_Fm, ioc_fm_api_version_t *p_version)\n+{\n+\tt_Device\t\t\t*p_Dev = (t_Device *)h_Fm;\n+\tint ret;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tret = ioctl(p_Dev->fd, FM_IOC_GET_API_VERSION, p_version);\n+\tif (ret) {\n+\t\tDPAA_PMD_ERR(\"cannot get API version, error %i (%s)\\n\",\n+\t\t\t     errno, strerror(errno));\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\t}\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+t_Handle FM_PCD_Open(t_FmPcdParams *p_FmPcdParams)\n+{\n+\tt_Device\t*p_Dev;\n+\tint\tfd;\n+\tchar\tdevName[20];\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(devName, 0, 20);\n+\tsprintf(devName, \"%s%s%u-pcd\", \"/dev/\", DEV_FM_NAME,\n+\t\t(uint32_t)((t_Device *)p_FmPcdParams->h_Fm)->id);\n+\tfd = open(devName, O_RDWR);\n+\tif (fd < 0) {\n+\t\tfree(p_Dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tp_Dev->id = ((t_Device *)p_FmPcdParams->h_Fm)->id;\n+\tp_Dev->fd = fd;\n+\tp_Dev->owners = 0;\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+void FM_PCD_Close(t_Handle h_FmPcd)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_FmPcd;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tclose(p_Dev->fd);\n+\n+\tif (p_Dev->owners) {\n+\t\tprintf(\n+\t\t\"\\nTrying to delete a previously created pcd handler(owners:%u)!!\\n\",\n+\t\tp_Dev->owners);\n+\t\treturn;\n+\t}\n+\n+\tfree(p_Dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+}\n+\n+uint32_t FM_PCD_Enable(t_Handle h_FmPcd)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_FmPcd;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tif (ioctl(p_Dev->fd, FM_PCD_IOC_ENABLE))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+uint32_t FM_PCD_Disable(t_Handle h_FmPcd)\n+{\n+\tt_Device\t*p_Dev = (t_Device *)h_FmPcd;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tif (ioctl(p_Dev->fd, FM_PCD_IOC_DISABLE))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+t_Handle FM_PCD_NetEnvCharacteristicsSet(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_net_env_params_t *params)\n+{\n+\tt_Device *p_PcdDev = (t_Device *)h_FmPcd;\n+\tt_Device *p_Dev = NULL;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tparams->id = NULL;\n+\n+\tif (ioctl(p_PcdDev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET, params))\n+\t\treturn NULL;\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(p_Dev, 0, sizeof(t_Device));\n+\tp_Dev->h_UserPriv = (t_Handle)p_PcdDev;\n+\tp_PcdDev->owners++;\n+\tp_Dev->id = PTR_TO_UINT(params->id);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+uint32_t FM_PCD_NetEnvCharacteristicsDelete(t_Handle h_NetEnv)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_NetEnv;\n+\tt_Device *p_PcdDev = NULL;\n+\tioc_fm_obj_t id;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_PcdDev = (t_Device *)p_Dev->h_UserPriv;\n+\tid.obj = UINT_TO_PTR(p_Dev->id);\n+\n+\tif (ioctl(p_PcdDev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE, &id))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\tp_PcdDev->owners--;\n+\tfree(p_Dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+t_Handle FM_PCD_KgSchemeSet(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_kg_scheme_params_t *params)\n+{\n+\tt_Device *p_PcdDev = (t_Device *)h_FmPcd;\n+\tt_Device *p_Dev = NULL;\n+\tint ret;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tparams->id = NULL;\n+\n+\tif (params->param.modify) {\n+\t\tif (params->param.scm_id.scheme_id)\n+\t\t\tDEV_TO_ID(params->param.scm_id.scheme_id);\n+\t\telse\n+\t\t\treturn NULL;\n+\t}\n+\n+\t/* correct h_NetEnv param from scheme */\n+\tif (params->param.net_env_params.net_env_id)\n+\t\tDEV_TO_ID(params->param.net_env_params.net_env_id);\n+\n+\t/* correct next engine params handlers: cc*/\n+\tif (params->param.next_engine == e_IOC_FM_PCD_CC &&\n+\t    params->param.kg_next_engine_params.cc.tree_id)\n+\t\tDEV_TO_ID(params->param.kg_next_engine_params.cc.tree_id);\n+\n+\tret = ioctl(p_PcdDev->fd, FM_PCD_IOC_KG_SCHEME_SET, params);\n+\tif (ret) {\n+\t\tDPAA_PMD_ERR(\"  cannot set kg scheme, error %i (%s)\\n\",\n+\t\t\t     errno, strerror(errno));\n+\t\treturn NULL;\n+\t}\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(p_Dev, 0, sizeof(t_Device));\n+\tp_Dev->h_UserPriv = (t_Handle)p_PcdDev;\n+\t/* increase owners only if a new scheme is created */\n+\tif (params->param.modify == false)\n+\t\tp_PcdDev->owners++;\n+\tp_Dev->id = PTR_TO_UINT(params->id);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+uint32_t FM_PCD_KgSchemeDelete(t_Handle h_Scheme)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_Scheme;\n+\tt_Device *p_PcdDev = NULL;\n+\tioc_fm_obj_t id;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_PcdDev =  (t_Device *)p_Dev->h_UserPriv;\n+\tid.obj = UINT_TO_PTR(p_Dev->id);\n+\n+\tif (ioctl(p_PcdDev->fd, FM_PCD_IOC_KG_SCHEME_DELETE, &id)) {\n+\t\tDPAA_PMD_WARN(\"cannot delete kg scheme, error %i (%s)\\n\",\n+\t\t\t      errno, strerror(errno));\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\t}\n+\n+\tp_PcdDev->owners--;\n+\tfree(p_Dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+#ifdef FM_CAPWAP_SUPPORT\n+#error CAPWAP feature not supported\n+#endif\n+\n+typedef struct {\n+\te_FmPortType\tportType;\t/**< Port type */\n+\tuint8_t\t\tportId;\t\t/**< Port Id - relative to type */\n+} t_FmPort;\n+\n+t_Handle FM_PORT_Open(t_FmPortParams *p_FmPortParams)\n+{\n+\tt_Device\t*p_Dev;\n+\tint\tfd;\n+\tchar\tdevName[30];\n+\tt_FmPort\t*p_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(p_Dev, 0, sizeof(t_Device));\n+\n+\tp_FmPort = (t_FmPort *)malloc(sizeof(t_FmPort));\n+\tif (!p_FmPort) {\n+\t\tfree(p_Dev);\n+\t\treturn NULL;\n+\t}\n+\tmemset(p_FmPort, 0, sizeof(t_FmPort));\n+\tmemset(devName, 0, sizeof(devName));\n+\tswitch (p_FmPortParams->portType) {\n+\tcase e_FM_PORT_TYPE_OH_OFFLINE_PARSING:\n+\t\tsprintf(devName, \"%s%s%u-port-oh%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_Device *)p_FmPortParams->h_Fm)->id,\n+\t\t\tp_FmPortParams->portId);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_RX:\n+\t\tsprintf(devName, \"%s%s%u-port-rx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_Device *)p_FmPortParams->h_Fm)->id,\n+\t\t\tp_FmPortParams->portId);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_RX_10G:\n+\t\tsprintf(devName, \"%s%s%u-port-rx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_Device *)p_FmPortParams->h_Fm)->id,\n+\t\t\tFM_MAX_NUM_OF_1G_RX_PORTS + p_FmPortParams->portId);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_TX:\n+\t\tsprintf(devName, \"%s%s%u-port-tx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_Device *)p_FmPortParams->h_Fm)->id,\n+\t\t\tp_FmPortParams->portId);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_TX_10G:\n+\t\tsprintf(devName, \"%s%s%u-port-tx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_Device *)p_FmPortParams->h_Fm)->id,\n+\t\t\tFM_MAX_NUM_OF_1G_TX_PORTS + p_FmPortParams->portId);\n+\t\tbreak;\n+\tdefault:\n+\t\tfree(p_FmPort);\n+\t\tfree(p_Dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tfd = open(devName, O_RDWR);\n+\tif (fd < 0) {\n+\t\tfree(p_FmPort);\n+\t\tfree(p_Dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tp_FmPort->portType = p_FmPortParams->portType;\n+\tp_FmPort->portId = p_FmPortParams->portId;\n+\tp_Dev->id = p_FmPortParams->portId;\n+\tp_Dev->fd = fd;\n+\tp_Dev->h_UserPriv = (t_Handle)p_FmPort;\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+void FM_PORT_Close(t_Handle h_FmPort)\n+{\n+\tt_Device\t*p_Dev = (t_Device *)h_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tclose(p_Dev->fd);\n+\tif (p_Dev->h_UserPriv)\n+\t\tfree(p_Dev->h_UserPriv);\n+\tfree(p_Dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+}\n+\n+uint32_t FM_PORT_Disable(t_Handle h_FmPort)\n+{\n+\tt_Device\t*p_Dev = (t_Device *)h_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tif (ioctl(p_Dev->fd, FM_PORT_IOC_DISABLE))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+uint32_t FM_PORT_Enable(t_Handle h_FmPort)\n+{\n+\tt_Device\t*p_Dev = (t_Device *)h_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tif (ioctl(p_Dev->fd, FM_PORT_IOC_ENABLE))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+uint32_t FM_PORT_SetPCD(t_Handle h_FmPort,\n+\tioc_fm_port_pcd_params_t *params)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\t/* correct h_NetEnv param from t_FmPortPcdParams */\n+\tDEV_TO_ID(params->net_env_id);\n+\n+\t/* correct pcd structures according to what support was set */\n+\tif (params->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_CC) {\n+\t\tif (params->p_cc_params && params->p_cc_params->cc_tree_id)\n+\t\t\tDEV_TO_ID(params->p_cc_params->cc_tree_id);\n+\t\telse\n+\t\t\tDPAA_PMD_WARN(\"Coarse Clasification not set !\");\n+\t}\n+\n+\tif (params->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR){\n+\t\tif (params->p_kg_params) {\n+\t\t\tuint32_t i;\n+\n+\t\t\tfor (i = 0; i < params->p_kg_params->num_of_schemes; i++)\n+\t\t\t\tif (params->p_kg_params->scheme_ids[i])\n+\t\t\t\t\tDEV_TO_ID(params->p_kg_params->scheme_ids[i]);\n+\t\t\t\telse\n+\t\t\t\t\tDPAA_PMD_WARN(\"Scheme:%u not set!!\", i);\n+\n+\t\t\tif (params->p_kg_params && params->p_kg_params->direct_scheme)\n+\t\t\t\tDEV_TO_ID(params->p_kg_params->direct_scheme_id);\n+\t\t} else {\n+\t\t\tDPAA_PMD_WARN(\"KeyGen not set !\");\n+\t\t}\n+\t}\n+\n+\tif (params->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PLCR_ONLY ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR ||\n+\t\tparams->pcd_support == e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR) {\n+\t\tif (params->p_plcr_params) {\n+\t\t\tif (params->p_plcr_params->plcr_profile_id)\n+\t\t\t\tDEV_TO_ID(params->p_plcr_params->plcr_profile_id);\n+\t\t\telse\n+\t\t\t\tDPAA_PMD_WARN(\"Policer not set !\");\n+\t\t}\n+\t}\n+\n+\tif (params->p_ip_reassembly_manip)\n+\t\tDEV_TO_ID(params->p_ip_reassembly_manip);\n+\n+#if (DPAA_VERSION >= 11)\n+\tif (params->p_capwap_reassembly_manip)\n+\t\tDEV_TO_ID(params->p_capwap_reassembly_manip);\n+#endif\n+\n+\tif (ioctl(p_Dev->fd, FM_PORT_IOC_SET_PCD, params))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+uint32_t FM_PORT_DeletePCD(t_Handle h_FmPort)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_FmPort;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tif (ioctl(p_Dev->fd, FM_PORT_IOC_DELETE_PCD))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+t_Handle CreateDevice(t_Handle h_UserPriv, t_Handle h_DevId)\n+{\n+\tt_Device *p_UserPrivDev = (t_Device *)h_UserPriv;\n+\tt_Device *p_Dev = NULL;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_Dev = (t_Device *)malloc(sizeof(t_Device));\n+\tif (!p_Dev)\n+\t\treturn NULL;\n+\n+\tmemset(p_Dev, 0, sizeof(t_Device));\n+\tp_Dev->h_UserPriv = h_UserPriv;\n+\tp_UserPrivDev->owners++;\n+\tp_Dev->id = PTR_TO_UINT(h_DevId);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_Handle)p_Dev;\n+}\n+\n+t_Handle GetDeviceId(t_Handle h_Dev)\n+{\n+\tt_Device *p_Dev = (t_Device *)h_Dev;\n+\n+\treturn (t_Handle)p_Dev->id;\n+}\n+\n+#if defined FMAN_V3H\n+void Platform_is_FMAN_V3H(void)\n+{\n+}\n+#elif defined FMAN_V3L\n+void Platform_is_FMAN_V3L(void)\n+{\n+}\n+#endif\ndiff --git a/drivers/net/dpaa/fmlib/fm_pcd_ext.h b/drivers/net/dpaa/fmlib/fm_pcd_ext.h\nnew file mode 100644\nindex 000000000..7feb49afb\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_pcd_ext.h\n@@ -0,0 +1,5190 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#ifndef __FM_PCD_EXT_H\n+#define __FM_PCD_EXT_H\n+\n+#include \"ncsw_ext.h\"\n+#include \"net_ext.h\"\n+#include \"fm_ext.h\"\n+\n+/**\n+ @Description   FM PCD ...\n+ @Group\tlnx_ioctl_FM_grp Frame Manager Linux IOCTL API\n+ @Description   Frame Manager Linux ioctls definitions and enums\n+ @{\n+*/\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PCD_grp FM PCD\n+ @Description   Frame Manager PCD API functions, definitions and enums\n+\n+\tThe FM PCD module is responsible for the initialization of all\n+\tglobal classifying FM modules. This includes the parser general and\n+\tcommon registers, the key generator global and common registers,\n+\tand the policer global and common registers.\n+\tIn addition, the FM PCD SW module will initialize all required\n+\tkey generator schemes, coarse classification flows, and policer\n+\tprofiles. When an FM module is configured to work with one of these\n+\tentities, it will register to it using the FM PORT API. The PCD\n+\tmodule will manage the PCD resources - i.e. resource management of\n+\tKeyGen schemes, etc.\n+\n+ @{\n+*/\n+\n+/**\n+ @Collection\tGeneral PCD defines\n+*/\n+#define IOC_FM_PCD_MAX_NUM_OF_PRIVATE_HDRS\t\t2\n+/**< Number of units/headers saved for user */\n+\n+#define IOC_FM_PCD_PRS_NUM_OF_HDRS\t\t\t16\n+/**< Number of headers supported by HW parser */\n+#define IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS\t(32 - IOC_FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)\n+/**< Number of distinction units is limited by register size (32 bits) minus\n+reserved bits for private headers. */\n+#define IOC_FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS\t4\n+/**< Maximum number of interchangeable headers in a distinction unit */\n+#define IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS\t\t8\n+/**< Total number of generic KeyGen registers */\n+#define IOC_FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY\t35\n+/**< Max number allowed on any configuration; For HW implementation reasons,\n+in most cases less than this will be allowed; The driver will return an\n+initialization error if resource is unavailable. */\n+#define IOC_FM_PCD_KG_NUM_OF_EXTRACT_MASKS\t\t4\n+/**< Total number of masks allowed on KeyGen extractions. */\n+#define IOC_FM_PCD_KG_NUM_OF_DEFAULT_GROUPS\t\t16\n+/**< Number of default value logical groups */\n+#define IOC_FM_PCD_PRS_NUM_OF_LABELS\t\t\t32\n+/**< Maximum number of SW parser labels */\n+#define IOC_FM_PCD_SW_PRS_SIZE\t\t\t0x00000800\n+/**< Total size of SW parser area */\n+\n+#define IOC_FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE\t128\n+/**< Maximum size of insertion template for insert manipulation */\n+\n+#define IOC_FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES\t64\n+/**< Maximum possible entries for frame replicator group */\n+/* @} */\n+\n+#ifdef FM_CAPWAP_SUPPORT\n+#error \"FM_CAPWAP_SUPPORT not implemented!\"\n+#endif\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PCD_init_grp FM PCD Initialization Unit\n+\n+ @Description   Frame Manager PCD Initialization Unit API\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   PCD counters\n+\t\t(must match enum ioc_fm_pcd_counters defined in fm_pcd_ext.h)\n+*/\n+typedef enum ioc_fm_pcd_counters {\n+\te_IOC_FM_PCD_KG_COUNTERS_TOTAL,\t\t/**< KeyGen counter */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_RED,\n+\t/**< Policer counter - counts the total number of RED packets that exit the Policer. */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_YELLOW,\n+\t/**< Policer counter - counts the total number of YELLOW packets that exit the Policer. */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED,\n+\t/**< Policer counter - counts the number of packets that changed color to RED by the Policer;\n+\tThis is a subset of e_IOC_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color changes. */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW,\n+\t/**< Policer counter - counts the number of packets that changed color to YELLOW by the Policer;\n+\tThis is a subset of e_IOC_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active color changes. */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_TOTAL,\n+\t/**< Policer counter - counts the total number of packets passed in the Policer. */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH,\n+\t/**< Policer counter - counts the number of packets with length mismatch. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH,\n+\t/**< Parser counter - counts the number of times the parser block is dispatched. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L2 parse result is returned (including errors). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L3 parse result is returned (including errors). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L4 parse result is returned (including errors). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times SHIM parse result is returned (including errors). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED_WITH_ERR,\n+\t/**< Parser counter - counts the number of times L2 parse result is returned with errors. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED_WITH_ERR,\n+\t/**< Parser counter - counts the number of times L3 parse result is returned with errors. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED_WITH_ERR,\n+\t/**< Parser counter - counts the number of times L4 parse result is returned with errors. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED_WITH_ERR,\n+\t/**< Parser counter - counts the number of times SHIM parse result is returned with errors. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES,\n+\t/**< Parser counter - counts the number of cycles spent executing soft parser instruction (including stall cycles). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_STALL_CYCLES,\n+\t/**< Parser counter - counts the number of cycles stalled waiting for parser internal memory reads while executing soft parser instruction. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_HARD_PRS_CYCLE_INCL_STALL_CYCLES,\n+\t/**< Parser counter - counts the number of cycles spent executing hard parser (including stall cycles). */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles while performing FMan Memory read. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles stalled while performing FMan Memory read. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles while performing FMan Memory write. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles stalled while performing FMan Memory write. */\n+\te_IOC_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES\n+\t/**< FPM counter - counts the number of cycles stalled while performing a FPM Command. */\n+} ioc_fm_pcd_counters;\n+\n+/**\n+ @Description   PCD interrupts\n+\t\t(must match enum ioc_fm_pcd_exceptions defined in fm_pcd_ext.h)\n+*/\n+typedef enum ioc_fm_pcd_exceptions {\n+\te_IOC_FM_PCD_KG_EXCEPTION_DOUBLE_ECC,\n+\t/**< KeyGen double-bit ECC error is detected on internal memory read access. */\n+\te_IOC_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW,\n+\t/**< KeyGen scheme configuration error indicating a key size larger than 56 bytes. */\n+\te_IOC_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC,\n+\t/**< Policer double-bit ECC error has been detected on PRAM read access. */\n+\te_IOC_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR,\n+\t/**< Policer access to a non-initialized profile has been detected. */\n+\te_IOC_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE,\n+\t/**< Policer RAM self-initialization complete */\n+\te_IOC_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE,\n+\t/**< Policer atomic action complete */\n+\te_IOC_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC,\n+\t/**< Parser double-bit ECC error */\n+\te_IOC_FM_PCD_PRS_EXCEPTION_SINGLE_ECC\n+\t/**< Parser single-bit ECC error */\n+} ioc_fm_pcd_exceptions;\n+\n+/** @} */ /* end of lnx_ioctl_FM_PCD_init_grp group */\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PCD_Runtime_grp FM PCD Runtime Unit\n+\n+ @Description   Frame Manager PCD Runtime Unit\n+\n+\tThe runtime control allows creation of PCD infrastructure modules\n+\tsuch as Network Environment Characteristics, Classification Plan\n+\tGroups and Coarse Classification Trees.\n+\tIt also allows on-the-fly initialization, modification and removal\n+\tof PCD modules such as KeyGen schemes, coarse classification nodes\n+\tand Policer profiles.\n+\n+In order to explain the programming model of the PCD driver interface\n+a few terms should be explained, and will be used below.\n+- Distinction Header - One of the 16 protocols supported by the FM parser,\n+\tor one of the SHIM headers (1 or 2). May be a header with a special\n+\toption (see below).\n+- Interchangeable Headers Group - This is a group of Headers recognized\n+\tby either one of them. For example, if in a specific context the user\n+\tchooses to treat IPv4 and IPV6 in the same way, they may create an\n+\tinterchangeable Headers Unit consisting of these 2 headers.\n+- A Distinction Unit - a Distinction Header or an Interchangeable Headers\n+\tGroup.\n+- Header with special option - applies to Ethernet, MPLS, VLAN, IPv4 and\n+\tIPv6, includes multicast, broadcast and other protocol specific options.\n+\tIn terms of hardware it relates to the options available in the\n+\tclassification plan.\n+- Network Environment Characteristics - a set of Distinction Units that define\n+\tthe total recognizable header selection for a certain environment. This\n+\tis NOT the list of all headers that will ever appear in a flow, but\n+\trather everything that needs distinction in a flow, where distinction is\n+\tmade by KeyGen schemes and coarse classification action descriptors.\n+\n+The PCD runtime modules initialization is done in stages. The first stage after\n+initializing the PCD module itself is to establish a Network Flows Environment\n+Definition. The application may choose to establish one or more such\n+environments. Later, when needed, the application will have to state, for some\n+of its modules, to which single environment it belongs.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   structure for FM counters\n+*/\n+typedef struct ioc_fm_pcd_counters_params_t {\n+\tioc_fm_pcd_counters cnt;\t/**< The requested counter */\n+\tuint32_t\tval;/**< The requested value to get/set from/into the counter */\n+} ioc_fm_pcd_counters_params_t;\n+\n+/**\n+ @Description   structure for FM exception definitios\n+*/\n+typedef struct ioc_fm_pcd_exception_params_t {\n+\tioc_fm_pcd_exceptions exception;\t/**< The requested exception */\n+\tbool\t\tenable;\t/**< TRUE to enable interrupt, FALSE to mask it. */\n+} ioc_fm_pcd_exception_params_t;\n+\n+/**\n+ @Description   A structure for SW parser labels\n+\t\t(must be identical to struct t_FmPcdPrsLabelParams defined in fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_prs_label_params_t {\n+\tuint32_t instruction_offset;/**< SW parser label instruction offset (2 bytes\n+\t\t\t\tresolution), relative to Parser RAM. */\n+\tioc_net_header_type\thdr;/**< The existence of this header will invoke\n+\t\t\t\t\tthe SW parser code. */\n+\tuint8_t\tindex_per_hdr;\t/**< Normally 0, if more than one SW parser\n+\t\t\t\tattachments for the same header, use this\n+\t\t\t\tindex to distinguish between them. */\n+} ioc_fm_pcd_prs_label_params_t;\n+\n+/**\n+ @Description   A structure for SW parser\n+\t\t(Must match struct ioc_fm_pcd_prs_sw_params_t defined in fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_prs_sw_params_t {\n+\tbool\t\toverride;\t/**< FALSE to invoke a check that nothing else\n+\t\t\t\t\twas loaded to this address, including\n+\t\t\t\t\tinternal patches.\n+\t\t\t\t\tTRUE to override any existing code.*/\n+\tuint32_t\tsize;\t\t/**< SW parser code size */\n+\tuint16_t\tbase;\t\t/**< SW parser base (in instruction counts!\n+\t\t\t\t\t\tmust be larger than 0x20)*/\n+\tuint8_t\t\t*p_code;\t/**< SW parser code */\n+\tuint32_t\tsw_prs_data_params[IOC_FM_PCD_PRS_NUM_OF_HDRS];\n+\t\t\t\t\t/**< SW parser data (parameters) */\n+\tuint8_t\t\tnum_of_labels;\t/**< Number of labels for SW parser. */\n+\tioc_fm_pcd_prs_label_params_t labels_table[IOC_FM_PCD_PRS_NUM_OF_LABELS];\n+\t\t/**< SW parser labels table, containing num_of_labels entries */\n+} ioc_fm_pcd_prs_sw_params_t;\n+\n+/**\n+ @Description   A structure to set the a KeyGen default value\n+ */\n+typedef struct ioc_fm_pcd_kg_dflt_value_params_t {\n+\tuint8_t\t\tvalueId;/**< 0,1 - one of 2 global default values */\n+\tuint32_t\tvalue;\t/**< The requested default value */\n+} ioc_fm_pcd_kg_dflt_value_params_t;\n+\n+/**\n+ @Function\tFM_PCD_Enable\n+\n+ @Description   This routine should be called after PCD is initialized for\n+\t\tenabling all PCD engines according to their existing configuration.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only when PCD is disabled.\n+*/\n+#define FM_PCD_IOC_ENABLE  _IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(1))\n+\n+/**\n+ @Function\tFM_PCD_Disable\n+\n+ @Description   This routine may be called when PCD is enabled in order to\n+\t\tdisable all PCD engines. It may be called\n+\t\tonly when none of the ports in the system are using the PCD.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only when PCD is enabled.\n+*/\n+#define FM_PCD_IOC_DISABLE  _IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(2))\n+\n+ /**\n+ @Function\tFM_PCD_PrsLoadSw\n+\n+ @Description   This routine may be called only when all ports in the\n+\t\tsystem are actively using the classification plan scheme.\n+\t\tIn such cases it is recommended in order to save resources.\n+\t\tThe driver automatically saves 8 classification plans for\n+\t\tports that do NOT use the classification plan mechanism, to\n+\t\tavoid this (in order to save those entries) this routine may\n+\t\tbe called.\n+\n+ @Param[in]\tioc_fm_pcd_prs_sw_params_t\n+\t\tA pointer to the image of the software parser code.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only when PCD is disabled.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_PRS_LOAD_SW_COMPAT  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_compat_fm_pcd_prs_sw_params_t)\n+#endif\n+#define FM_PCD_IOC_PRS_LOAD_SW  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_fm_pcd_prs_sw_params_t)\n+\n+/**\n+ @Function\tFM_PCD_KgSetDfltValue\n+\n+ @Description   Calling this routine sets a global default value to be used\n+\t\tby the KeyGen when parser does not recognize a required\n+\t\tfield/header.\n+\t\tBy default default values are 0.\n+\n+ @Param[in]\tioc_fm_pcd_kg_dflt_value_params_t   A pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only when PCD is disabled.\n+*/\n+#define FM_PCD_IOC_KG_SET_DFLT_VALUE  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(6), ioc_fm_pcd_kg_dflt_value_params_t)\n+\n+/**\n+ @Function\tFM_PCD_KgSetAdditionalDataAfterParsing\n+\n+ @Description   Calling this routine allows the keygen to access data past\n+\t\tthe parser finishing point.\n+\n+ @Param[in]\tuint8_t   payload-offset; the number of bytes beyond the parser location.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only when PCD is disabled.\n+*/\n+#define FM_PCD_IOC_KG_SET_ADDITIONAL_DATA_AFTER_PARSING  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(7), uint8_t)\n+\n+/**\n+ @Function\tFM_PCD_SetException\n+\n+ @Description   Calling this routine enables/disables PCD interrupts.\n+\n+ @Param[in]\tioc_fm_pcd_exception_params_t\n+\t\tArguments struct with exception to be enabled/disabled.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#define FM_PCD_IOC_SET_EXCEPTION _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(8), ioc_fm_pcd_exception_params_t)\n+\n+/**\n+ @Function\tFM_PCD_GetCounter\n+\n+ @Description   Reads one of the FM PCD counters.\n+\n+ @Param[in,out] ioc_fm_pcd_counters_params_t The requested counter parameters.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tNote that it is user's responsibilty to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+#define FM_PCD_IOC_GET_COUNTER  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(9), ioc_fm_pcd_counters_params_t)\n+\n+/**\n+\n+ @Function\tFM_PCD_KgSchemeGetCounter\n+\n+ @Description   Reads scheme packet counter.\n+\n+ @Param[in]\th_Scheme\tscheme handle as returned by FM_PCD_KgSchemeSet().\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_KG_SCHEME_GET_CNTR_COMPAT  _IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_compat_fm_pcd_kg_scheme_spc_t)\n+#endif\n+#define FM_PCD_IOC_KG_SCHEME_GET_CNTR  _IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_fm_pcd_kg_scheme_spc_t)\n+\n+/**\n+ @Function\tFM_PCD_ForceIntr\n+\n+ @Description   Causes an interrupt event on the requested source.\n+\n+ @Param[in]\tioc_fm_pcd_exceptions - An exception to be forced.\n+\n+ @Return\t0 on success; error code if the exception is not enabled,\n+\t\tor is not able to create interrupt.\n+*/\n+#define FM_PCD_IOC_FORCE_INTR _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(11), ioc_fm_pcd_exceptions)\n+\n+/**\n+ @Collection\tDefinitions of coarse classification parameters as required by KeyGen\n+\t\t(when coarse classification is the next engine after this scheme).\n+*/\n+#define IOC_FM_PCD_MAX_NUM_OF_CC_TREES\t\t8\n+#define IOC_FM_PCD_MAX_NUM_OF_CC_GROUPS\t\t16\n+#define IOC_FM_PCD_MAX_NUM_OF_CC_UNITS\t\t4\n+#define IOC_FM_PCD_MAX_NUM_OF_KEYS\t\t256\n+#define IOC_FM_PCD_MAX_NUM_OF_FLOWS\t\t(4 * KILOBYTE)\n+#define IOC_FM_PCD_MAX_SIZE_OF_KEY\t\t56\n+#define IOC_FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP\t16\n+#define IOC_FM_PCD_LAST_KEY_INDEX\t\t0xffff\n+#define IOC_FM_PCD_MANIP_DSCP_VALUES\t\t64\n+/* @} */\n+\n+/**\n+ @Collection\tA set of definitions to allow protocol\n+\t\tspecial option description.\n+*/\n+typedef uint32_t\t\tioc_protocol_opt_t;\n+\t\t/**< A general type to define a protocol option. */\n+\n+typedef ioc_protocol_opt_t  ioc_eth_protocol_opt_t;\n+\t\t\t/**< Ethernet protocol options. */\n+#define IOC_ETH_BROADCAST\t\t0x80000000   /**< Ethernet Broadcast. */\n+#define IOC_ETH_MULTICAST\t\t0x40000000   /**< Ethernet Multicast. */\n+\n+typedef ioc_protocol_opt_t  ioc_vlan_protocol_opt_t;\n+\t\t\t\t/**< Vlan protocol options. */\n+#define IOC_VLAN_STACKED\t\t0x20000000   /**< Stacked VLAN. */\n+\n+typedef ioc_protocol_opt_t  ioc_mpls_protocol_opt_t;\n+\t\t\t\t/**< MPLS protocol options. */\n+#define IOC_MPLS_STACKED\t\t0x10000000   /**< Stacked MPLS. */\n+\n+typedef ioc_protocol_opt_t  ioc_ipv4_protocol_opt_t;\n+\t\t\t/**< IPv4 protocol options. */\n+#define IOC_IPV4_BROADCAST_1\t\t0x08000000   /**< IPv4 Broadcast. */\n+#define IOC_IPV4_MULTICAST_1\t\t0x04000000   /**< IPv4 Multicast. */\n+#define IOC_IPV4_UNICAST_2\t\t0x02000000   /**< Tunneled IPv4 - Unicast. */\n+#define IOC_IPV4_MULTICAST_BROADCAST_2  0x01000000\n+\t\t\t\t\t/**< Tunneled IPv4 - Broadcast/Multicast. */\n+\n+#define IOC_IPV4_FRAG_1\t\t0x00000008   /**< IPV4 reassembly option.\n+\t\t\tIPV4 Reassembly manipulation requires network\n+\t\t\tenvironment with IPV4 header and IPV4_FRAG_1 option  */\n+\n+typedef ioc_protocol_opt_t  ioc_ipv6_protocol_opt_t;\n+\t\t\t\t\t/**< IPv6 protocol options. */\n+#define IOC_IPV6_MULTICAST_1\t\t0x00800000   /**< IPv6 Multicast. */\n+#define IOC_IPV6_UNICAST_2\t\t0x00400000\n+\t\t\t\t\t/**< Tunneled IPv6 - Unicast. */\n+#define IOC_IPV6_MULTICAST_2\t\t0x00200000\n+\t\t\t\t\t/**< Tunneled IPv6 - Multicast. */\n+\n+#define IOC_IPV6_FRAG_1\t\t0x00000004   /**< IPV6 reassembly option.\n+\t\t\tIPV6 Reassembly manipulation requires network\n+\t\t\tenvironment with IPV6 header and IPV6_FRAG_1 option  */\n+#if (DPAA_VERSION >= 11)\n+typedef ioc_protocol_opt_t   ioc_capwap_protocol_opt_t;\n+\t\t\t\t\t/**< CAPWAP protocol options. */\n+#define CAPWAP_FRAG_1\t\t0x00000008  /**< CAPWAP reassembly option.\n+\t\t\tCAPWAP Reassembly manipulation requires network\n+\t\t\tenvironment with CAPWAP header and CAPWAP_FRAG_1 option;\n+\t\t\tin case where fragment found, the fragment-extension offset\n+\t\t\tmay be found at 'shim2' (in parser-result). */\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/* @} */\n+\n+#define IOC_FM_PCD_MANIP_MAX_HDR_SIZE\t\t256\n+#define IOC_FM_PCD_MANIP_DSCP_TO_VLAN_TRANS\t64\n+/**\n+ @Collection\tA set of definitions to support Header Manipulation selection.\n+*/\n+typedef uint32_t\t\t\tioc_hdr_manip_flags_t;\n+\t/**< A general type to define a HMan update command flags. */\n+\n+typedef ioc_hdr_manip_flags_t\tioc_ipv4_hdr_manip_update_flags_t;\n+\t/**< IPv4 protocol HMan update command flags. */\n+\n+#define IOC_HDR_MANIP_IPV4_TOS\t0x80000000\n+\t\t\t/**< update TOS with the given value ('tos' field\n+\t\t\tof ioc_fm_pcd_manip_hdr_field_update_ipv4_t) */\n+#define IOC_HDR_MANIP_IPV4_ID\t0x40000000\n+\t\t\t/**< update IP ID with the given value ('id' field\n+\t\t\tof ioc_fm_pcd_manip_hdr_field_update_ipv4_t) */\n+#define IOC_HDR_MANIP_IPV4_TTL\t0x20000000\t/**< Decrement TTL by 1 */\n+#define IOC_HDR_MANIP_IPV4_SRC\t0x10000000\n+\t\t/**< update IP source address with the given value\n+\t\t('src' field of ioc_fm_pcd_manip_hdr_field_update_ipv4_t) */\n+#define IOC_HDR_MANIP_IPV4_DST\t0x08000000\n+\t\t/**< update IP destination address with the given value\n+\t\t('dst' field of ioc_fm_pcd_manip_hdr_field_update_ipv4_t) */\n+\n+typedef ioc_hdr_manip_flags_t\tioc_ipv6_hdr_manip_update_flags_t;\n+\t\t\t/**< IPv6 protocol HMan update command flags. */\n+\n+#define IOC_HDR_MANIP_IPV6_TC\t0x80000000\n+\t/**< update Traffic Class address with the given value\n+\t('traffic_class' field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t) */\n+#define IOC_HDR_MANIP_IPV6_HL\t0x40000000\t/**< Decrement Hop Limit by 1 */\n+#define IOC_HDR_MANIP_IPV6_SRC\t0x20000000\n+\t\t/**< update IP source address with the given value\n+\t\t('src' field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t) */\n+#define IOC_HDR_MANIP_IPV6_DST\t0x10000000\n+\t\t/**< update IP destination address with the given value\n+\t\t('dst' field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t) */\n+\n+typedef ioc_hdr_manip_flags_t\tioc_tcp_udp_hdr_manip_update_flags_t;\n+\t\t/**< TCP/UDP protocol HMan update command flags. */\n+\n+#define IOC_HDR_MANIP_TCP_UDP_SRC\t0x80000000\n+\t\t/**< update TCP/UDP source address with the given value\n+\t\t('src' field of ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t) */\n+#define IOC_HDR_MANIP_TCP_UDP_DST\t0x40000000\n+\t\t/**< update TCP/UDP destination address with the given value\n+\t\t('dst' field of ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t) */\n+#define IOC_HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000\n+\t\t/**< update TCP/UDP checksum */\n+\n+/* @} */\n+\n+/**\n+ @Description   A type used for returning the order of the key extraction.\n+\t\teach value in this array represents the index of the extraction\n+\t\tcommand as defined by the user in the initialization extraction\n+\t\tarray. The valid size of this array is the user define number of\n+\t\textractions required (also marked by the second '0' in this array).\n+*/\n+typedef\tuint8_t\tioc_fm_pcd_kg_key_order_t [IOC_FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];\n+\n+/**\n+ @Description   All PCD engines\n+\t\t(must match enum e_FmPcdEngine defined in fm_pcd_ext.h)\n+*/\n+typedef enum ioc_fm_pcd_engine {\n+\te_IOC_FM_PCD_INVALID = 0,   /**< Invalid PCD engine */\n+\te_IOC_FM_PCD_DONE,\t/**< No PCD Engine indicated */\n+\te_IOC_FM_PCD_KG,\t\t/**< KeyGen */\n+\te_IOC_FM_PCD_CC,\t\t/**< Coarse Classifier */\n+\te_IOC_FM_PCD_PLCR,\t/**< Policer */\n+\te_IOC_FM_PCD_PRS,\t/**< Parser */\n+#if DPAA_VERSION >= 11\n+\te_IOC_FM_PCD_FR,\t\t/**< Frame Replicator */\n+#endif /* DPAA_VERSION >= 11 */\n+\te_IOC_FM_PCD_HASH\t/**< Hash Table */\n+} ioc_fm_pcd_engine;\n+\n+/**\n+ @Description   An enum for selecting extraction by header types\n+\t\t(Must match enum e_FmPcdExtractByHdrType defined in fm_pcd_ext.h)\n+*/\n+typedef enum ioc_fm_pcd_extract_by_hdr_type {\n+\te_IOC_FM_PCD_EXTRACT_FROM_HDR,\t/**< Extract bytes from header */\n+\te_IOC_FM_PCD_EXTRACT_FROM_FIELD,/**< Extract bytes from header field */\n+\te_IOC_FM_PCD_EXTRACT_FULL_FIELD\t/**< Extract a full field */\n+} ioc_fm_pcd_extract_by_hdr_type;\n+\n+/**\n+ @Description   An enum for selecting extraction source (when it is not the header)\n+\t\t(Must match enum e_FmPcdExtractFrom defined in fm_pcd_ext.h)\n+*/\n+typedef enum ioc_fm_pcd_extract_from {\n+\te_IOC_FM_PCD_EXTRACT_FROM_FRAME_START,\n+\t\t\t/**< KG & CC: Extract from beginning of frame */\n+\te_IOC_FM_PCD_EXTRACT_FROM_DFLT_VALUE,\n+\t\t\t\t/**< KG only: Extract from a default value */\n+\te_IOC_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE,\n+\t/**< KG only: Extract from the point where parsing had finished */\n+\te_IOC_FM_PCD_EXTRACT_FROM_KEY,\t/**< CC only: Field where saved KEY */\n+\te_IOC_FM_PCD_EXTRACT_FROM_HASH,\t/**< CC only: Field where saved HASH */\n+\te_IOC_FM_PCD_EXTRACT_FROM_PARSE_RESULT,\n+\t\t\t\t/**< KG & CC: Extract from the parser result */\n+\te_IOC_FM_PCD_EXTRACT_FROM_ENQ_FQID,\n+\t\t\t\t/**< KG & CC: Extract from enqueue FQID */\n+\te_IOC_FM_PCD_EXTRACT_FROM_FLOW_ID\n+\t\t\t\t/**< CC only: Field where saved Dequeue FQID */\n+} ioc_fm_pcd_extract_from;\n+\n+/**\n+ @Description   An enum for selecting extraction type\n+*/\n+typedef enum ioc_fm_pcd_extract_type {\n+\te_IOC_FM_PCD_EXTRACT_BY_HDR,\t/**< Extract according to header */\n+\te_IOC_FM_PCD_EXTRACT_NON_HDR,\t/**< Extract from data that is not the header */\n+\te_IOC_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO\n+\t\t\t/**< Extract private info as specified by user */\n+} ioc_fm_pcd_extract_type;\n+\n+/**\n+ @Description   An enum for selecting a default\n+*/\n+typedef enum ioc_fm_pcd_kg_extract_dflt_select {\n+\te_IOC_FM_PCD_KG_DFLT_GBL_0,\t/**< Default selection is KG register 0 */\n+\te_IOC_FM_PCD_KG_DFLT_GBL_1,\t/**< Default selection is KG register 1 */\n+\te_IOC_FM_PCD_KG_DFLT_PRIVATE_0,\t/**< Default selection is a per scheme register 0 */\n+\te_IOC_FM_PCD_KG_DFLT_PRIVATE_1,\t/**< Default selection is a per scheme register 1 */\n+\te_IOC_FM_PCD_KG_DFLT_ILLEGAL\t/**< Illegal selection */\n+} ioc_fm_pcd_kg_extract_dflt_select;\n+\n+/**\n+ @Description   Enumeration type defining all default groups - each group shares\n+\t\ta default value, one of four user-initialized values.\n+*/\n+typedef enum ioc_fm_pcd_kg_known_fields_dflt_types {\n+\te_IOC_FM_PCD_KG_MAC_ADDR,\t\t/**< MAC Address */\n+\te_IOC_FM_PCD_KG_TCI,\t\t\t/**< TCI field */\n+\te_IOC_FM_PCD_KG_ENET_TYPE,\t\t/**< ENET Type */\n+\te_IOC_FM_PCD_KG_PPP_SESSION_ID,\t/**< PPP Session id */\n+\te_IOC_FM_PCD_KG_PPP_PROTOCOL_ID,\t/**< PPP Protocol id */\n+\te_IOC_FM_PCD_KG_MPLS_LABEL,\t\t/**< MPLS label */\n+\te_IOC_FM_PCD_KG_IP_ADDR,\t\t/**< IP addr */\n+\te_IOC_FM_PCD_KG_PROTOCOL_TYPE,\t/**< Protocol type */\n+\te_IOC_FM_PCD_KG_IP_TOS_TC,\t\t/**< TOS or TC */\n+\te_IOC_FM_PCD_KG_IPV6_FLOW_LABEL,\t/**< IPV6 flow label */\n+\te_IOC_FM_PCD_KG_IPSEC_SPI,\t\t/**< IPSEC SPI */\n+\te_IOC_FM_PCD_KG_L4_PORT,\t\t/**< L4 Port */\n+\te_IOC_FM_PCD_KG_TCP_FLAG,\t\t/**< TCP Flag */\n+\te_IOC_FM_PCD_KG_GENERIC_FROM_DATA,\t/**< grouping implemented by SW,\n+\t\t\t\t\tany data extraction that is not the full\n+\t\t\t\t\tfield described above  */\n+\te_IOC_FM_PCD_KG_GENERIC_FROM_DATA_NO_V, /**< grouping implemented by SW,\n+\t\t\t\tany data extraction without validation */\n+\te_IOC_FM_PCD_KG_GENERIC_NOT_FROM_DATA   /**< grouping implemented by SW,\n+\t\t\t\t\textraction from parser result or\n+\t\t\t\t\tdirect use of default value  */\n+} ioc_fm_pcd_kg_known_fields_dflt_types;\n+\n+/**\n+ @Description   Enumeration type for defining header index for scenarios with\n+\t\tmultiple (tunneled) headers\n+*/\n+typedef enum ioc_fm_pcd_hdr_index {\n+\te_IOC_FM_PCD_HDR_INDEX_NONE\t=   0,\n+\t\t\t\t/**< used when multiple headers not used, also\n+\t\t\t\t\tto specify regular IP (not tunneled). */\n+\te_IOC_FM_PCD_HDR_INDEX_1,/**< may be used for VLAN, MPLS, tunneled IP */\n+\te_IOC_FM_PCD_HDR_INDEX_2,/**< may be used for MPLS, tunneled IP */\n+\te_IOC_FM_PCD_HDR_INDEX_3,/**< may be used for MPLS */\n+\te_IOC_FM_PCD_HDR_INDEX_LAST =   0xFF /**< may be used for VLAN, MPLS */\n+} ioc_fm_pcd_hdr_index;\n+\n+/**\n+ @Description   Enumeration type for selecting the policer profile functional type\n+*/\n+typedef enum ioc_fm_pcd_profile_type_selection {\n+\te_IOC_FM_PCD_PLCR_PORT_PRIVATE,\t\t/**< Port dedicated profile */\n+\te_IOC_FM_PCD_PLCR_SHARED\t/**< Shared profile (shared within partition) */\n+} ioc_fm_pcd_profile_type_selection;\n+\n+/**\n+ @Description   Enumeration type for selecting the policer profile algorithm\n+*/\n+typedef enum ioc_fm_pcd_plcr_algorithm_selection {\n+\te_IOC_FM_PCD_PLCR_PASS_THROUGH, /**< Policer pass through */\n+\te_IOC_FM_PCD_PLCR_RFC_2698,\t/**< Policer algorithm RFC 2698 */\n+\te_IOC_FM_PCD_PLCR_RFC_4115\t/**< Policer algorithm RFC 4115 */\n+} ioc_fm_pcd_plcr_algorithm_selection;\n+\n+/**\n+ @Description   Enumeration type for selecting a policer profile color mode\n+*/\n+typedef enum ioc_fm_pcd_plcr_color_mode {\n+\te_IOC_FM_PCD_PLCR_COLOR_BLIND,  /**< Color blind */\n+\te_IOC_FM_PCD_PLCR_COLOR_AWARE   /**< Color aware */\n+} ioc_fm_pcd_plcr_color_mode;\n+\n+/**\n+ @Description   Enumeration type for selecting a policer profile color\n+*/\n+typedef enum ioc_fm_pcd_plcr_color {\n+\te_IOC_FM_PCD_PLCR_GREEN,\t/**< Green */\n+\te_IOC_FM_PCD_PLCR_YELLOW,   /**< Yellow */\n+\te_IOC_FM_PCD_PLCR_RED,\t/**< Red */\n+\te_IOC_FM_PCD_PLCR_OVERRIDE  /**< Color override */\n+} ioc_fm_pcd_plcr_color;\n+\n+/**\n+ @Description   Enumeration type for selecting the policer profile packet frame length selector\n+*/\n+typedef enum ioc_fm_pcd_plcr_frame_length_select {\n+  e_IOC_FM_PCD_PLCR_L2_FRM_LEN,\t/**< L2 frame length */\n+  e_IOC_FM_PCD_PLCR_L3_FRM_LEN,\t/**< L3 frame length */\n+  e_IOC_FM_PCD_PLCR_L4_FRM_LEN,\t/**< L4 frame length */\n+  e_IOC_FM_PCD_PLCR_FULL_FRM_LEN\t/**< Full frame length */\n+} ioc_fm_pcd_plcr_frame_length_select;\n+\n+/**\n+ @Description   Enumeration type for selecting roll-back frame\n+*/\n+typedef enum ioc_fm_pcd_plcr_roll_back_frame_select {\n+  e_IOC_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN,\t/**< Rollback L2 frame length */\n+  e_IOC_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN   /**< Rollback Full frame length */\n+} ioc_fm_pcd_plcr_roll_back_frame_select;\n+\n+/**\n+ @Description   Enumeration type for selecting the policer profile packet or byte mode\n+*/\n+typedef enum ioc_fm_pcd_plcr_rate_mode {\n+\te_IOC_FM_PCD_PLCR_BYTE_MODE,\t/**< Byte mode */\n+\te_IOC_FM_PCD_PLCR_PACKET_MODE   /**< Packet mode */\n+} ioc_fm_pcd_plcr_rate_mode;\n+\n+/**\n+ @Description   Enumeration type for defining action of frame\n+*/\n+typedef enum ioc_fm_pcd_done_action {\n+\te_IOC_FM_PCD_ENQ_FRAME = 0,\t/**< Enqueue frame */\n+\te_IOC_FM_PCD_DROP_FRAME\t/**< Drop frame */\n+} ioc_fm_pcd_done_action;\n+\n+/**\n+ @Description   Enumeration type for selecting the policer counter\n+*/\n+typedef enum ioc_fm_pcd_plcr_profile_counters {\n+\te_IOC_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER,\t/**< Green packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER,\t/**< Yellow packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER,\t/**< Red packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER, /**< Recolored yellow packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER\t/**< Recolored red packets counter */\n+} ioc_fm_pcd_plcr_profile_counters;\n+\n+/**\n+ @Description   Enumeration type for selecting the PCD action after extraction\n+*/\n+typedef enum ioc_fm_pcd_action {\n+\te_IOC_FM_PCD_ACTION_NONE,\t\t/**< NONE  */\n+\te_IOC_FM_PCD_ACTION_EXACT_MATCH,\t/**< Exact match on the selected extraction*/\n+\te_IOC_FM_PCD_ACTION_INDEXED_LOOKUP\t/**< Indexed lookup on the selected extraction*/\n+} ioc_fm_pcd_action;\n+\n+/**\n+ @Description   Enumeration type for selecting type of insert manipulation\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_insrt_type {\n+\te_IOC_FM_PCD_MANIP_INSRT_GENERIC,\t/**< Insert according to offset & size */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR,\t/**< Insert according to protocol */\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_TEMPLATE\t/**< Insert template to start of frame */\n+#endif /* FM_CAPWAP_SUPPORT */\n+} ioc_fm_pcd_manip_hdr_insrt_type;\n+\n+/**\n+ @Description   Enumeration type for selecting type of remove manipulation\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_rmv_type {\n+\te_IOC_FM_PCD_MANIP_RMV_GENERIC,\t/**< Remove according to offset & size */\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR\t/**< Remove according to offset & size */\n+} ioc_fm_pcd_manip_hdr_rmv_type;\n+\n+/**\n+ @Description   An enum for selecting specific L2 fields removal\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_rmv_specific_l2 {\n+\te_IOC_FM_PCD_MANIP_HDR_RMV_ETHERNET,\t\t/**< Ethernet/802.3 MAC */\n+\te_IOC_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS,\t/**< stacked QTags */\n+\te_IOC_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS,\n+\t\t\t\t\t/**< MPLS and Ethernet/802.3 MAC header unitl\n+\t\t\t\t\tthe header which follows the MPLS header */\n+\te_IOC_FM_PCD_MANIP_HDR_RMV_MPLS\t/**< Remove MPLS header (Unlimited MPLS labels) */\n+} ioc_fm_pcd_manip_hdr_rmv_specific_l2;\n+\n+/**\n+ @Description   Enumeration type for selecting specific fields updates\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_field_update_type {\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN,\t/**< VLAN updates */\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4,\t/**< IPV4 updates */\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6,\t/**< IPV6 updates */\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP,\t/**< TCP_UDP updates */\n+} ioc_fm_pcd_manip_hdr_field_update_type;\n+\n+/**\n+ @Description   Enumeration type for selecting VLAN updates\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_field_update_vlan {\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI,\t/**< Replace VPri of outer most VLAN tag. */\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN\t/**< DSCP to VLAN priority bits translation */\n+} ioc_fm_pcd_manip_hdr_field_update_vlan;\n+\n+/**\n+ @Description   Enumeration type for selecting specific L2 fields removal\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_insrt_specific_l2 {\n+\te_IOC_FM_PCD_MANIP_HDR_INSRT_MPLS\t/**< Insert MPLS header (Unlimited MPLS labels) */\n+} ioc_fm_pcd_manip_hdr_insrt_specific_l2;\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Description   Enumeration type for selecting QoS mapping mode\n+\n+\t\tNote: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE'\n+\t\tUser should instruct the port to read the parser-result\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_qos_mapping_mode {\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE = 0, /**< No mapping, QoS field will not be changed */\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS, /**< QoS field will be overwritten by the last byte in the parser-result. */\n+} ioc_fm_pcd_manip_hdr_qos_mapping_mode;\n+\n+/**\n+ @Description   Enumeration type for selecting QoS source\n+\n+\t\tNote: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'\n+\t\tUser should left room for the parser-result on input/output buffer\n+\t\tand instruct the port to read/write the parser-result to the buffer (RPD should be set)\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_qos_src {\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_SRC_NONE = 0, /**< TODO */\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED, /**< QoS will be taken from the last byte in the parser-result. */\n+} ioc_fm_pcd_manip_hdr_qos_src;\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/**\n+ @Description   Enumeration type for selecting type of header insertion\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_insrt_by_hdr_type {\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2,/**< Specific L2 fields insertion */\n+#if (DPAA_VERSION >= 11)\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_IP,\t\t/**< IP insertion */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_UDP,\t\t/**< UDP insertion */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE,\t/**< UDP lite insertion */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP\t\t/**< CAPWAP insertion */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_pcd_manip_hdr_insrt_by_hdr_type;\n+\n+/**\n+ @Description   Enumeration type for selecting specific custom command\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_custom_type {\n+\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE,\t/**< Replace IPv4/IPv6 */\n+\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_GEN_FIELD_REPLACE,\n+} ioc_fm_pcd_manip_hdr_custom_type;\n+\n+/**\n+ @Description   Enumeration type for selecting specific custom command\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_custom_ip_replace {\n+\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6, /**< Replace IPv4 by IPv6 */\n+\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4  /**< Replace IPv6 by IPv4 */\n+} ioc_fm_pcd_manip_hdr_custom_ip_replace;\n+\n+/**\n+ @Description   Enumeration type for selecting type of header removal\n+*/\n+typedef enum ioc_fm_pcd_manip_hdr_rmv_by_hdr_type {\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2 = 0,/**< Specific L2 fields removal */\n+#if (DPAA_VERSION >= 11)\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP,\t\t/**< CAPWAP removal */\n+#endif /* (DPAA_VERSION >= 11) */\n+#if (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR_FROM_START,/**< Locate from data that is not the header */\n+#endif /* (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */\n+} ioc_fm_pcd_manip_hdr_rmv_by_hdr_type;\n+\n+/**\n+ @Description   Enumeration type for selecting type of timeout mode\n+*/\n+typedef enum ioc_fm_pcd_manip_reassem_time_out_mode {\n+\te_IOC_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES,\n+\t\t\t\t\t/**< Limits the time of the reassembly process\n+\t\t\t\t\t\tfrom the first fragment to the last */\n+\te_IOC_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG\n+\t\t\t\t\t/**< Limits the time of receiving the fragment */\n+} ioc_fm_pcd_manip_reassem_time_out_mode;\n+\n+/**\n+ @Description   Enumeration type for selecting type of WaysNumber mode\n+*/\n+typedef enum ioc_fm_pcd_manip_reassem_ways_number {\n+\te_IOC_FM_PCD_MANIP_ONE_WAY_HASH = 1,\t/**< One way hash\t*/\n+\te_IOC_FM_PCD_MANIP_TWO_WAYS_HASH,\t/**< Two ways hash   */\n+\te_IOC_FM_PCD_MANIP_THREE_WAYS_HASH,\t/**< Three ways hash */\n+\te_IOC_FM_PCD_MANIP_FOUR_WAYS_HASH,\t/**< Four ways hash  */\n+\te_IOC_FM_PCD_MANIP_FIVE_WAYS_HASH,\t/**< Five ways hash  */\n+\te_IOC_FM_PCD_MANIP_SIX_WAYS_HASH,\t/**< Six ways hash   */\n+\te_IOC_FM_PCD_MANIP_SEVEN_WAYS_HASH,\t/**< Seven ways hash */\n+\te_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH\t/**< Eight ways hash */\n+} ioc_fm_pcd_manip_reassem_ways_number;\n+\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+/**\n+ @Description   Enumeration type for selecting type of statistics mode\n+*/\n+typedef enum ioc_fm_pcd_stats {\n+\te_IOC_FM_PCD_STATS_PER_FLOWID = 0\t/**< Flow ID is used as index for getting statistics */\n+} ioc_fm_pcd_stats;\n+#endif\n+\n+/**\n+ @Description   Enumeration type for selecting manipulation type\n+*/\n+typedef enum ioc_fm_pcd_manip_type {\n+\te_IOC_FM_PCD_MANIP_HDR = 0,\t\t/**< Header manipulation */\n+\te_IOC_FM_PCD_MANIP_REASSEM,\t\t/**< Reassembly */\n+\te_IOC_FM_PCD_MANIP_FRAG,\t\t/**< Fragmentation */\n+\te_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD\t/**< Special Offloading */\n+} ioc_fm_pcd_manip_type;\n+\n+/**\n+ @Description   Enumeration type for selecting type of statistics mode\n+*/\n+typedef enum ioc_fm_pcd_cc_stats_mode {\n+\te_IOC_FM_PCD_CC_STATS_MODE_NONE = 0,\t/**< No statistics support */\n+\te_IOC_FM_PCD_CC_STATS_MODE_FRAME,\t/**< Frame count statistics */\n+\te_IOC_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME,  /**< Byte and frame count statistics */\n+#if (DPAA_VERSION >= 11)\n+\te_IOC_FM_PCD_CC_STATS_MODE_RMON,/**< Byte and frame length range count statistics */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_pcd_cc_stats_mode;\n+\n+/**\n+ @Description   Enumeration type for determining the action in case an IP packet\n+\t\tis larger than MTU but its DF (Don't Fragment) bit is set.\n+*/\n+typedef enum ioc_fm_pcd_manip_dont_frag_action {\n+\te_IOC_FM_PCD_MANIP_DISCARD_PACKET = 0,\t/**< Discard packet */\n+\te_IOC_FM_PCD_MANIP_ENQ_TO_ERR_Q_OR_DISCARD_PACKET =  e_IOC_FM_PCD_MANIP_DISCARD_PACKET,\n+\t\t\t\t\t/**< Obsolete, cannot enqueue to error queue;\n+\t\t\t\t\t\tIn practice, selects to discard packets;\n+\t\t\t\t\t\tWill be removed in the future */\n+\te_IOC_FM_PCD_MANIP_FRAGMENT_PACKECT,\t/**< Fragment packet and continue normal processing */\n+\te_IOC_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG\t/**< Continue normal processing without fragmenting the packet */\n+} ioc_fm_pcd_manip_dont_frag_action;\n+\n+/**\n+ @Description   Enumeration type for selecting type of special offload manipulation\n+*/\n+typedef enum ioc_fm_pcd_manip_special_offload_type {\n+\te_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC,/**< IPSec offload manipulation */\n+#if (DPAA_VERSION >= 11)\n+\te_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP/**< CAPWAP offload manipulation */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_pcd_manip_special_offload_type;\n+\n+/**\n+ @Description   A union of protocol dependent special options\n+\t\t(Must match union u_FmPcdHdrProtocolOpt defined in fm_pcd_ext.h)\n+*/\n+typedef union ioc_fm_pcd_hdr_protocol_opt_u {\n+\tioc_eth_protocol_opt_t\teth_opt;\t/**< Ethernet options */\n+\tioc_vlan_protocol_opt_t   vlan_opt;\t/**< Vlan options */\n+\tioc_mpls_protocol_opt_t   mpls_opt;\t/**< MPLS options */\n+\tioc_ipv4_protocol_opt_t   ipv4_opt;\t/**< IPv4 options */\n+\tioc_ipv6_protocol_opt_t   ipv6_opt;\t/**< IPv6 options */\n+#if (DPAA_VERSION >= 11)\n+\tioc_capwap_protocol_opt_t capwap_opt;  /**< CAPWAP options */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_pcd_hdr_protocol_opt_u;\n+\n+/**\n+ @Description   A union holding all known protocol fields\n+*/\n+typedef union ioc_fm_pcd_fields_u {\n+\tioc_header_field_eth_t\t\teth;\t\t/**< Ethernet*/\n+\tioc_header_field_vlan_t\t\tvlan;\t/**< VLAN*/\n+\tioc_header_field_llc_snap_t\tllc_snap;\t/**< LLC SNAP*/\n+\tioc_header_field_pppoe_t\t\tpppoe;\t/**< PPPoE*/\n+\tioc_header_field_mpls_t\t\tmpls;\t/**< MPLS*/\n+\tioc_header_field_ip_t\t\tip;\t\t/**< IP\t*/\n+\tioc_header_field_ipv4_t\t\tipv4;\t/**< IPv4*/\n+\tioc_header_field_ipv6_t\t\tipv6;\t/**< IPv6*/\n+\tioc_header_field_udp_t\t\tudp;\t\t/**< UDP\t*/\n+\tioc_header_field_udp_lite_t\tudp_lite;\t/**< UDP_Lite*/\n+\tioc_header_field_tcp_t\t\ttcp;\t\t/**< TCP\t*/\n+\tioc_header_field_sctp_t\t\tsctp;\t/**< SCTP*/\n+\tioc_header_field_dccp_t\t\tdccp;\t/**< DCCP*/\n+\tioc_header_field_gre_t\t\tgre;\t\t/**< GRE\t*/\n+\tioc_header_field_minencap_t\tminencap;/**< Minimal Encapsulation  */\n+\tioc_header_field_ipsec_ah_t\tipsec_ah;\t/**< IPSec AH*/\n+\tioc_header_field_ipsec_esp_t\tipsec_esp;\t/**< IPSec ESP*/\n+\tioc_header_field_udp_encap_esp_t\tudp_encap_esp;\n+\t\t\t\t\t\t/**< UDP Encapsulation ESP  */\n+} ioc_fm_pcd_fields_u;\n+\n+/**\n+ @Description   Parameters for defining header extraction for key generation\n+*/\n+typedef struct ioc_fm_pcd_from_hdr_t {\n+\tuint8_t\t\tsize;\t/**< Size in byte */\n+\tuint8_t\t\toffset;\t/**< Byte offset */\n+} ioc_fm_pcd_from_hdr_t;\n+\n+/**\n+ @Description   Parameters for defining field extraction for key generation\n+*/\n+typedef struct ioc_fm_pcd_from_field_t {\n+\tioc_fm_pcd_fields_u field;\t/**< Field selection */\n+\tuint8_t\t\tsize;\t/**< Size in byte */\n+\tuint8_t\t\toffset;\t/**< Byte offset */\n+} ioc_fm_pcd_from_field_t;\n+\n+/**\n+ @Description   Parameters for defining a single network environment unit\n+\t\tA distinction unit should be defined if it will later be used\n+\t\tby one or more PCD engines to distinguish between flows.\n+\t\t(Must match struct t_FmPcdDistinctionUnit defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_distinction_unit_t {\n+\tstruct {\n+\tioc_net_header_type\thdr;/**< One of the headers supported by the FM */\n+\tioc_fm_pcd_hdr_protocol_opt_u  opt;\t/**< Select only one option! */\n+\t} hdrs[IOC_FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS];\n+} ioc_fm_pcd_distinction_unit_t;\n+\n+/**\n+ @Description   Parameters for defining all different distinction units supported\n+\t\tby a specific PCD Network Environment Characteristics module.\n+\n+\t\tEach unit represent a protocol or a group of protocols that may\n+\t\tbe used later by the different PCD engines to distinguish between flows.\n+\t\t(Must match struct t_FmPcdNetEnvParams defined in fm_pcd_ext.h)\n+*/\n+struct fm_pcd_net_env_params_t {\n+\tuint8_t num_of_distinction_units;\n+\t/**< Number of different units to be identified */\n+\tioc_fm_pcd_distinction_unit_t\n+\t\tunits[IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];\n+\t/**< An array of num_of_distinction_units of the\n+\t\tdifferent units to be identified */\n+};\n+\n+typedef struct ioc_fm_pcd_net_env_params_t {\n+\tstruct fm_pcd_net_env_params_t param;\n+\tvoid\t\t\t\t*id;\n+\t\t/**< Output parameter; Returns the net-env Id to be used */\n+} ioc_fm_pcd_net_env_params_t;\n+\n+/**\n+ @Description   Parameters for defining a single extraction action when\n+\t\tcreating a key\n+*/\n+typedef struct ioc_fm_pcd_extract_entry_t {\n+\tioc_fm_pcd_extract_type\t\ttype;\t/**< Extraction type select */\n+\tunion {\n+\tstruct {\n+\t\tioc_net_header_type\thdr;\t\t/**< Header selection */\n+\t\tbool\t\t\tignore_protocol_validation;\n+\t\t\t\t\t\t/**< Ignore protocol validation */\n+\t\tioc_fm_pcd_hdr_index\thdr_index;\n+\t\t\t\t\t/**< Relevant only for MPLS, VLAN and tunneled\n+\t\t\t\t\t\tIP. Otherwise should be cleared.*/\n+\t\tioc_fm_pcd_extract_by_hdr_type  type;\n+\t\t\t\t\t/**< Header extraction type select */\n+\t\tunion {\n+\t\tioc_fm_pcd_from_hdr_t\tfrom_hdr;\n+\t\t\t\t\t/**< Extract bytes from header parameters */\n+\t\tioc_fm_pcd_from_field_t\tfrom_field;\n+\t\t\t\t\t/**< Extract bytes from field parameters */\n+\t\tioc_fm_pcd_fields_u\tfull_field;\n+\t\t\t\t\t/**< Extract full field parameters */\n+\t\t} extract_by_hdr_type;\n+\t} extract_by_hdr;/**< Used when type = e_IOC_FM_PCD_KG_EXTRACT_BY_HDR */\n+\tstruct {\n+\t\tioc_fm_pcd_extract_from\tsrc;\t/**< Non-header extraction source */\n+\t\tioc_fm_pcd_action\taction;\t/**< Relevant for CC Only */\n+\t\tuint16_t\tic_indx_mask;   /**< Relevant only for CC when\n+\t\t\t\taction = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP;\n+\t\t\t\tNote that the number of bits that are set within\n+\t\t\t\tthis mask must be log2 of the CC-node 'num_of_keys'.\n+\t\t\t\tNote that the mask cannot be set on the lower bits. */\n+\t\tuint8_t\t\t\toffset;\t/**< Byte offset */\n+\t\tuint8_t\t\t\tsize;\t/**< Size in bytes */\n+\t} extract_non_hdr;\n+\t\t/**< Used when type = e_IOC_FM_PCD_KG_EXTRACT_NON_HDR */\n+\t} extract_params;\n+} ioc_fm_pcd_extract_entry_t;\n+\n+/**\n+ @Description   A structure for defining masks for each extracted\n+\t\tfield in the key.\n+*/\n+typedef struct ioc_fm_pcd_kg_extract_mask_t {\n+\tuint8_t\t\textract_array_index;\t/**< Index in the extraction array, as initialized by user */\n+\tuint8_t\t\toffset;\t\t\t/**< Byte offset */\n+\tuint8_t\t\tmask;\t\t\t/**< A byte mask (selected bits will be ignored) */\n+} ioc_fm_pcd_kg_extract_mask_t;\n+\n+/**\n+ @Description   A structure for defining default selection per groups\n+\t\tof fields\n+*/\n+typedef struct ioc_fm_pcd_kg_extract_dflt_t {\n+\tioc_fm_pcd_kg_known_fields_dflt_types\ttype;\t/**< Default type select*/\n+\tioc_fm_pcd_kg_extract_dflt_select\tdflt_select;   /**< Default register select */\n+} ioc_fm_pcd_kg_extract_dflt_t;\n+\n+\n+/**\n+ @Description   A structure for defining all parameters needed for\n+\t\tgeneration a key and using a hash function\n+*/\n+typedef struct ioc_fm_pcd_kg_key_extract_and_hash_params_t {\n+\tuint32_t\t\t\t\tprivate_dflt0;\t/**< Scheme default register 0 */\n+\tuint32_t\t\t\t\tprivate_dflt1;\t/**< Scheme default register 1 */\n+\tuint8_t\t\t\t\tnum_of_used_extracts;   /**< defines the valid size of the following array */\n+\tioc_fm_pcd_extract_entry_t\textract_array[IOC_FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];\n+\t\t\t\t\t/**< An array of extraction definitions. */\n+\tuint8_t\t\t\t\tnum_of_used_dflts;\t/**< defines the valid size of the following array */\n+\tioc_fm_pcd_kg_extract_dflt_t\tdflts[IOC_FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];\n+\t\t\t/**< For each extraction used in this scheme, specify the required\n+\t\t\tdefault register to be used when header is not found.\n+\t\t\ttypes not specified in this array will get undefined value. */\n+\tuint8_t\t\t\t\tnum_of_used_masks;\t/**< Defines the valid size of the following array */\n+\tioc_fm_pcd_kg_extract_mask_t\tmasks[IOC_FM_PCD_KG_NUM_OF_EXTRACT_MASKS];\n+\tuint8_t\t\t\t\thash_shift;\t\t/**< Hash result right shift.\n+\t\t\t\t\tSelects the 24 bits out of the 64 hash result.\n+\t\t\t\t\t0 means using the 24 LSB's, otherwise use the\n+\t\t\t\t\t24 LSB's after shifting right.*/\n+\tuint32_t\t\t\t\thash_distribution_num_of_fqids; /**< must be > 1 and a power of 2. Represents the range\n+\t\t\t\t\tof queues for the key and hash functionality */\n+\tuint8_t\t\t\t\thash_distribution_fqids_shift;  /**< selects the FQID bits that will be effected by the hash */\n+\tbool\t\t\t\tsymmetric_hash;\t/**< TRUE to generate the same hash for frames with swapped source and\n+\t\t\tdestination fields on all layers; If TRUE, driver will check that for\n+\t\t\tall layers, if SRC extraction is selected, DST extraction must also be\n+\t\t\tselected, and vice versa. */\n+} ioc_fm_pcd_kg_key_extract_and_hash_params_t;\n+\n+/**\n+ @Description   A structure of parameters for defining a single\n+\t\tQid mask (extracted OR).\n+*/\n+typedef struct ioc_fm_pcd_kg_extracted_or_params_t {\n+\tioc_fm_pcd_extract_type\t\ttype;\t\t/**< Extraction type select */\n+\tunion {\n+\tstruct {\t\t\t\t\t\t/**< used when type = e_IOC_FM_PCD_KG_EXTRACT_BY_HDR */\n+\t\tioc_net_header_type\t\thdr;\n+\t\tioc_fm_pcd_hdr_index\t\thdr_index;\t/**< Relevant only for MPLS, VLAN and tunneled\n+\t\t\t\t\t\t\t\tIP. Otherwise should be cleared.*/\n+\t\tbool\t\t\t\tignore_protocol_validation;\n+\n+\t} extract_by_hdr;\n+\tioc_fm_pcd_extract_from\t\tsrc;\t\t/**< used when type = e_IOC_FM_PCD_KG_EXTRACT_NON_HDR */\n+\t} extract_params;\n+\tuint8_t\t\t\t\textraction_offset;  /**< Offset for extraction */\n+\tioc_fm_pcd_kg_extract_dflt_select\tdflt_value;\t/**< Select register from which extraction is taken if\n+\t\t\t\t\t\t\t\tfield not found */\n+\tuint8_t\t\t\t\tmask;\t\t/**< Mask LSB byte of extraction (specified bits are ignored) */\n+\tuint8_t\t\t\tbit_offset_in_fqid;\n+\t\t/**< 0-31, Selects which bits of the 24 FQID bits to effect using\n+\t\tthe extracted byte; Assume byte is placed as the 8 MSB's in\n+\t\ta 32 bit word where the lower bits\n+\t\tare the FQID; i.e if bitOffsetInFqid=1 than its LSB\n+\t\twill effect the FQID MSB, if bitOffsetInFqid=24 than the\n+\t\textracted byte will effect the 8 LSB's of the FQID,\n+\t\tif bitOffsetInFqid=31 than the byte's MSB will effect\n+\t\tthe FQID's LSB; 0 means - no effect on FQID;\n+\t\tNote that one, and only one of\n+\t\tbitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,\n+\t\textracted byte must effect either FQID or Policer profile).*/\n+\tuint8_t\t\t\tbit_offset_in_plcr_profile;\n+\t/**< 0-15, Selects which bits of the 8 policer profile id bits to\n+\t\teffect using the extracted byte; Assume byte is placed\n+\t\tas the 8 MSB's in a 16 bit word where the lower bits\n+\t\tare the policer profile id; i.e if bitOffsetInPlcrProfile=1\n+\t\tthan its LSB will effect the profile MSB, if bitOffsetInFqid=8\n+\t\tthan the extracted byte will effect the whole policer profile id,\n+\t\tif bitOffsetInFqid=15 than the byte's MSB will effect\n+\t\tthe Policer Profile id's LSB;\n+\t\t0 means - no effect on policer profile; Note that one, and only one of\n+\t\tbitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,\n+\t\textracted byte must effect either FQID or Policer profile).*/\n+} ioc_fm_pcd_kg_extracted_or_params_t;\n+\n+/**\n+ @Description   A structure for configuring scheme counter\n+*/\n+typedef struct ioc_fm_pcd_kg_scheme_counter_t {\n+\tbool\tupdate;\t/**< FALSE to keep the current counter state\n+\t\t\t\tand continue from that point, TRUE to update/reset\n+\t\t\t\tthe counter when the scheme is written. */\n+\tuint32_t\tvalue;\t/**< If update=TRUE, this value will be written into the\n+\t\t\t\tcounter; clear this field to reset the counter. */\n+} ioc_fm_pcd_kg_scheme_counter_t;\n+\n+\n+/**\n+ @Description   A structure for retrieving FMKG_SE_SPC\n+*/\n+typedef struct ioc_fm_pcd_kg_scheme_spc_t {\n+\tuint32_t\tval;\t/**< return value */\n+\tvoid\t*id;\t/**< scheme handle */\n+} ioc_fm_pcd_kg_scheme_spc_t;\n+\n+/**\n+ @Description   A structure for defining policer profile parameters as required by keygen\n+\t\t(when policer is the next engine after this scheme).\n+\t\t(Must match struct t_FmPcdKgPlcrProfile defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_kg_plcr_profile_t {\n+\tbool\t\tshared_profile;\t\t/**< TRUE if this profile is shared between ports\n+\t\t\t\t(i.e. managed by master partition) May not be TRUE\n+\t\t\t\tif profile is after Coarse Classification*/\n+\tbool\t\tdirect;\t\t\t/**< If TRUE, direct_relative_profile_id only selects the profile\n+\t\t\t\tid, if FALSE fqid_offset_relative_profile_id_base is used\n+\t\t\t\ttogether with fqid_offset_shift and num_of_profiles\n+\t\t\t\tparameters, to define a range of profiles from\n+\t\t\t\twhich the KeyGen result will determine the\n+\t\t\t\tdestination policer profile.  */\n+\tunion {\n+\tuint16_t\tdirect_relative_profile_id;\t/**< Used if 'direct' is TRUE, to select policer profile.\n+\t\tThis parameter should indicate the policer profile offset within the port's\n+\t\tpolicer profiles or SHARED window. */\n+\tstruct {\n+\t\tuint8_t\tfqid_offset_shift;\t\t/**< Shift of KG results without the qid base */\n+\t\tuint8_t\tfqid_offset_relative_profile_id_base;\n+\t\t\t/**< OR of KG results without the qid base\n+\t\t\t\tThis parameter should indicate the policer profile\n+\t\t\t\toffset within the port's policer profiles window\n+\t\t\t\tor SHARED window depends on shared_profile */\n+\t\tuint8_t\tnum_of_profiles;\t\t/**< Range of profiles starting at base */\n+\t} indirect_profile;\t\t\t\t/**< Indirect profile parameters */\n+\t} profile_select;\t\t\t\t/**< Direct/indirect profile selection and parameters */\n+} ioc_fm_pcd_kg_plcr_profile_t;\n+\n+#if DPAA_VERSION >= 11\n+/**\n+ @Description   Parameters for configuring a storage profile for a KeyGen scheme.\n+*/\n+typedef struct ioc_fm_pcd_kg_storage_profile_t {\n+\tbool\tdirect;\n+\t/**< If TRUE, directRelativeProfileId only selects the\n+\t\tprofile id;\n+\t\tIf FALSE, fqidOffsetRelativeProfileIdBase is used\n+\t\ttogether with fqidOffsetShift and numOfProfiles\n+\t\tparameters to define a range of profiles from which\n+\t\tthe KeyGen result will determine the destination\n+\t\tstorage profile. */\n+\tunion {\n+\t\tuint16_t\tdirect_relative_profileId;\n+\t\t/**< Used when 'direct' is TRUE, to select a storage profile;\n+\t\t\tshould indicate the storage profile offset within the\n+\t\t\tport's storage profiles window. */\n+\t\tstruct {\n+\t\t\tuint8_t\tfqid_offset_shift;\n+\t\t\t/**< Shift of KeyGen results without the FQID base */\n+\t\t\tuint8_t\tfqid_offset_relative_profile_id_base;\n+\t\t\t/**< OR of KeyGen results without the FQID base;\n+\t\t\t\tshould indicate the policer profile offset within the\n+\t\t\t\tport's storage profiles window. */\n+\t\t\tuint8_t\tnum_of_profiles;\n+\t\t\t/**< Range of profiles starting at base. */\n+\t\t} indirect_profile;\n+\t\t/**< Indirect profile parameters. */\n+\t} profile_select;\n+\t/**< Direct/indirect profile selection and parameters. */\n+} ioc_fm_pcd_kg_storage_profile_t;\n+#endif /* DPAA_VERSION >= 11 */\n+\n+/**\n+ @Description   Parameters for defining CC as the next engine after KeyGen\n+\t\t(Must match struct t_FmPcdKgCc defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_kg_cc_t {\n+\tvoid\t\t\t\t*tree_id;\t/**< CC Tree id */\n+\tuint8_t\t\t\tgrp_id;\t\t/**< CC group id within the CC tree */\n+\tbool\t\t\t\tplcr_next;\t/**< TRUE if after CC, in case of data frame,\n+\t\t\t\t\t\t\t\tpolicing is required. */\n+\tbool\t\t\t\tbypass_plcr_profile_generation;\n+\t\t\t/**< TRUE to bypass KeyGen policer profile generation;\n+\t\t\t\tselected profile is the one set at port initialization. */\n+\tioc_fm_pcd_kg_plcr_profile_t\tplcr_profile;\t/**< Valid only if plcr_next = TRUE and\n+\t\t\t\t\tbypass_plcr_profile_generation = FALSE */\n+} ioc_fm_pcd_kg_cc_t;\n+\n+/**\n+ @Description   Parameters for defining initializing a KeyGen scheme\n+\t\t(Must match struct t_FmPcdKgSchemeParams defined in fm_pcd_ext.h)\n+*/\n+struct fm_pcd_kg_scheme_params_t {\n+\tbool modify;\t/**< TRUE to change an existing scheme */\n+\tunion {\n+\t\tuint8_t relative_scheme_id;\n+\t\t/**< if modify=FALSE: partition-relative scheme id */\n+\t\tvoid *scheme_id;\n+\t\t/**< if modify=TRUE: the id of an existing scheme */\n+\t} scm_id;\n+\tbool always_direct;  /**< This scheme is reached only directly,\n+\t\t\t\t\t\ti.e. no need for match vector;\n+\t\t\t\t\t\tKeyGen will ignore it when matching */\n+\tstruct {\n+\t\t/**< HL relevant only if always_direct=FALSE */\n+\t\tvoid *net_env_id;\n+\t\t/**< The id of the Network Environment as returned\n+\t\t\tby FM_PCD_NetEnvCharacteristicsSet() */\n+\t\tuint8_t num_of_distinction_units;\n+\t\t/**< Number of NetEnv units listed in unit_ids array */\n+\t\tuint8_t unit_ids[IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];\n+\t\t/**< Indexes as passed to SetNetEnvCharacteristics (?) array */\n+\t} net_env_params;\n+\tbool use_hash;\n+\t/**< use the KG Hash functionality */\n+\tioc_fm_pcd_kg_key_extract_and_hash_params_t key_extract_and_hash_params;\n+\t/**< used only if useHash = TRUE */\n+\tbool bypass_fqid_generation;\n+\t/**< Normally - FALSE, TRUE to avoid FQID update in the IC;\n+\t\tIn such a case FQID after KG will be the default FQID\n+\t\tdefined for the relevant port, or the FQID defined by CC\n+\t\tin cases where CC was the previous engine. */\n+\tuint32_t base_fqid;\n+\t/**< Base FQID; Relevant only if bypass_fqid_generation = FALSE;\n+\t\tIf hash is used and an even distribution is expected\n+\t\taccording to hash_distribution_num_of_fqids, base_fqid must be aligned to\n+\t\thash_distribution_num_of_fqids. */\n+\tuint8_t num_of_used_extracted_ors;\n+\t/**< Number of FQID masks listed in extracted_ors array*/\n+\tioc_fm_pcd_kg_extracted_or_params_t\n+\t\textracted_ors[IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS];\n+\t/**< IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS\n+\t\tregisters are shared between qid_masks\n+\t\tfunctionality and some of the extraction\n+\t\tactions; Normally only some will be used\n+\t\tfor qid_mask. Driver will return error if\n+\t\tresource is full at initialization time. */\n+#if DPAA_VERSION >= 11\n+\tbool override_storage_profile;\n+\t/**< TRUE if KeyGen override previously decided storage profile */\n+\tioc_fm_pcd_kg_storage_profile_t storage_profile;\n+\t/**< Used when override_storage_profile=TRUE */\n+#endif /* DPAA_VERSION >= 11 */\n+\tioc_fm_pcd_engine next_engine;\n+\t/**< may be BMI, PLCR or CC */\n+\tunion {\n+\t\t/**< depends on nextEngine */\n+\t\tioc_fm_pcd_done_action done_action;\n+\t\t/**< Used when next engine is BMI (done) */\n+\t\tioc_fm_pcd_kg_plcr_profile_t plcr_profile;\n+\t\t/**< Used when next engine is PLCR */\n+\t\tioc_fm_pcd_kg_cc_t cc;\n+\t\t/**< Used when next engine is CC */\n+\t} kg_next_engine_params;\n+\tioc_fm_pcd_kg_scheme_counter_t scheme_counter;\n+\t/**< A structure of parameters for updating the scheme counter */\n+};\n+\n+typedef struct ioc_fm_pcd_kg_scheme_params_t {\n+\tstruct fm_pcd_kg_scheme_params_t param;\n+\tvoid *id;\n+\t/**< Returns the scheme Id to be used */\n+} ioc_fm_pcd_kg_scheme_params_t;\n+\n+/**\n+ @Collection\n+*/\n+#if DPAA_VERSION >= 11\n+#define IOC_FM_PCD_CC_STATS_MAX_NUM_OF_FLR\t10  /* Maximal supported number of frame length ranges */\n+#define IOC_FM_PCD_CC_STATS_FLR_SIZE\t\t2   /* Size in bytes of a frame length range limit */\n+#endif /* DPAA_VERSION >= 11 */\n+#define IOC_FM_PCD_CC_STATS_FLR_COUNT_SIZE\t4   /* Size in bytes of a frame length range counter */\n+/* @} */\n+\n+/**\n+ @Description   Parameters for defining CC as the next engine after a CC node.\n+\t\t(Must match struct t_FmPcdCcNextCcParams defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_cc_params_t {\n+\tvoid\t*cc_node_id;\t\t\t\t/**< Id of the next CC node */\n+} ioc_fm_pcd_cc_next_cc_params_t;\n+\n+#if DPAA_VERSION >= 11\n+/**\n+ @Description   A structure for defining Frame Replicator as the next engine after a CC node.\n+\t\t(Must match struct t_FmPcdCcNextFrParams defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_fr_params_t {\n+\tvoid *frm_replic_id;\t\t/**< The id of the next frame replicator group */\n+} ioc_fm_pcd_cc_next_fr_params_t;\n+#endif /* DPAA_VERSION >= 11 */\n+\n+/**\n+ @Description   A structure for defining PLCR params when PLCR is the\n+\t\tnext engine after a CC node\n+\t\t(Must match struct t_FmPcdCcNextPlcrParams defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_plcr_params_t {\n+\tbool\toverride_params;\t\t/**< TRUE if CC override previously decided parameters*/\n+\tbool\tshared_profile;\t\t/**< Relevant only if overrideParams=TRUE:\n+\t\t\t\t\t\tTRUE if this profile is shared between ports */\n+\tuint16_t\tnew_relative_profile_id;\t/**< Relevant only if overrideParams=TRUE:\n+\t\t\t\t(otherwise profile id is taken from keygen);\n+\t\t\t\tThis parameter should indicate the policer\n+\t\t\t\tprofile offset within the port's\n+\t\t\t\tpolicer profiles or from SHARED window.*/\n+\tuint32_t\tnew_fqid;\t\t/**< Relevant only if overrideParams=TRUE:\n+\t\t\t\tFQID for enquing the frame;\n+\t\t\t\tIn earlier chips  if policer next engine is KEYGEN,\n+\t\t\t\tthis parameter can be 0, because the KEYGEN always decides\n+\t\t\t\tthe enqueue FQID.*/\n+#if DPAA_VERSION >= 11\n+\tuint8_t\tnew_relative_storage_profile_id;\n+\t\t\t\t\t\t/**< Indicates the relative storage profile offset within\n+\t\t\t\t\t\tthe port's storage profiles window;\n+\t\t\t\t\t\tRelevant only if the port was configured with VSP. */\n+#endif /* DPAA_VERSION >= 11 */\n+} ioc_fm_pcd_cc_next_plcr_params_t;\n+\n+/**\n+ @Description   A structure for defining enqueue params when BMI is the\n+\t\tnext engine after a CC node\n+\t\t(Must match struct t_FmPcdCcNextEnqueueParams defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_enqueue_params_t {\n+\tioc_fm_pcd_done_action  action;\t/**< Action - when next engine is BMI (done) */\n+\tbool\t\t\toverride_fqid;  /**< TRUE if CC override previously decided fqid and vspid,\n+\t\t\t\t\t\trelevant if action = e_IOC_FM_PCD_ENQ_FRAME */\n+\tuint32_t\t\tnew_fqid;\t/**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame\n+\t\t\t\t(otherwise FQID is taken from KeyGen),\n+\t\t\t\trelevant if action = e_IOC_FM_PCD_ENQ_FRAME*/\n+#if DPAA_VERSION >= 11\n+\tuint8_t\t\tnew_relative_storage_profile_id;\n+\t\t\t/**< Valid if override_fqid=TRUE, Indicates the relative virtual\n+\t\t\tstorage profile offset within the port's storage profiles\n+\t\t\twindow; Relevant only if the port was configured with VSP. */\n+#endif /* DPAA_VERSION >= 11 */\n+\n+} ioc_fm_pcd_cc_next_enqueue_params_t;\n+\n+/**\n+ @Description   A structure for defining KG params when KG is the next engine after a CC node\n+\t\t(Must match struct t_FmPcdCcNextKgParams defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_kg_params_t {\n+\tbool\toverride_fqid;\t\t/**< TRUE if CC override previously decided fqid and vspid,\n+\t\t\t\t\t\tNote - this parameters are irrelevant for earlier chips */\n+\tuint32_t   new_fqid;\t\t\t/**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame\n+\t\t\t\t(otherwise FQID is taken from KeyGen),\n+\t\t\t\tNote - this parameters are irrelevant for earlier chips */\n+#if DPAA_VERSION >= 11\n+\tuint8_t\t\tnew_relative_storage_profile_id;\n+\t\t\t/**< Valid if override_fqid=TRUE, Indicates the relative virtual\n+\t\t\tstorage profile offset within the port's storage profiles\n+\t\t\twindow; Relevant only if the port was configured with VSP. */\n+#endif /* DPAA_VERSION >= 11 */\n+\tvoid\t*p_direct_scheme;\t\t/**< Direct scheme id to go to. */\n+} ioc_fm_pcd_cc_next_kg_params_t;\n+\n+/**\n+ @Description   Parameters for defining the next engine after a CC node.\n+\t\t(Must match struct ioc_fm_pcd_cc_next_engine_params_t defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_next_engine_params_t {\n+\tioc_fm_pcd_engine\t\t\tnext_engine;\t/**< User has to initialize parameters\n+\t\t\t\t\t\t\t\taccording to nextEngine definition */\n+\tunion {\n+\t\tioc_fm_pcd_cc_next_cc_params_t\tcc_params;\t/**< Parameters in case next engine is CC */\n+\t\tioc_fm_pcd_cc_next_plcr_params_t\tplcr_params;\t/**< Parameters in case next engine is PLCR */\n+\t\tioc_fm_pcd_cc_next_enqueue_params_t enqueue_params; /**< Parameters in case next engine is BMI */\n+\t\tioc_fm_pcd_cc_next_kg_params_t\tkg_params;\t/**< Parameters in case next engine is KG */\n+#if DPAA_VERSION >= 11\n+\t\tioc_fm_pcd_cc_next_fr_params_t\tfr_params;\t/**< Parameters in case next engine is FR */\n+#endif /* DPAA_VERSION >= 11 */\n+\t} params;\t\t\t\t\t\t/**< Union used for all the next-engine parameters options */\n+\tvoid\t\t\t\t\t*manip_id;\t/**< Handle to Manipulation object.\n+\t\t\t\t\t\t\t\tRelevant if next engine is of type result\n+\t\t\t\t\t\t\t\t(e_IOC_FM_PCD_PLCR, e_IOC_FM_PCD_KG, e_IOC_FM_PCD_DONE) */\n+\tbool\t\t\t\t\tstatistics_en;  /**< If TRUE, statistics counters are incremented\n+\t\t\t\t\t\t\t\tfor each frame passing through this\n+\t\t\t\t\t\t\t\tCoarse Classification entry. */\n+} ioc_fm_pcd_cc_next_engine_params_t;\n+\n+/**\n+ @Description   Parameters for defining a single CC key\n+*/\n+typedef struct ioc_fm_pcd_cc_key_params_t {\n+\tuint8_t\t\t*p_key;\t/**< pointer to the key of the size defined in key_size */\n+\tuint8_t\t\t*p_mask;\t/**< pointer to the Mask per key of the size defined\n+\t\t\t\t\t\tin keySize. p_key and p_mask (if defined) has to be\n+\t\t\t\t\t\tof the same size defined in the key_size */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;\n+\t\t\t\t\t\t/**< parameters for the next for the defined Key in p_key */\n+\n+} ioc_fm_pcd_cc_key_params_t;\n+\n+/**\n+ @Description   Parameters for defining CC keys parameters\n+\t\tThe driver supports two methods for CC node allocation: dynamic and static.\n+\t\tStatic mode was created in order to prevent runtime alloc/free\n+\t\tof FMan memory (MURAM), which may cause fragmentation; in this mode,\n+\t\tthe driver automatically allocates the memory according to\n+\t\t'max_num_of_keys' parameter. The driver calculates the maximal memory\n+\t\tsize that may be used for this CC-Node taking into consideration\n+\t\t'mask_support' and 'statistics_mode' parameters.\n+\t\tWhen 'action' = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction\n+\t\tparameters of this node, 'max_num_of_keys' must be equal to 'num_of_keys'.\n+\t\tIn dynamic mode, 'max_num_of_keys' must be zero. At initialization,\n+\t\tall required structures are allocated according to 'num_of_keys'\n+\t\tparameter. During runtime modification, these structures are\n+\t\tre-allocated according to the updated number of keys.\n+\n+\t\tPlease note that 'action' and 'ic_indx_mask' mentioned in the\n+\t\tspecific parameter explanations are passed in the extraction\n+\t\tparameters of the node (fields of extractccparams.extractnonhdr).\n+*/\n+typedef struct ioc_keys_params_t {\n+\tuint16_t\t\t\tmax_num_of_keys;/**< Maximum number of keys that will (ever) be used in this CC-Node;\n+\t\t\t\t\t\t\tA value of zero may be used for dynamic memory allocation. */\n+\tbool\t\t\tmask_support;   /**< This parameter is relevant only if a node is initialized with\n+\taction = e_IOC_FM_PCD_ACTION_EXACT_MATCH and max_num_of_keys > 0;\n+\tShould be TRUE to reserve table memory for key masks, even if\n+\tinitial keys do not contain masks, or if the node was initialized\n+\tas 'empty' (without keys); this will allow user to add keys with\n+\tmasks at runtime. */\n+\tioc_fm_pcd_cc_stats_mode\tstatistics_mode;/**< Determines the supported statistics mode for all node's keys.\n+\tTo enable statistics gathering, statistics should be enabled per\n+\tevery key, using 'statistics_en' in next engine parameters structure\n+\tof that key;\n+\tIf 'max_num_of_keys' is set, all required structures will be\n+\tpreallocated for all keys. */\n+#if (DPAA_VERSION >= 11)\n+\tuint16_t\t\t\tframe_length_ranges[IOC_FM_PCD_CC_STATS_MAX_NUM_OF_FLR];\n+\t\t/**< Relevant only for 'RMON' statistics mode\n+\t\t\t(this feature is supported only on B4860 device);\n+\t\t\tHolds a list of programmable thresholds. For each received frame,\n+\t\t\tits length in bytes is examined against these range thresholds and\n+\t\t\tthe appropriate counter is incremented by 1. For example, to belong\n+\t\t\tto range i, the following should hold:\n+\t\t\trange i-1 threshold < frame length <= range i threshold\n+\t\t\tEach range threshold must be larger then its preceding range\n+\t\t\tthreshold. Last range threshold must be 0xFFFF. */\n+#endif /* (DPAA_VERSION >= 11) */\n+\tuint16_t\t\t\tnum_of_keys;\t/**< Number of initial keys;\n+\t\tNote that in case of 'action' = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP,\n+\t\tthis field should be power-of-2 of the number of bits that are\n+\t\tset in 'ic_indx_mask'. */\n+\tuint8_t\t\t\tkey_size;\t/**< Size of key - for extraction of type FULL_FIELD, 'key_size' has\n+\t\tto be the standard size of the selected key; For other extraction\n+\t\ttypes, 'key_size' has to be as size of extraction; When 'action' =\n+\t\te_IOC_FM_PCD_ACTION_INDEXED_LOOKUP, 'keySize' must be 2. */\n+\tioc_fm_pcd_cc_key_params_t  key_params[IOC_FM_PCD_MAX_NUM_OF_KEYS];\n+\t/**< An array with 'num_of_keys' entries, each entry specifies the\n+\t\tcorresponding key parameters;\n+\t\tWhen 'action' = e_IOC_FM_PCD_ACTION_EXACT_MATCH, this value must not\n+\t\texceed 255 (IOC_FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved\n+\t\tfor the 'miss' entry. */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params_for_miss;\n+\t/**< Parameters for defining the next engine when a key is not matched;\n+\t\tNot relevant if action = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP. */\n+} ioc_keys_params_t;\n+\n+/**\n+ @Description   Parameters for defining a CC node\n+*/\n+struct fm_pcd_cc_node_params_t {\n+\tioc_fm_pcd_extract_entry_t extract_cc_params;\n+\t/**< Extraction parameters */\n+\tioc_keys_params_t keys_params;\n+\t/**< Keys definition matching the selected extraction */\n+};\n+\n+typedef struct ioc_fm_pcd_cc_node_params_t {\n+\tstruct fm_pcd_cc_node_params_t param;\n+\tvoid *id;\n+\t/**< Output parameter; returns the CC node Id to be used */\n+} ioc_fm_pcd_cc_node_params_t;\n+\n+/**\n+ @Description   Parameters for defining a hash table\n+\t\t(Must match struct ioc_fm_pcd_hash_table_params_t defined in fm_pcd_ext.h)\n+*/\n+struct fm_pcd_hash_table_params_t {\n+\tuint16_t max_num_of_keys;\n+\t/**< Maximum Number Of Keys that will (ever) be used in this Hash-table */\n+\tioc_fm_pcd_cc_stats_mode statistics_mode;\n+\t/**< If not e_IOC_FM_PCD_CC_STATS_MODE_NONE, the required structures for the\n+\t\trequested statistics mode will be allocated according to max_num_of_keys. */\n+\tuint8_t kg_hash_shift;\n+\t/**< KG-Hash-shift as it was configured in the KG-scheme\n+\t\tthat leads to this hash-table. */\n+\tuint16_t hash_res_mask;\n+\t/**< Mask that will be used on the hash-result;\n+\t\tThe number-of-sets for this hash will be calculated\n+\t\tas (2^(number of bits set in 'hash_res_mask'));\n+\t\tThe 4 lower bits must be cleared. */\n+\tuint8_t hash_shift;\n+\t/**< Byte offset from the beginning of the KeyGen hash result to the\n+\t\t2-bytes to be used as hash index. */\n+\tuint8_t match_key_size;\n+\t/**< Size of the exact match keys held by the hash buckets */\n+\n+\tioc_fm_pcd_cc_next_engine_params_t cc_next_engine_params_for_miss;\n+\t/**< Parameters for defining the next engine when a key is not matched */\n+};\n+\n+typedef struct ioc_fm_pcd_hash_table_params_t {\n+\tstruct fm_pcd_hash_table_params_t param;\n+\tvoid *id;\n+} ioc_fm_pcd_hash_table_params_t;\n+\n+/**\n+ @Description   A structure with the arguments for the FM_PCD_HashTableAddKey ioctl() call\n+*/\n+typedef struct ioc_fm_pcd_hash_table_add_key_params_t {\n+\tvoid\t\t\t*p_hash_tbl;\n+\tuint8_t\t\t\tkey_size;\n+\tioc_fm_pcd_cc_key_params_t  key_params;\n+} ioc_fm_pcd_hash_table_add_key_params_t;\n+\n+/**\n+ @Description   Parameters for defining a CC tree group.\n+\n+This structure defines a CC group in terms of NetEnv units\n+and the action to be taken in each case. The unit_ids list must\n+be given in order from low to high indices.\n+\n+ioc_fm_pcd_cc_next_engine_params_t is a list of 2^num_of_distinction_units\n+structures where each defines the next action to be taken for\n+each units combination. for example:\n+num_of_distinction_units = 2\n+unit_ids = {1,3}\n+next_engine_per_entries_in_grp[0] = ioc_fm_pcd_cc_next_engine_params_t for the case that\n+\t\t\t\t\tunit 1 - not found; unit 3 - not found;\n+next_engine_per_entries_in_grp[1] = ioc_fm_pcd_cc_next_engine_params_t for the case that\n+\t\t\t\t\tunit 1 - not found; unit 3 - found;\n+next_engine_per_entries_in_grp[2] = ioc_fm_pcd_cc_next_engine_params_t for the case that\n+\t\t\t\t\tunit 1 - found; unit 3 - not found;\n+next_engine_per_entries_in_grp[3] = ioc_fm_pcd_cc_next_engine_params_t for the case that\n+\t\t\t\t\tunit 1 - found; unit 3 - found;\n+*/\n+typedef struct ioc_fm_pcd_cc_grp_params_t {\n+\tuint8_t\t\t\t\tnum_of_distinction_units;   /**< Up to 4 */\n+\tuint8_t\t\t\t\tunit_ids[IOC_FM_PCD_MAX_NUM_OF_CC_UNITS];\n+\t\t/**< Indexes of the units as defined in FM_PCD_NetEnvCharacteristicsSet() */\n+\tioc_fm_pcd_cc_next_engine_params_t  next_engine_per_entries_in_grp[IOC_FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP];\n+\t\t/**< Maximum entries per group is 16 */\n+} ioc_fm_pcd_cc_grp_params_t;\n+\n+/**\n+ @Description   Parameters for defining the CC tree groups\n+\t\t(Must match struct ioc_fm_pcd_cc_tree_params_t defined in fm_pcd_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_cc_tree_params_t {\n+\tvoid\t\t\t\t*net_env_id;\t/**< Id of the Network Environment as returned\n+\t\t\t\t\t\t\t\tby FM_PCD_NetEnvCharacteristicsSet() */\n+\tuint8_t\t\t\tnum_of_groups;  /**< Number of CC groups within the CC tree */\n+\tioc_fm_pcd_cc_grp_params_t\tfm_pcd_cc_group_params[IOC_FM_PCD_MAX_NUM_OF_CC_GROUPS];\n+\t\t\t\t\t\t\t/**< Parameters for each group. */\n+\tvoid\t\t\t\t*id;\t\t/**< Output parameter; Returns the tree Id to be used */\n+} ioc_fm_pcd_cc_tree_params_t;\n+\n+/**\n+ @Description   Parameters for defining policer byte rate\n+*/\n+typedef struct ioc_fm_pcd_plcr_byte_rate_mode_param_t {\n+\tioc_fm_pcd_plcr_frame_length_select\tframe_length_selection;\t/**< Frame length selection */\n+\tioc_fm_pcd_plcr_roll_back_frame_select  roll_back_frame_selection;  /**< relevant option only e_IOC_FM_PCD_PLCR_L2_FRM_LEN,\n+\t\t\t\t\t\t\t\te_IOC_FM_PCD_PLCR_FULL_FRM_LEN */\n+} ioc_fm_pcd_plcr_byte_rate_mode_param_t;\n+\n+/**\n+ @Description   Parameters for defining the policer profile (based on\n+\t\tRFC-2698 or RFC-4115 attributes).\n+*/\n+typedef struct ioc_fm_pcd_plcr_non_passthrough_alg_param_t {\n+\tioc_fm_pcd_plcr_rate_mode\t\trate_mode;\t\t\t/**< Byte / Packet */\n+\tioc_fm_pcd_plcr_byte_rate_mode_param_t  byte_mode_param;\t\t/**< Valid for Byte NULL for Packet */\n+\tuint32_t\t\t\t\tcommitted_info_rate;\t\t/**< KBits/Sec or Packets/Sec */\n+\tuint32_t\t\t\t\tcommitted_burst_size;\t/**< KBits or Packets */\n+\tuint32_t\t\t\t\tpeak_or_excess_info_rate;\t/**< KBits/Sec or Packets/Sec */\n+\tuint32_t\t\t\t\tpeak_or_excess_burst_size;\t/**< KBits or Packets */\n+} ioc_fm_pcd_plcr_non_passthrough_alg_param_t;\n+\n+/**\n+ @Description   Parameters for defining the next engine after policer\n+*/\n+typedef union ioc_fm_pcd_plcr_next_engine_params_u {\n+\tioc_fm_pcd_done_action\taction;\t\t/**< Action - when next engine is BMI (done) */\n+\tvoid\t\t\t*p_profile;\t/**< Policer profile handle -  used when next engine\n+\t\t\t\t\t\tis PLCR, must be a SHARED profile */\n+\tvoid\t\t\t*p_direct_scheme;\t/**< Direct scheme select - when next engine is Keygen */\n+} ioc_fm_pcd_plcr_next_engine_params_u;\n+\n+typedef struct ioc_fm_pcd_port_params_t {\n+\tioc_fm_port_type\t\t\tport_type;\t/**< Type of port for this profile */\n+\tuint8_t\t\t\t\tport_id;\t\t/**< FM-Port id of port for this profile */\n+} ioc_fm_pcd_port_params_t;\n+\n+/**\n+ @Description   Parameters for defining the policer profile entry\n+\t\t(Must match struct ioc_fm_pcd_plcr_profile_params_t defined in fm_pcd_ext.h)\n+*/\n+struct fm_pcd_plcr_profile_params_t {\n+\tbool modify;\n+\t/**< TRUE to change an existing profile */\n+\tunion {\n+\t\tstruct {\n+\t\t\tioc_fm_pcd_profile_type_selection profile_type;\n+\t\t\t/**< Type of policer profile */\n+\t\t\tioc_fm_pcd_port_params_t *p_fm_port;\n+\t\t\t/**< Relevant for per-port profiles only */\n+\t\t\tuint16_t relative_profile_id;\n+\t\t\t/**< Profile id - relative to shared group or to port */\n+\t\t} new_params;\n+\t\t/**< Use it when modify = FALSE */\n+\t\tvoid *p_profile;\n+\t\t/**< A handle to a profile - use it when modify=TRUE */\n+\t} profile_select;\n+\tioc_fm_pcd_plcr_algorithm_selection alg_selection;\n+\t/**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */\n+\tioc_fm_pcd_plcr_color_mode color_mode;\n+\t/**< COLOR_BLIND, COLOR_AWARE */\n+\n+\tunion {\n+\t\tioc_fm_pcd_plcr_color dflt_color;\n+\t\t/**< For Color-Blind Pass-Through mode;\n+\t\t\tthe policer will re-color\n+\t\t\tany incoming packet with the default value. */\n+\t\tioc_fm_pcd_plcr_color override;\n+\t\t/**< For Color-Aware modes; the profile response to a\n+\t\t\tpre-color value of 2'b11. */\n+\t} color;\n+\n+\tioc_fm_pcd_plcr_non_passthrough_alg_param_t\n+\t\tnon_passthrough_alg_param;\n+\t/**< RFC2698 or RFC4115 parameters */\n+\n+\tioc_fm_pcd_engine next_engine_on_green;\n+\t/**< Next engine for green-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_green;\n+\t/**< Next engine parameters for green-colored frames  */\n+\n+\tioc_fm_pcd_engine next_engine_on_yellow;\n+\t/**< Next engine for yellow-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_yellow;\n+\t/**< Next engine parameters for yellow-colored frames  */\n+\n+\tioc_fm_pcd_engine next_engine_on_red;\n+\t/**< Next engine for red-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_red;\n+\t/**< Next engine parameters for red-colored frames      */\n+\n+\tbool trap_profile_on_flow_A; /**< Obsolete - do not use */\n+\tbool trap_profile_on_flow_B; /**< Obsolete - do not use */\n+\tbool trap_profile_on_flow_C; /**< Obsolete - do not use */\n+};\n+\n+typedef struct ioc_fm_pcd_plcr_profile_params_t {\n+\tstruct fm_pcd_plcr_profile_params_t param;\n+\tvoid\t*id;\n+\t/**< output parameter; Returns the profile Id to be used */\n+} ioc_fm_pcd_plcr_profile_params_t;\n+\n+/**\n+ @Description   A structure for modifying CC tree next engine\n+*/\n+typedef struct ioc_fm_pcd_cc_tree_modify_next_engine_params_t {\n+\tvoid\t\t\t\t*id;\t\t/**< CC tree Id to be used */\n+\tuint8_t\t\t\t\tgrp_indx;\t/**< A Group index in the tree */\n+\tuint8_t\t\t\t\tindx;\t\t/**< Entry index in the group defined by grp_index */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;\n+\t\t\t\t\t\t\t\t/**< Parameters for the next for the defined Key in the p_Key */\n+} ioc_fm_pcd_cc_tree_modify_next_engine_params_t;\n+\n+/**\n+ @Description   A structure for modifying CC node next engine\n+*/\n+typedef struct ioc_fm_pcd_cc_node_modify_next_engine_params_t {\n+\tvoid\t\t\t\t*id;\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\t/**< Key index for Next Engine Params modifications;\n+\t\t\t\t\t\t\t\tNOTE: This parameter is IGNORED for miss-key!  */\n+\tuint8_t\t\t\t\tkey_size;\t/**< Key size of added key */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;\n+\t\t\t\t\t\t\t\t/**< parameters for the next for the defined Key in the p_Key */\n+} ioc_fm_pcd_cc_node_modify_next_engine_params_t;\n+\n+/**\n+ @Description   A structure for remove CC node key\n+*/\n+typedef struct ioc_fm_pcd_cc_node_remove_key_params_t {\n+\tvoid\t\t\t\t*id;\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\t/**< Key index for Next Engine Params modifications;\n+\t\t\t\t\t\t\t\tNOTE: This parameter is IGNORED for miss-key!  */\n+} ioc_fm_pcd_cc_node_remove_key_params_t;\n+\n+/**\n+ @Description   A structure for modifying CC node key and next engine\n+*/\n+typedef struct ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t {\n+\tvoid\t\t\t\t*id;\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\t/**< Key index for Next Engine Params modifications;\n+\t\t\t\t\t\t\t\tNOTE: This parameter is IGNORED for miss-key!  */\n+\tuint8_t\t\t\t\tkey_size;\t/**< Key size of added key */\n+\tioc_fm_pcd_cc_key_params_t\tkey_params;\t/**< it's array with numOfKeys entries each entry in\n+\t\t\t\t\t\t\t\tthe array of the type ioc_fm_pcd_cc_key_params_t */\n+} ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t;\n+\n+/**\n+ @Description   A structure for modifying CC node key\n+*/\n+typedef struct ioc_fm_pcd_cc_node_modify_key_params_t {\n+\tvoid\t\t\t\t*id;\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\t/**< Key index for Next Engine Params modifications;\n+\t\t\t\t\t\t\t\tNOTE: This parameter is IGNORED for miss-key!  */\n+\tuint8_t\t\t\t\tkey_size;\t/**< Key size of added key */\n+\tuint8_t\t\t\t\t*p_key;\t\t/**< Pointer to the key of the size defined in key_size */\n+\tuint8_t\t\t\t\t*p_mask;\t\t/**< Pointer to the Mask per key of the size defined\n+\t\t\t\t\t\t\t\tin keySize. p_Key and p_Mask (if defined) have to be\n+\t\t\t\t\t\t\t\tof the same size as defined in the key_size */\n+} ioc_fm_pcd_cc_node_modify_key_params_t;\n+\n+/**\n+ @Description   A structure with the arguments for the FM_PCD_HashTableRemoveKey ioctl() call\n+*/\n+typedef struct ioc_fm_pcd_hash_table_remove_key_params_t {\n+\tvoid\t*p_hash_tbl;\t/**< The id of the hash table */\n+\tuint8_t\tkey_size;\t/**< The size of the key to remove */\n+\tuint8_t\t*p_key;\t/**< Pointer to the key to remove */\n+} ioc_fm_pcd_hash_table_remove_key_params_t;\n+\n+/**\n+ @Description   Parameters for selecting a location for requested manipulation\n+*/\n+typedef struct ioc_fm_manip_hdr_info_t {\n+\tioc_net_header_type\t\thdr;\t\t/**< Header selection */\n+\tioc_fm_pcd_hdr_index\t\thdr_index;\t/**< Relevant only for MPLS, VLAN and tunneled IP. Otherwise should be cleared. */\n+\tbool\t\t\t\tby_field;\t/**< TRUE if the location of manipulation is according to some field in the specific header*/\n+\tioc_fm_pcd_fields_u\t\tfull_field;\t/**< Relevant only when by_field = TRUE: Extract field */\n+} ioc_fm_manip_hdr_info_t;\n+\n+/**\n+ @Description   Parameters for defining header removal by header type\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t {\n+\tioc_fm_pcd_manip_hdr_rmv_by_hdr_type\ttype;  /**< Selection of header removal location */\n+\tunion {\n+#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+\tstruct {\n+\t\tbool\t\t\t\tinclude;/**< If FALSE, remove until the specified header (not including the header);\n+\t\t\t\t\t\t\t\tIf TRUE, remove also the specified header. */\n+\t\tioc_fm_manip_hdr_info_t\t\thdr_info;\n+\t} from_start_by_hdr;\t\t\t/**< Relevant when type = e_IOC_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */\n+#endif /* FM_CAPWAP_SUPPORT */\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_manip_hdr_info_t\t\thdr_info;\t/**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */\n+#endif /* (DPAA_VERSION >= 11) */\n+\tioc_fm_pcd_manip_hdr_rmv_specific_l2\tspecific_l2;/**< Relevant when type = e_IOC_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;\n+\t\t\t\t\t\t\t\tDefines which L2 headers to remove. */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t;\n+\n+/**\n+ @Description   Parameters for configuring IP fragmentation manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_ip_params_t {\n+\tuint16_t\t\t\tsize_for_fragmentation;\t/**< If length of the frame is greater than this value,\n+\t\t\t\t\t\t\t\tIP fragmentation will be executed.*/\n+#if DPAA_VERSION == 10\n+\tuint8_t\t\t\tscratch_bpid;\t\t/**< Absolute buffer pool id according to BM configuration.*/\n+#endif /* DPAA_VERSION == 10 */\n+\tbool\t\t\tsg_bpid_en;\t\t/**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;\n+\t\tIf disabled, the Scatter/Gather buffer will be allocated from the same pool as the\n+\t\treceived frame's buffer. */\n+\tuint8_t\t\t\tsg_bpid;\t\t\t/**< Scatter/Gather buffer pool id;\n+\t\tThis parameter is relevant when 'sg_bpid_en=TRUE';\n+\t\tSame LIODN number is used for these buffers as for the received frames buffers, so buffers\n+\t\tof this pool need to be allocated in the same memory area as the received buffers.\n+\t\tIf the received buffers arrive from different sources, the Scatter/Gather BP id should be\n+\t\tmutual to all these sources. */\n+\tioc_fm_pcd_manip_dont_frag_action  dont_frag_action;\t/**< Dont Fragment Action - If an IP packet is larger\n+\t\tthan MTU and its DF bit is set, then this field will\n+\t\tdetermine the action to be taken.*/\n+} ioc_fm_pcd_manip_frag_ip_params_t;\n+\n+/**\n+ @Description   Parameters for configuring IP reassembly manipulation.\n+\n+\tThis is a common structure for both IPv4 and IPv6 reassembly\n+\tmanipulation. For reassembly of both IPv4 and IPv6, make sure to\n+\tset the 'hdr' field in ioc_fm_pcd_manip_reassem_params_t to IOC_HEADER_TYPE_IPv6.\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_ip_params_t {\n+\tuint8_t\t\t\trelative_scheme_id[2];\t/**< Partition relative scheme id:\n+\trelativeSchemeId[0] -  Relative scheme ID for IPV4 Reassembly manipulation;\n+\trelativeSchemeId[1] -  Relative scheme ID for IPV6 Reassembly manipulation;\n+\tNOTE: The following comment is relevant only for FMAN v2 devices:\n+\tRelative scheme ID for IPv4/IPv6 Reassembly manipulation must be smaller than\n+\tthe user schemes id to ensure that the reassembly's schemes will be first match.\n+\tThe remaining schemes, if defined, should have higher relative scheme ID. */\n+#if DPAA_VERSION >= 11\n+\tuint32_t\t\t\tnon_consistent_sp_fqid; /**< In case that other fragments of the frame corresponds to different storage\n+\t\tprofile than the opening fragment (Non-Consistent-SP state)\n+\t\tthen one of two possible scenarios occurs:\n+\t\tif 'nonConsistentSpFqid != 0', the reassembled frame will be enqueued to\n+\t\tthis fqid, otherwise a 'Non Consistent SP' bit will be set in the FD[status].*/\n+#else\n+\tuint8_t\t\t\tsg_bpid;\t\t/**< Buffer pool id for the S/G frame created by the reassembly process */\n+#endif /* DPAA_VERSION >= 11 */\n+\tuint8_t\t\t\tdata_mem_id;\t\t/**< Memory partition ID for the IPR's external tables structure */\n+\tuint16_t\t\t\tdata_liodn_offset;\t/**< LIODN offset for access the IPR's external tables structure. */\n+\tuint16_t\t\t\tmin_frag_size[2];\t/**< Minimum fragment size:\n+\t\t\t\t\t\t\t\tminFragSize[0] - for ipv4, minFragSize[1] - for ipv6 */\n+\tioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry[2];\n+\t\t/**< Number of frames per hash entry needed for reassembly process:\n+\t\tnumOfFramesPerHashEntry[0] - for ipv4 (max value is e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH);\n+\t\tnumOfFramesPerHashEntry[1] - for ipv6 (max value is e_IOC_FM_PCD_MANIP_SIX_WAYS_HASH). */\n+\tuint16_t\t\t\tmax_num_frames_in_process;/**< Number of frames which can be processed by Reassembly in the same time;\n+\t\tMust be power of 2;\n+\t\tIn the case numOfFramesPerHashEntry == e_IOC_FM_PCD_MANIP_FOUR_WAYS_HASH,\n+\t\tmaxNumFramesInProcess has to be in the range of 4 - 512;\n+\t\tIn the case numOfFramesPerHashEntry == e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH,\n+\t\tmaxNumFramesInProcess has to be in the range of 8 - 2048. */\n+\tioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;  /**< Expiration delay initialized by Reassembly process */\n+\tuint32_t\t\t\tfqid_for_time_out_frames;/**< FQID in which time out frames will enqueue during Time Out Process  */\n+\tuint32_t\t\t\ttimeout_threshold_for_reassm_process;\n+\t\t\t\t\t\t\t\t/**< Represents the time interval in microseconds which defines\n+\t\t\t\t\t\t\t\tif opened frame (at least one fragment was processed but not all the fragments)is found as too old*/\n+} ioc_fm_pcd_manip_reassem_ip_params_t;\n+\n+/**\n+ @Description   Parameters for defining IPSEC manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_special_offload_ipsec_params_t {\n+\tbool\tdecryption;\t\t\t/**< TRUE if being used in decryption direction;\n+\t\t\t\t\t\tFALSE if being used in encryption direction. */\n+\tbool\tecn_copy;\t\t\t/**< TRUE to copy the ECN bits from inner/outer to outer/inner\n+\t\t\t\t\t\t(direction depends on the 'decryption' field). */\n+\tbool\tdscp_copy;\t\t\t/**< TRUE to copy the DSCP bits from inner/outer to outer/inner\n+\t\t\t\t\t\t(direction depends on the 'decryption' field). */\n+\tbool\tvariable_ip_hdr_len;\t\t/**< TRUE for supporting variable IP header length in decryption. */\n+\tbool\tvariable_ip_version;\t\t/**< TRUE for supporting both IP version on the same SA in encryption */\n+\tuint8_t outer_ip_hdr_len;\t\t/**< If 'variable_ip_version == TRUE' than this field must be set to non-zero value;\n+\t\t\t\t\t\tIt is specifies the length of the outer IP header that was configured in the\n+\t\t\t\t\t\tcorresponding SA. */\n+\tuint16_t\tarw_size;\t\t/**< if <> '0' then will perform ARW check for this SA;\n+\t\t\t\t\t\tThe value must be a multiplication of 16 */\n+\tvoid\t*arw_addr;\t\t\t/**< if arwSize <> '0' then this field must be set to non-zero value;\n+\t\t\t\t\t\tMUST be allocated from FMAN's MURAM that the post-sec op-port belong\n+\t\t\t\t\t\tMust be 4B aligned. Required MURAM size is '(NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes */\n+} ioc_fm_pcd_manip_special_offload_ipsec_params_t;\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Description   Parameters for configuring CAPWAP fragmentation manipulation\n+\n+ Restrictions:\n+\t- Maximum number of fragments per frame is 16.\n+\t- Transmit confirmation is not supported.\n+\t- Fragmentation nodes must be set as the last PCD action (i.e. the\n+\tcorresponding CC node key must have next engine set to e_FM_PCD_DONE).\n+\t- Only BMan buffers shall be used for frames to be fragmented.\n+\t- NOTE: The following comment is relevant only for FMAN v3 devices: IPF\n+\tdoes not support VSP. Therefore, on the same port where we have IPF we\n+\tcannot support VSP.\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_capwap_params_t {\n+\tuint16_t\tsize_for_fragmentation;   /**< If length of the frame is greater than this value,\n+\t\t\tCAPWAP fragmentation will be executed.*/\n+\tbool\t\tsg_bpid_en;\t\t/**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;\n+\tIf disabled, the Scatter/Gather buffer will be allocated from the same pool as the\n+\treceived frame's buffer. */\n+\tuint8_t\t\tsg_bpid;\t\t/**< Scatter/Gather buffer pool id;\n+\tThis parameters is relevant when 'sgBpidEn=TRUE';\n+\tSame LIODN number is used for these buffers as for the received frames buffers, so buffers\n+\tof this pool need to be allocated in the same memory area as the received buffers.\n+\tIf the received buffers arrive from different sources, the Scatter/Gather BP id should be\n+\tmutual to all these sources. */\n+\tbool\tcompress_mode_en;\t/**< CAPWAP Header Options Compress Enable mode;\n+\tWhen this mode is enabled then only the first fragment include the CAPWAP header options\n+\tfield (if user provides it in the input frame) and all other fragments exclude the CAPWAP\n+\toptions field (CAPWAP header is updated accordingly).*/\n+} ioc_fm_pcd_manip_frag_capwap_params_t;\n+\n+/**\n+ @Description   Parameters for configuring CAPWAP reassembly manipulation.\n+\n+ Restrictions:\n+\t- Application must define one scheme to catch the reassembled frames.\n+\t- Maximum number of fragments per frame is 16.\n+\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_capwap_params_t {\n+\tuint8_t\t\trelative_scheme_id;\t/**< Partition relative scheme id;\n+\tNOTE: this id must be smaller than the user schemes id to ensure that the reassembly scheme will be first match;\n+\tRest schemes, if defined, should have higher relative scheme ID. */\n+\tuint8_t\t\tdata_mem_id;\t\t/**< Memory partition ID for the IPR's external tables structure */\n+\tuint16_t\tdata_liodn_offset;\t/**< LIODN offset for access the IPR's external tables structure. */\n+\tuint16_t\tmax_reassembled_frame_length;/**< The maximum CAPWAP reassembled frame length in bytes;\n+\tIf maxReassembledFrameLength == 0, any successful reassembled frame length is\n+\tconsidered as a valid length;\n+\tif maxReassembledFrameLength > 0, a successful reassembled frame which its length\n+\texceeds this value is considered as an error frame (FD status[CRE] bit is set). */\n+\tioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry;\n+\t\t/**< Number of frames per hash entry needed for reassembly process */\n+\tuint16_t\tmax_num_frames_in_process;  /**< Number of frames which can be processed by reassembly in the same time;\n+\tMust be power of 2;\n+\tIn the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,\n+\tmaxNumFramesInProcess has to be in the range of 4 - 512;\n+\tIn the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,\n+\tmaxNumFramesInProcess has to be in the range of 8 - 2048. */\n+\tioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;\t\t/**< Expiration delay initialized by Reassembly process */\n+\tuint32_t\tfqid_for_time_out_frames;   /**< FQID in which time out frames will enqueue during Time Out Process;\n+\tRecommended value for this field is 0; in this way timed-out frames will be discarded */\n+\tuint32_t\ttimeout_threshold_for_reassm_process;\n+\t/**< Represents the time interval in microseconds which defines\n+\tif opened frame (at least one fragment was processed but not all the fragments)is found as too old*/\n+} ioc_fm_pcd_manip_reassem_capwap_params_t;\n+\n+/**\n+ @Description   structure for defining CAPWAP manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_special_offload_capwap_params_t {\n+\tbool\t\t\tdtls;   /**< TRUE if continue to SEC DTLS encryption */\n+\tioc_fm_pcd_manip_hdr_qos_src   qos_src; /**< TODO */\n+} ioc_fm_pcd_manip_special_offload_capwap_params_t;\n+\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/**\n+ @Description   Parameters for defining special offload manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_special_offload_params_t {\n+\tioc_fm_pcd_manip_special_offload_type\t\ttype;\n+\t\t/**< Type of special offload manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_special_offload_ipsec_params_t ipsec;\n+\t/**< Parameters for IPSec; Relevant when type = e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC */\n+\n+\tioc_fm_pcd_manip_special_offload_capwap_params_t capwap;\n+\t/**< Parameters for CAPWAP; Relevant when type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP */\n+\t} u;\n+} ioc_fm_pcd_manip_special_offload_params_t;\n+\n+/**\n+ @Description   Parameters for defining generic removal manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_rmv_generic_params_t {\n+\tuint8_t\t\t\toffset;\n+\t\t/**< Offset from beginning of header to the start location of the removal */\n+\tuint8_t\t\t\tsize;\t/**< Size of removed section */\n+} ioc_fm_pcd_manip_hdr_rmv_generic_params_t;\n+\n+/**\n+ @Description   Parameters for defining insertion manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_t {\n+\tuint8_t size;\t/**< size of inserted section */\n+\tuint8_t *p_data;\t/**< data to be inserted */\n+} ioc_fm_pcd_manip_hdr_insrt_t;\n+\n+/**\n+ @Description   Parameters for defining generic insertion manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_generic_params_t {\n+\tuint8_t\t\t\toffset;\t/**< Offset from beginning of header to the start\n+\t\t\t\t\t\t\tlocation of the insertion */\n+\tuint8_t\t\t\tsize;\t/**< Size of inserted section */\n+\tbool\t\t\t\treplace;\t/**< TRUE to override (replace) existing data at\n+\t\t\t\t\t\t\t'offset', FALSE to insert */\n+\tuint8_t\t\t\t*p_data;\t/**< Pointer to data to be inserted */\n+} ioc_fm_pcd_manip_hdr_insrt_generic_params_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation VLAN DSCP To Vpri translation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t {\n+\tuint8_t\t\t\tdscp_to_vpri_table[IOC_FM_PCD_MANIP_DSCP_TO_VLAN_TRANS];\n+\t\t/**< A table of VPri values for each DSCP value;\n+\t\tThe index is the D_SCP value (0-0x3F) and the\n+\t\tvalue is the corresponding VPRI (0-15). */\n+\tuint8_t\t\t\tvpri_def_val;\n+\t\t/**< 0-7, Relevant only if if update_type =\n+\t\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN,\n+\t\tthis field is the Q Tag default value if the IP header is not found. */\n+} ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation VLAN fields updates\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_vlan_t {\n+\tioc_fm_pcd_manip_hdr_field_update_vlan  update_type;\t/**< Selects VLAN update type */\n+\tunion {\n+\tuint8_t\t\t\t\t\tvpri;   /**< 0-7, Relevant only if If update_type =\n+\t\t\t\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this\n+\t\t\t\tis the new VLAN pri. */\n+\tioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t\tdscp_to_vpri;\n+\t\t\t/**<  Parameters structure, Relevant only if update_type =\n+\t\t\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN. */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_field_update_vlan_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation IPV4 fields updates\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv4_t {\n+\tioc_ipv4_hdr_manip_update_flags_t\tvalid_updates;  /**< ORed flag, selecting the required updates */\n+\tuint8_t\t\ttos;\t/**< 8 bit New TOS; Relevant if valid_updates contains\n+\t\t\t\t\tIOC_HDR_MANIP_IPV4_TOS */\n+\tuint16_t\tid;\t/**< 16 bit New IP ID; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_IPV4_ID */\n+\tuint32_t\tsrc;\t/**< 32 bit New IP SRC; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_IPV4_SRC */\n+\tuint32_t\tdst;\t/**< 32 bit New IP DST; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_IPV4_DST */\n+} ioc_fm_pcd_manip_hdr_field_update_ipv4_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation IPV6 fields updates\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv6_t {\n+\tioc_ipv6_hdr_manip_update_flags_t\tvalid_updates;  /**< ORed flag, selecting the required updates */\n+\tuint8_t\t\ttraffic_class;  /**< 8 bit New Traffic Class; Relevant if valid_updates contains\n+\t\t\t\t\tIOC_HDR_MANIP_IPV6_TC */\n+\tuint8_t\t\tsrc[IOC_NET_HF_IPv6_ADDR_SIZE];\n+\t\t\t\t/**< 16 byte new IP SRC; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_IPV6_SRC */\n+\tuint8_t\t\tdst[IOC_NET_HF_IPv6_ADDR_SIZE];\n+\t\t\t\t/**< 16 byte new IP DST; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_IPV6_DST */\n+} ioc_fm_pcd_manip_hdr_field_update_ipv6_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation TCP/UDP fields updates\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t {\n+\tioc_tcp_udp_hdr_manip_update_flags_t\tvalid_updates;  /**< ORed flag, selecting the required updates */\n+\tuint16_t\tsrc;\t/**< 16 bit New TCP/UDP SRC; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_TCP_UDP_SRC */\n+\tuint16_t\tdst;\t\t/**< 16 bit New TCP/UDP DST; Relevant only if valid_updates\n+\t\t\t\t\tcontains IOC_HDR_MANIP_TCP_UDP_DST */\n+} ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation fields updates\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_params_t {\n+\tioc_fm_pcd_manip_hdr_field_update_type\ttype;   /**< Type of header field update manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_field_update_vlan_t\tvlan;   /**< Parameters for VLAN update. Relevant when\n+\t\t\ttype = e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN */\n+\tioc_fm_pcd_manip_hdr_field_update_ipv4_t\tipv4;   /**< Parameters for IPv4 update. Relevant when\n+\t\t\ttype = e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4 */\n+\tioc_fm_pcd_manip_hdr_field_update_ipv6_t\tipv6;   /**< Parameters for IPv6 update. Relevant when\n+\t\t\ttype = e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6 */\n+\tioc_fm_pcd_manip_hdr_field_update_tcp_udp_t tcp_udp;/**< Parameters for TCP/UDP update. Relevant when\n+\t\t\ttype = e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_field_update_params_t;\n+\n+/**\n+ @Description   Parameters for defining custom header manipulation for IP replacement\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t {\n+\tioc_fm_pcd_manip_hdr_custom_ip_replace  replace_type;   /**< Selects replace update type */\n+\tbool\tdec_ttl_hl;\t/**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1 */\n+\tbool\tupdate_ipv4_id; /**< Relevant when replace_type =\n+\t\t\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4 */\n+\tuint16_t id;\t\t/**< 16 bit New IP ID; Relevant only if\n+\t\t\t\tupdate_ipv4_id = TRUE */\n+\tuint8_t\thdr_size;\t/**< The size of the new IP header */\n+\tuint8_t\thdr[IOC_FM_PCD_MANIP_MAX_HDR_SIZE];\t/**< The new IP header */\n+} ioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t;\n+\n+/**\n+ @Description   Parameters for defining custom header manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_custom_params_t {\n+\tioc_fm_pcd_manip_hdr_custom_type\t\ttype;\n+\t\t\t\t/**< Type of header field update manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t\tip_hdr_replace;\n+\t\t\t\t/**< Parameters IP header replacement */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_custom_params_t;\n+\n+/**\n+ @Description   Parameters for defining specific L2 insertion manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t {\n+\tioc_fm_pcd_manip_hdr_insrt_specific_l2  specific_l2;\t/**< Selects which L2 headers to insert */\n+\tbool\t\t\t\t\tupdate;\t/**< TRUE to update MPLS header */\n+\tuint8_t\t\t\t\tsize;\t/**< size of inserted section */\n+\tuint8_t\t\t\t\t*p_data;\t/**< data to be inserted */\n+} ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t;\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Description   Parameters for defining IP insertion manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_ip_params_t {\n+\tbool\tcalc_l4_checksum; /**< Calculate L4 checksum. */\n+\tioc_fm_pcd_manip_hdr_qos_mapping_mode   mapping_mode; /**< TODO */\n+\tuint8_t last_pid_offset;\t/**< the offset of the last Protocol within\n+\t\t\t\tthe inserted header */\n+\tuint16_t  id;\t/**< 16 bit New IP ID */\n+\tbool\t\t\t\tdont_frag_overwrite;\n+\t/**< IPv4 only. DF is overwritten with the hash-result next-to-last byte.\n+\t* This byte is configured to be overwritten when RPD is set. */\n+\tuint8_t\t\t\tlast_dst_offset;\n+\t/**< IPv6 only. if routing extension exist, user should set the offset of the destination address\n+\t* in order to calculate UDP checksum pseudo header;\n+\t* Otherwise set it to '0'. */\n+\tioc_fm_pcd_manip_hdr_insrt_t insrt; /**< size and data to be inserted. */\n+} ioc_fm_pcd_manip_hdr_insrt_ip_params_t;\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/**\n+ @Description   Parameters for defining header insertion manipulation by header type\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t {\n+\tioc_fm_pcd_manip_hdr_insrt_by_hdr_type\ttype;   /**< Selects manipulation type */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t  specific_l2_params;\n+\t\t\t\t\t\t\t\t/**< Used when type = e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2:\n+\t\t\t\t\t\t\t\tSelects which L2 headers to remove */\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_pcd_manip_hdr_insrt_ip_params_t\tip_params;  /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */\n+\tioc_fm_pcd_manip_hdr_insrt_t\t\tinsrt;\t/**< Used when type is one of e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,\n+\t\t\t\t\t\t\t\te_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or\n+\t\t\t\t\t\t\t\te_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP */\n+#endif /* (DPAA_VERSION >= 11) */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t;\n+\n+/**\n+ @Description   Parameters for defining header insertion manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_params_t {\n+\tioc_fm_pcd_manip_hdr_insrt_type\t\t\ttype;   /**< Type of insertion manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t\tby_hdr; /**< Parameters for defining header insertion manipulation by header type,\n+\t\t\t\t\t\t\t\trelevant if 'type' = e_IOC_FM_PCD_MANIP_INSRT_BY_HDR */\n+\tioc_fm_pcd_manip_hdr_insrt_generic_params_t\tgeneric;/**< Parameters for defining generic header insertion manipulation,\n+\t\t\t\t\t\t\t\trelevant if type = e_IOC_FM_PCD_MANIP_INSRT_GENERIC */\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+\tioc_fm_pcd_manip_hdr_insrt_by_template_params_t by_template;\n+\t\t\t\t\t\t\t\t/**< Parameters for defining header insertion manipulation by template,\n+\t\t\t\t\t\t\t\trelevant if 'type' = e_IOC_FM_PCD_MANIP_INSRT_BY_TEMPLATE */\n+#endif /* FM_CAPWAP_SUPPORT */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_insrt_params_t;\n+\n+/**\n+ @Description   Parameters for defining header removal manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_rmv_params_t {\n+\tioc_fm_pcd_manip_hdr_rmv_type\t\ttype;\t/**< Type of header removal manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t   by_hdr;\t/**< Parameters for defining header removal manipulation by header type,\n+\t\t\t\t\t\t\t\trelevant if type = e_IOC_FM_PCD_MANIP_RMV_BY_HDR */\n+\tioc_fm_pcd_manip_hdr_rmv_generic_params_t  generic;\t/**< Parameters for defining generic header removal manipulation,\n+\t\t\t\t\t\t\t\trelevant if type = e_IOC_FM_PCD_MANIP_RMV_GENERIC */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_rmv_params_t;\n+\n+/**\n+ @Description   Parameters for defining header manipulation node\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_params_t {\n+\tbool\t\t\t\t\trmv;\t\t/**< TRUE, to define removal manipulation */\n+\tioc_fm_pcd_manip_hdr_rmv_params_t\trmv_params;\t/**< Parameters for removal manipulation, relevant if 'rmv' = TRUE */\n+\n+\tbool\t\t\t\t\tinsrt;\t\t/**< TRUE, to define insertion manipulation */\n+\tioc_fm_pcd_manip_hdr_insrt_params_t\tinsrt_params;\t/**< Parameters for insertion manipulation, relevant if 'insrt' = TRUE */\n+\n+\tbool\t\t\t\t\tfield_update;\t/**< TRUE, to define field update manipulation */\n+\tioc_fm_pcd_manip_hdr_field_update_params_t  field_update_params;  /**< Parameters for field update manipulation, relevant if 'fieldUpdate' = TRUE */\n+\n+\tbool\t\t\t\t\tcustom;\t\t/**< TRUE, to define custom manipulation */\n+\tioc_fm_pcd_manip_hdr_custom_params_t\tcustom_params;\t/**< Parameters for custom manipulation, relevant if 'custom' = TRUE */\n+\n+\tbool\t\t\t\t\tdont_parse_after_manip;/**< FALSE to activate the parser a second time after\n+\t\t\t\t\t\t\t\tcompleting the manipulation on the frame */\n+} ioc_fm_pcd_manip_hdr_params_t;\n+\n+/**\n+ @Description   structure for defining fragmentation manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_params_t {\n+\tioc_net_header_type\t\t\thdr;\t\t/**< Header selection */\n+\tunion {\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_pcd_manip_frag_capwap_params_t\tcapwap_frag;   /**< Parameters for defining CAPWAP fragmentation,\n+\t\t\t\t\t\t\trelevant if 'hdr' = HEADER_TYPE_CAPWAP */\n+#endif /* (DPAA_VERSION >= 11) */\n+\tioc_fm_pcd_manip_frag_ip_params_t   ip_frag;\t/**< Parameters for defining IP fragmentation,\n+\t\t\t\t\t\t\t\trelevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */\n+\t} u;\n+} ioc_fm_pcd_manip_frag_params_t;\n+\n+/**\n+ @Description   structure for defining reassemble manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_params_t {\n+\tioc_net_header_type\t\t\thdr;\t/**< Header selection */\n+\tunion {\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_pcd_manip_reassem_capwap_params_t capwap_reassem;  /**< Parameters for defining CAPWAP reassembly,\n+\t\t\t\t\t\t\trelevant if 'hdr' = HEADER_TYPE_CAPWAP */\n+#endif /* (DPAA_VERSION >= 11) */\n+\tioc_fm_pcd_manip_reassem_ip_params_t\tip_reassem; /**< Parameters for defining IP reassembly,\n+\t\t\t\t\t\t\t\trelevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */\n+\t} u;\n+} ioc_fm_pcd_manip_reassem_params_t;\n+\n+/**\n+ @Description   Parameters for defining a manipulation node\n+*/\n+struct fm_pcd_manip_params_t {\n+\tioc_fm_pcd_manip_type type;\n+\t/**< Selects type of manipulation node */\n+\tunion {\n+\t\tioc_fm_pcd_manip_hdr_params_t hdr;\n+\t\t/**< Parameters for defining header manipulation node */\n+\t\tioc_fm_pcd_manip_reassem_params_t reassem;\n+\t\t/**< Parameters for defining reassembly manipulation node */\n+\t\tioc_fm_pcd_manip_frag_params_t frag;\n+\t\t/**< Parameters for defining fragmentation manipulation node */\n+\t\tioc_fm_pcd_manip_special_offload_params_t special_offload;\n+\t\t/**< Parameters for defining special offload manipulation node */\n+\t} u;\n+\tvoid *p_next_manip;\n+\t/**< Handle to another (previously defined) manipulation node;\n+\t\tAllows concatenation of manipulation actions\n+\t\tThis parameter is optional and may be NULL. */\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+\tbool frag_or_reasm;\n+\t/**< TRUE, if defined fragmentation/reassembly manipulation */\n+\tioc_fm_pcd_manip_frag_or_reasm_params_t\n+\t\tfrag_or_reasm_params;\n+\t/**< Parameters for fragmentation/reassembly manipulation,\n+\t\trelevant if frag_or_reasm = TRUE */\n+#endif /* FM_CAPWAP_SUPPORT */\n+};\n+\n+typedef struct ioc_fm_pcd_manip_params_t {\n+\tstruct fm_pcd_manip_params_t param;\n+\tvoid *id;\n+} ioc_fm_pcd_manip_params_t;\n+\n+/**\n+ @Description   Structure for retrieving IP reassembly statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_ip_stats_t {\n+\t/* common counters for both IPv4 and IPv6 */\n+\tuint32_t\ttimeout;\t\t\t/**< Counts the number of TimeOut occurrences */\n+\tuint32_t\trfd_pool_busy;\t\t\t/**< Counts the number of failed attempts to allocate\n+\t\t\t\t\t\t\ta Reassembly Frame Descriptor */\n+\tuint32_t\tinternal_buffer_busy;\t\t/**< Counts the number of times an internal buffer busy occurred */\n+\tuint32_t\texternal_buffer_busy;\t\t/**< Counts the number of times external buffer busy occurred */\n+\tuint32_t\tsg_fragments;\t\t\t/**< Counts the number of Scatter/Gather fragments */\n+\tuint32_t\tdma_semaphore_depletion;\t/**< Counts the number of failed attempts to allocate a DMA semaphore */\n+#if (DPAA_VERSION >= 11)\n+\tuint32_t\tnon_consistent_sp;\t\t/**< Counts the number of Non Consistent Storage Profile events for\n+\t\t\t\t\t\t\tsuccessfully reassembled frames */\n+#endif /* (DPAA_VERSION >= 11) */\n+struct {\n+\tuint32_t\tsuccessfully_reassembled;\t/**< Counts the number of successfully reassembled frames */\n+\tuint32_t\tvalid_fragments;\t\t/**< Counts the total number of valid fragments that\n+\t\t\t\t\t\t\thave been processed for all frames */\n+\tuint32_t\tprocessed_fragments;\t/**< Counts the number of processed fragments\n+\t\t\t\t\t\t\t(valid and error fragments) for all frames */\n+\tuint32_t\tmalformed_fragments;\t/**< Counts the number of malformed fragments processed for all frames */\n+\tuint32_t\tdiscarded_fragments;\t/**< Counts the number of fragments discarded by the reassembly process */\n+\tuint32_t\tauto_learn_busy;\t\t/**< Counts the number of times a busy condition occurs when attempting\n+\t\t\t\t\t\t\tto access an IP-Reassembly Automatic Learning Hash set */\n+\tuint32_t\tmore_than16fragments;\t/**< Counts the fragment occurrences in which the number of fragments-per-frame\n+\t\t\t\t\t\t\texceeds 16 */\n+\t} specific_hdr_statistics[2];\t\t/**< slot '0' is for IPv4, slot '1' is for IPv6 */\n+} ioc_fm_pcd_manip_reassem_ip_stats_t;\n+\n+/**\n+ @Description   Structure for retrieving IP fragmentation statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_ip_stats_t {\n+\tuint32_t\ttotal_frames;\t\t/**< Number of frames that passed through the manipulation node */\n+\tuint32_t\tfragmented_frames;\t/**< Number of frames that were fragmented */\n+\tuint32_t\tgenerated_fragments;\t/**< Number of fragments that were generated */\n+} ioc_fm_pcd_manip_frag_ip_stats_t;\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Description   Structure for retrieving CAPWAP reassembly statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_capwap_stats_t {\n+\tuint32_t\ttimeout;\t\t\t/**< Counts the number of timeout occurrences */\n+\tuint32_t\trfd_pool_busy;\t\t/**< Counts the number of failed attempts to allocate\n+\t\t\t\t\t\ta Reassembly Frame Descriptor */\n+\tuint32_t\tinternal_buffer_busy;\t/**< Counts the number of times an internal buffer busy occurred */\n+\tuint32_t\texternal_buffer_busy;\t/**< Counts the number of times external buffer busy occurred */\n+\tuint32_t\tsg_fragments;\t\t/**< Counts the number of Scatter/Gather fragments */\n+\tuint32_t\tdma_semaphore_depletion;\t/**< Counts the number of failed attempts to allocate a DMA semaphore */\n+\tuint32_t\tsuccessfully_reassembled;\t/**< Counts the number of successfully reassembled frames */\n+\tuint32_t\tvalid_fragments;\t\t/**< Counts the total number of valid fragments that\n+\t\t\t\t\t\thave been processed for all frames */\n+\tuint32_t\tprocessed_fragments;\t/**< Counts the number of processed fragments\n+\t\t\t\t\t\t(valid and error fragments) for all frames */\n+\tuint32_t\tmalformed_fragments;\t/**< Counts the number of malformed fragments processed for all frames */\n+\tuint32_t\tautoLearn_busy;\t\t/**< Counts the number of times a busy condition occurs when attempting\n+\t\t\t\t\t\tto access an Reassembly Automatic Learning Hash set */\n+\tuint32_t\tdiscarded_fragments;\t/**< Counts the number of fragments discarded by the reassembly process */\n+\tuint32_t\tmore_than16fragments;\t/**< Counts the fragment occurrences in which the number of fragments-per-frame\n+\t\t\t\t\t\texceeds 16 */\n+\tuint32_t\texceed_max_reassembly_frame_len;/**< ounts the number of times that a successful reassembled frame\n+\t\t\t\t\t\tlength exceeds MaxReassembledFrameLength value */\n+} ioc_fm_pcd_manip_reassem_capwap_stats_t;\n+\n+/**\n+ @Description   Structure for retrieving CAPWAP fragmentation statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_capwap_stats_t {\n+\tuint32_t\ttotal_frames;\t\t/**< Number of frames that passed through the manipulation node */\n+\tuint32_t\tfragmented_frames;\t/**< Number of frames that were fragmented */\n+\tuint32_t\tgenerated_fragments;\t/**< Number of fragments that were generated */\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+\tuint8_t\tsg_allocation_failure;\t/**< Number of allocation failure of s/g buffers */\n+#endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */\n+} ioc_fm_pcd_manip_frag_capwap_stats_t;\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/**\n+ @Description   Structure for retrieving reassembly statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_reassem_stats_t {\n+\tunion {\n+\tioc_fm_pcd_manip_reassem_ip_stats_t  ip_reassem;  /**< Structure for IP reassembly statistics */\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_pcd_manip_reassem_capwap_stats_t  capwap_reassem;  /**< Structure for CAPWAP reassembly statistics */\n+#endif /* (DPAA_VERSION >= 11) */\n+\t} u;\n+} ioc_fm_pcd_manip_reassem_stats_t;\n+\n+/**\n+ @Description   structure for retrieving fragmentation statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_stats_t {\n+\tunion {\n+\tioc_fm_pcd_manip_frag_ip_stats_t\tip_frag;\t/**< Structure for IP fragmentation statistics */\n+#if (DPAA_VERSION >= 11)\n+\tioc_fm_pcd_manip_frag_capwap_stats_t capwap_frag; /**< Structure for CAPWAP fragmentation statistics */\n+#endif /* (DPAA_VERSION >= 11) */\n+\t} u;\n+} ioc_fm_pcd_manip_frag_stats_t;\n+\n+/**\n+ @Description   structure for defining manipulation statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_stats_t {\n+\tunion {\n+\tioc_fm_pcd_manip_reassem_stats_t  reassem;\t/**< Structure for reassembly statistics */\n+\tioc_fm_pcd_manip_frag_stats_t\tfrag;\t/**< Structure for fragmentation statistics */\n+\t} u;\n+} ioc_fm_pcd_manip_stats_t;\n+\n+/**\n+ @Description   Parameters for acquiring manipulation statistics\n+*/\n+typedef struct ioc_fm_pcd_manip_get_stats_t {\n+\tvoid\t\t\t\t*id;\n+\tioc_fm_pcd_manip_stats_t\tstats;\n+} ioc_fm_pcd_manip_get_stats_t;\n+\n+#if DPAA_VERSION >= 11\n+/**\n+ @Description   Parameters for defining frame replicator group and its members\n+*/\n+struct fm_pcd_frm_replic_group_params_t {\n+\tuint8_t\t\t\tmax_num_of_entries;\t/**< Maximal number of members in the group  - must be at least two */\n+\tuint8_t\t\t\tnum_of_entries;\t/**< Number of members in the group - must be at least 1 */\n+\tioc_fm_pcd_cc_next_engine_params_t   next_engine_params[IOC_FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];\n+\t\t\t\t\t\t\t/**< Array of members' parameters */\n+};\n+\n+typedef struct ioc_fm_pcd_frm_replic_group_params_t {\n+\tstruct fm_pcd_frm_replic_group_params_t param;\n+\tvoid *id;\n+} ioc_fm_pcd_frm_replic_group_params_t;\n+\n+typedef struct ioc_fm_pcd_frm_replic_member_t {\n+\tvoid *h_replic_group;\n+\tuint16_t member_index;\n+} ioc_fm_pcd_frm_replic_member_t;\n+\n+typedef struct ioc_fm_pcd_frm_replic_member_params_t {\n+\tioc_fm_pcd_frm_replic_member_t member;\n+\tioc_fm_pcd_cc_next_engine_params_t next_engine_params;\n+} ioc_fm_pcd_frm_replic_member_params_t;\n+#endif /* DPAA_VERSION >= 11 */\n+\n+\n+typedef struct ioc_fm_pcd_cc_key_statistics_t {\n+\tuint32_t\tbyte_count;\t/**< This counter reflects byte count of frames that\n+\t\t\t\t\twere matched by this key. */\n+\tuint32_t\tframe_count;\t/**< This counter reflects count of frames that\n+\t\t\t\t\twere matched by this key. */\n+#if (DPAA_VERSION >= 11)\n+\tuint32_t\tframe_length_range_count[IOC_FM_PCD_CC_STATS_MAX_NUM_OF_FLR];\n+\t\t\t\t/**< These counters reflect how many frames matched\n+\t\t\t\t\tthis key in 'RMON' statistics mode:\n+\t\t\t\t\tEach counter holds the number of frames of a\n+\t\t\t\t\tspecific frames length range, according to the\n+\t\t\t\t\tranges provided at initialization. */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_pcd_cc_key_statistics_t;\n+\n+\n+typedef struct ioc_fm_pcd_cc_tbl_get_stats_t {\n+\tvoid\t\t\t\t*id;\n+\tuint16_t\t\t\tkey_index;\n+\tioc_fm_pcd_cc_key_statistics_t  statistics;\n+} ioc_fm_pcd_cc_tbl_get_stats_t;\n+\n+/**\n+ @Function\tFM_PCD_MatchTableGetKeyStatistics\n+\n+ @Description   This routine may be used to get statistics counters of specific key\n+\t\tin a CC Node.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames passed that were matched\n+\t\tthis key; The total frames count will be returned in the counter\n+\t\tof the first range (as only one frame length range was defined).\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total\n+\t\tframe count will be separated to frame length counters, based on\n+\t\tprovided frame length ranges.\n+\n+ @Param[in]\th_CcNode\tA handle to the node\n+ @Param[in]\tkeyIndex\tKey index for adding\n+ @Param[out]\tp_KeyStatistics Key statistics counters\n+\n+ @Return\tThe specific key statistics.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT_COMPAT   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_compat_fm_pcd_cc_tbl_get_stats_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableGetMissStatistics\n+\n+ @Description   This routine may be used to get statistics counters of miss entry\n+\t\tin a CC Node.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames were not matched to any\n+\t\texisting key and therefore passed through the miss entry; The\n+\t\ttotal frames count will be returned in the counter of the\n+\t\tfirst range (as only one frame length range was defined).\n+\n+ @Param[in]\th_CcNode\t\tA handle to the node\n+ @Param[out]\tp_MissStatistics\tStatistics counters for 'miss'\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT_COMPAT   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_compat_fm_pcd_cc_tbl_get_stats_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/**\n+ @Function\tFM_PCD_HashTableGetMissStatistics\n+\n+ @Description   This routine may be used to get statistics counters of 'miss'\n+\t\tentry of the a hash table.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames were not matched to any\n+\t\texisting key and therefore passed through the miss entry;\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+ @Param[out]\tp_MissStatistics\tStatistics counters for 'miss'\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT_COMPAT   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_compat_fm_pcd_cc_tbl_get_stats_t)\n+#endif\n+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/**\n+ @Function\tFM_PCD_NetEnvCharacteristicsSet\n+\n+ @Description   Define a set of Network Environment Characteristics.\n+\n+\t\tWhen setting an environment it is important to understand its\n+\t\tapplication. It is not meant to describe the flows that will run\n+\t\ton the ports using this environment, but what the user means TO DO\n+\t\twith the PCD mechanisms in order to parse-classify-distribute those\n+\t\tframes.\n+\t\tBy specifying a distinction unit, the user means it would use that option\n+\t\tfor distinction between frames at either a KeyGen scheme or a coarse\n+\t\tclassification action descriptor. Using interchangeable headers to define a\n+\t\tunit means that the user is indifferent to which of the interchangeable\n+\t\theaders is present in the frame, and wants the distinction to be based\n+\t\ton the presence of either one of them.\n+\n+\t\tDepending on context, there are limitations to the use of environments. A\n+\t\tport using the PCD functionality is bound to an environment. Some or even\n+\t\tall ports may share an environment but also an environment per port is\n+\t\tpossible. When initializing a scheme, a classification plan group (see below),\n+\t\tor a coarse classification tree, one of the initialized environments must be\n+\t\tstated and related to. When a port is bound to a scheme, a classification\n+\t\tplan group, or a coarse classification tree, it MUST be bound to the same\n+\t\tenvironment.\n+\n+\t\tThe different PCD modules, may relate (for flows definition) ONLY on\n+\t\tdistinction units as defined by their environment. When initializing a\n+\t\tscheme for example, it may not choose to select IPV4 as a match for\n+\t\trecognizing flows unless it was defined in the relating environment. In\n+\t\tfact, to guide the user through the configuration of the PCD, each module's\n+\t\tcharacterization in terms of flows is not done using protocol names, but using\n+\t\tenvironment indexes.\n+\n+\t\tIn terms of HW implementation, the list of distinction units sets the LCV vectors\n+\t\tand later used for match vector, classification plan vectors and coarse classification\n+\t\tindexing.\n+\n+ @Param[in,out] ioc_fm_pcd_net_env_params_t   A structure defining the distinction units for this configuration.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET_COMPAT   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), ioc_compat_fm_pcd_net_env_params_t)\n+#endif\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), ioc_fm_pcd_net_env_params_t)\n+\n+/**\n+ @Function\tFM_PCD_NetEnvCharacteristicsDelete\n+\n+ @Description   Deletes a set of Network Environment Charecteristics.\n+\n+ @Param[in]\tioc_fm_obj_t - The id of a Network Environment object.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE_COMPAT  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeSet\n+\n+ @Description   Initializing or modifying and enabling a scheme for the KeyGen.\n+\t\tThis routine should be called for adding or modifying a scheme.\n+\t\tWhen a scheme needs modifying, the API requires that it will be\n+\t\trewritten. In such a case 'modify' should be TRUE. If the\n+\t\troutine is called for a valid scheme and 'modify' is FALSE,\n+\t\tit will return error.\n+\n+ @Param[in,out] ioc_fm_pcd_kg_scheme_params_t   A structure of parameters for defining the scheme\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_KG_SCHEME_SET_COMPAT\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), ioc_compat_fm_pcd_kg_scheme_params_t)\n+#endif\n+#define FM_PCD_IOC_KG_SCHEME_SET\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), ioc_fm_pcd_kg_scheme_params_t)\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeDelete\n+\n+ @Description   Deleting an initialized scheme.\n+\n+ @Param[in]\tioc_fm_obj_t\tscheme id as initialized by application at FM_PCD_IOC_KG_SET_SCHEME\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_KG_SCHEME_DELETE_COMPAT  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_KG_SCHEME_DELETE\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_CcRootBuild\n+\n+ @Description   This routine must be called to define a complete coarse\n+\t\tclassification tree. This is the way to define coarse\n+\t\tclassification to a certain flow - the KeyGen schemes\n+\t\tmay point only to trees defined in this way.\n+\n+ @Param[in,out] ioc_fm_pcd_cc_tree_params_t\tA structure of parameters to define the tree.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_CC_ROOT_BUILD_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), compat_uptr_t)\n+#endif\n+#define FM_PCD_IOC_CC_ROOT_BUILD\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), void *) /* workaround ...*/\n+\n+/**\n+ @Function\tFM_PCD_CcRootDelete\n+\n+ @Description   Deleting a built tree.\n+\n+ @Param[in]\tioc_fm_obj_t - The id of a CC tree.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_CC_ROOT_DELETE_COMPAT\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_CC_ROOT_DELETE\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableSet\n+\n+ @Description   This routine should be called for each CC (coarse classification)\n+\t\tnode. The whole CC tree should be built bottom up so that each\n+\t\tnode points to already defined nodes. p_NodeId returns the node\n+\t\tId to be used by other nodes.\n+\n+ @Param[in,out] ioc_fm_pcd_cc_node_params_t\tA structure for defining the CC node params\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_SET_COMPAT\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), compat_uptr_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_SET\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), void *) /* workaround ...*/\n+\n+/**\n+ @Function\tFM_PCD_MatchTableDelete\n+\n+ @Description   Deleting a built node.\n+\n+ @Param[in]\tioc_fm_obj_t - The id of a CC node.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_DELETE_COMPAT\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_DELETE   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_CcRootModifyNextEngine\n+\n+ @Description   Modify the Next Engine Parameters in the entry of the tree.\n+\n+ @Param[in]\tioc_fm_pcd_cc_tree_modify_next_engine_params_t - Pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_CcRootBuild().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE_COMPAT   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), ioc_compat_fm_pcd_cc_tree_modify_next_engine_params_t)\n+#endif\n+#define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), ioc_fm_pcd_cc_tree_modify_next_engine_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyNextEngine\n+\n+ @Description   Modify the Next Engine Parameters in the relevant key entry of the node.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_modify_next_engine_params_t  A pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE_COMPAT   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), ioc_compat_fm_pcd_cc_node_modify_next_engine_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), ioc_fm_pcd_cc_node_modify_next_engine_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyMissNextEngine\n+\n+ @Description   Modify the Next Engine Parameters of the Miss key case of the node.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_modify_next_engine_params_t - Pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE_COMPAT   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), ioc_compat_fm_pcd_cc_node_modify_next_engine_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), ioc_fm_pcd_cc_node_modify_next_engine_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableRemoveKey\n+\n+ @Description   Remove the key (including next engine parameters of this key)\n+\t\tdefined by the index of the relevant node.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_remove_key_params_t  A pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only after FM_PCD_MatchTableSet() has been called for this\n+\t\tnode and for all of the nodes that lead to it.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY_COMPAT\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), ioc_compat_fm_pcd_cc_node_remove_key_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), ioc_fm_pcd_cc_node_remove_key_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableAddKey\n+\n+ @Description   Add the key (including next engine parameters of this key in the\n+\t\tindex defined by the keyIndex. Note that 'FM_PCD_LAST_KEY_INDEX'\n+\t\tmay be used when the user doesn't care about the position of the\n+\t\tkey in the table - in that case, the key will be automatically\n+\t\tadded by the driver in the last available entry.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t  A pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only after FM_PCD_MatchTableSet() has been called for this\n+\t\tnode and for all of the nodes that lead to it.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_ADD_KEY_COMPAT   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), ioc_compat_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_ADD_KEY  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyKeyAndNextEngine\n+\n+ @Description   Modify the key and Next Engine Parameters of this key in the index defined by key_index.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t  A pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() not only of the relevnt node but also\n+\t\tthe node that points to this node\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE_COMPAT\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), ioc_compat_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyKey\n+\n+ @Description   Modify the key at the index defined by key_index.\n+\n+ @Param[in]\tioc_fm_pcd_cc_node_modify_key_params_t - Pointer to a structure\n+\t\t\t\twith the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only after FM_PCD_MatchTableSet() has been called for this\n+\t\tnode and for all of the nodes that lead to it.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_COMPAT\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), ioc_compat_fm_pcd_cc_node_modify_key_params_t)\n+#endif\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), ioc_fm_pcd_cc_node_modify_key_params_t)\n+\n+/**\n+ @Function\tFM_PCD_HashTableSet\n+\n+ @Description   This routine initializes a hash table structure.\n+\t\tKeyGen hash result determines the hash bucket.\n+\t\tNext, KeyGen key is compared against all keys of this\n+\t\tbucket (exact match).\n+\t\tNumber of sets (number of buckets) of the hash equals to the\n+\t\tnumber of 1-s in 'hash_res_mask' in the provided parameters.\n+\t\tNumber of hash table ways is then calculated by dividing\n+\t\t'max_num_of_keys' equally between the hash sets. This is the\n+\t\tmaximal number of keys that a hash bucket may hold.\n+\t\tThe hash table is initialized empty and keys may be\n+\t\tadded to it following the initialization. Keys masks are not\n+\t\tsupported in current hash table implementation.\n+\t\tThe initialized hash table can be integrated as a node in a\n+\t\tCC tree.\n+\n+ @Param[in,out] ioc_fm_pcd_hash_table_params_t - Pointer to a structure with the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_HASH_TABLE_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_compat_fm_pcd_hash_table_params_t)\n+#endif\n+#define FM_PCD_IOC_HASH_TABLE_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_pcd_hash_table_params_t)\n+\n+/**\n+ @Function\tFM_PCD_HashTableDelete\n+\n+ @Description   This routine deletes the provided hash table and released all\n+\t\tits allocated resources.\n+\n+ @Param[in]\tioc_fm_obj_t - The ID of a hash table.\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_HASH_TABLE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_HASH_TABLE_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_HashTableAddKey\n+\n+ @Description   This routine adds the provided key (including next engine\n+\t\tparameters of this key) to the hash table.\n+\t\tThe key is added as the last key of the bucket that it is\n+\t\tmapped to.\n+\n+ @Param[in]\tioc_fm_pcd_hash_table_add_key_params_t - Pointer to a structure\n+\t\t\twith the relevant parameters\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_HASH_TABLE_ADD_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), ioc_compat_fm_pcd_hash_table_add_key_params_t)\n+#endif\n+#define FM_PCD_IOC_HASH_TABLE_ADD_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), ioc_fm_pcd_hash_table_add_key_params_t)\n+\n+/**\n+ @Function\tFM_PCD_HashTableRemoveKey\n+\n+ @Description   This routine removes the requested key (including next engine\n+\t\tparameters of this key) from the hash table.\n+\n+ @Param[in]\tioc_fm_pcd_hash_table_remove_key_params_t - Pointer to a structure\n+\t\t\t\twith the relevant parameters\n+\n+ @Return\t0 on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), ioc_compat_fm_pcd_hash_table_remove_key_params_t)\n+#endif\n+#define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), ioc_fm_pcd_hash_table_remove_key_params_t)\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileSet\n+\n+ @Description   Sets a profile entry in the policer profile table.\n+\t\tThe routine overrides any existing value.\n+\n+ @Param[in,out] ioc_fm_pcd_plcr_profile_params_t\tA structure of parameters for defining a\n+\t\t\t\t\t\t\tpolicer profile entry.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_PLCR_PROFILE_SET_COMPAT\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_compat_fm_pcd_plcr_profile_params_t)\n+#endif\n+#define FM_PCD_IOC_PLCR_PROFILE_SET\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_pcd_plcr_profile_params_t)\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileDelete\n+\n+ @Description   Delete a profile entry in the policer profile table.\n+\t\tThe routine set entry to invalid.\n+\n+ @Param[in]\tioc_fm_obj_t\tThe id of a policer profile.\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_PLCR_PROFILE_DELETE_COMPAT   _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_PLCR_PROFILE_DELETE  _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeSet\n+\n+ @Description   This routine should be called for defining a manipulation\n+\t\tnode. A manipulation node must be defined before the CC node\n+\t\tthat precedes it.\n+\n+ @Param[in]\tioc_fm_pcd_manip_params_t - A structure of parameters defining the manipulation\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MANIP_NODE_SET_COMPAT\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), ioc_compat_fm_pcd_manip_params_t)\n+#endif\n+#define FM_PCD_IOC_MANIP_NODE_SET   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), ioc_fm_pcd_manip_params_t)\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeReplace\n+\n+ @Description   Change existing manipulation node to be according to new requirement.\n+\t\t(Here, it's implemented as a variant of the same IOCTL as for\n+\t\tFM_PCD_ManipNodeSet(), and one that when called, the 'id' member\n+\t\tin its 'ioc_fm_pcd_manip_params_t' argument is set to contain\n+\t\tthe manip node's handle)\n+\n+ @Param[in]\tioc_fm_pcd_manip_params_t - A structure of parameters defining the manipulation\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MANIP_NODE_REPLACE_COMPAT\tFM_PCD_IOC_MANIP_NODE_SET_COMPAT\n+#endif\n+#define FM_PCD_IOC_MANIP_NODE_REPLACE\tFM_PCD_IOC_MANIP_NODE_SET\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeDelete\n+\n+ @Description   Delete an existing manipulation node.\n+\n+ @Param[in]\tioc_fm_obj_t\tThe id of the manipulation node to delete.\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MANIP_NODE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_MANIP_NODE_DELETE\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_ManipGetStatistics\n+\n+ @Description   Retrieve the manipulation statistics.\n+\n+ @Param[in]\th_ManipNode\tA handle to a manipulation node.\n+ @Param[out]\tp_FmPcdManipStats   A structure for retrieving the manipulation statistics\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_MANIP_GET_STATS_COMPAT  _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), ioc_compat_fm_pcd_manip_get_stats_t)\n+#endif\n+#define FM_PCD_IOC_MANIP_GET_STATS   _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), ioc_fm_pcd_manip_get_stats_t)\n+\n+/**\n+@Function\tFM_PCD_SetAdvancedOffloadSupport\n+\n+@Description   This routine must be called in order to support the following features:\n+\t\tIP-fragmentation, IP-reassembly, IPsec,\n+\t\tHeader-manipulation, frame-replicator.\n+\n+@Param[in]\th_FmPcd\tFM PCD module descriptor.\n+\n+@Return\t0 on success; error code otherwise.\n+\n+@Cautions\tAllowed only when PCD is disabled.\n+*/\n+#define FM_PCD_IOC_SET_ADVANCED_OFFLOAD_SUPPORT _IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45))\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Function\tFM_PCD_FrmReplicSetGroup\n+\n+ @Description   Initialize a Frame Replicator group.\n+\n+ @Param[in]\th_FmPcd\t\tFM PCD module descriptor.\n+ @Param[in]\tp_FrmReplicGroupParam  A structure of parameters for the\n+\t\t\tinitialization of the frame replicator group.\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), ioc_compat_fm_pcd_frm_replic_group_params_t)\n+#endif\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), ioc_fm_pcd_frm_replic_group_params_t)\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicDeleteGroup\n+\n+ @Description   Delete a Frame Replicator group.\n+\n+ @Param[in]\th_FrmReplicGroup  A handle to the frame replicator group.\n+\n+ @Return\tE_OK on success;  Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicAddMember\n+\n+ @Description   Add the member in the index defined by the memberIndex.\n+\n+ @Param[in]\th_FrmReplicGroup   A handle to the frame replicator group.\n+ @Param[in]\tmemberIndex\tmember index for adding.\n+ @Param[in]\tp_MemberParams\tA pointer to the new member parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup() of this group.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), ioc_compat_fm_pcd_frm_replic_member_params_t)\n+#endif\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), ioc_fm_pcd_frm_replic_member_params_t)\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicRemoveMember\n+\n+ @Description   Remove the member defined by the index from the relevant group.\n+\n+ @Param[in]\th_FrmReplicGroup   A handle to the frame replicator group.\n+ @Param[in]\tmemberIndex\tmember index for removing.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup() of this group.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), ioc_compat_fm_pcd_frm_replic_member_t)\n+#endif\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), ioc_fm_pcd_frm_replic_member_t)\n+\n+#endif\n+\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+/**\n+ @Function\tFM_PCD_StatisticsSetNode\n+\n+ @Description   This routine should be called for defining a statistics node.\n+\n+ @Param[in,out] ioc_fm_pcd_stats_params_t A structure of parameters defining the statistics\n+\n+ @Return\t0 on success; Error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PCD_IOC_STATISTICS_SET_NODE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45), void *)\n+#endif\n+#define FM_PCD_IOC_STATISTICS_SET_NODE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45), void *)\n+\n+#endif /* FM_CAPWAP_SUPPORT */\n+\n+/**\n+ @Group\tFM_grp Frame Manager API\n+\n+ @Description   Frame Manager Application Programming Interface\n+\n+ @{\n+*/\n+\n+/**\n+ @Group\tFM_PCD_grp FM PCD\n+\n+ @Description   Frame Manager PCD (Parse-Classify-Distribute) API.\n+\n+\tThe FM PCD module is responsible for the initialization of all\n+\tglobal classifying FM modules. This includes the parser general and\n+\tcommon registers, the key generator global and common registers,\n+\tand the policer global and common registers.\n+\tIn addition, the FM PCD SW module will initialize all required\n+\tkey generator schemes, coarse classification flows, and policer\n+\tprofiles. When FM module is configured to work with one of these\n+\tentities, it will register to it using the FM PORT API. The PCD\n+\tmodule will manage the PCD resources - i.e. resource management of\n+\tKeyGen schemes, etc.\n+\n+ @{\n+*/\n+\n+/**\n+ @Collection\tGeneral PCD defines\n+*/\n+#define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS\t\t2\n+/**< Number of units/headers saved for user */\n+\n+#define FM_PCD_PRS_NUM_OF_HDRS\t\t\t16\n+/**< Number of headers supported by HW parser */\n+#define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS\t(32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)\n+/**< Number of distinction units is limited by\n+\tregister size (32 bits) minus reserved bits\n+\tfor private headers. */\n+#define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS\t4\n+/**< Maximum number of interchangeable headers in a distinction unit */\n+#define FM_PCD_KG_NUM_OF_GENERIC_REGS\t\tFM_KG_NUM_OF_GENERIC_REGS\n+/**< Total number of generic KeyGen registers */\n+#define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY\t35\n+/**< Max number allowed on any configuration;\n+\tFor HW implementation reasons, in most\n+\tcases less than this will be allowed; The\n+\tdriver will return an initialization error\n+\tif resource is unavailable. */\n+#define FM_PCD_KG_NUM_OF_EXTRACT_MASKS\t\t4\n+/**< Total number of masks allowed on KeyGen extractions. */\n+#define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS\t\t16\n+/**< Number of default value logical groups */\n+\n+#define FM_PCD_PRS_NUM_OF_LABELS\t\t\t32\n+/**< Maximum number of SW parser labels */\n+#define FM_SW_PRS_MAX_IMAGE_SIZE\t(FM_PCD_SW_PRS_SIZE /*- FM_PCD_PRS_SW_OFFSET -FM_PCD_PRS_SW_TAIL_SIZE*/ - FM_PCD_PRS_SW_PATCHES_SIZE)\n+/**< Maximum size of SW parser code */\n+\n+#define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE\t128\n+/**< Maximum size of insertion template for insert manipulation */\n+\n+#if (DPAA_VERSION >= 11)\n+#define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES\t64\n+/**< Maximum possible entries for frame replicator group */\n+#endif /* (DPAA_VERSION >= 11) */\n+/* @} */\n+\n+/**\n+ @Group\tFM_PCD_init_grp FM PCD Initialization Unit\n+\n+ @Description   Frame Manager PCD Initialization Unit API\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   Exceptions user callback routine, will be called upon an\n+\t\texception passing the exception identification.\n+\n+ @Param[in]\th_App\t- User's application descriptor.\n+ @Param[in]\texception  - The exception.\n+  */\n+typedef void (t_FmPcdExceptionCallback) (t_Handle h_App,\n+\t\t\t\t\tioc_fm_pcd_exceptions exception);\n+\n+/**\n+ @Description   Exceptions user callback routine, will be called upon an\n+\t\texception passing the exception identification.\n+\n+ @Param[in]\th_App\t- User's application descriptor.\n+ @Param[in]\texception\t- The exception.\n+ @Param[in]\tindex - id of the relevant source (may be scheme or profile id).\n+ */\n+typedef void (t_FmPcdIdExceptionCallback) (t_Handle\th_App,\n+\t\t\t\t\tioc_fm_pcd_exceptions  exception,\n+\t\t\t\t\tuint16_t\tindex);\n+\n+/**\n+ @Description   A callback for enqueuing frame onto a QM queue.\n+\n+ @Param[in]\th_QmArg\t- Application's handle passed to QM module on enqueue.\n+ @Param[in]\tp_Fd\t\t- Frame descriptor for the frame.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+ */\n+typedef uint32_t (t_FmPcdQmEnqueueCallback) (t_Handle h_QmArg, void *p_Fd);\n+\n+/**\n+ @Description   Host-Command parameters structure.\n+\n+\tWhen using Host command for PCD functionalities, a dedicated port\n+\tmust be used. If this routine is called for a PCD in a single partition\n+\tenvironment, or it is the Master partition in a Multi-partition\n+\tenvironment, The port will be initialized by the PCD driver\n+\tinitialization routine.\n+ */\n+typedef struct t_FmPcdHcParams {\n+\tuintptr_t\t\tportBaseAddr;\n+\t/**< Virtual Address of Host-Command Port memory mapped registers.*/\n+\tuint8_t\t\t\tportId;\n+\t/**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);\n+\t\tNOTE: When configuring Host Command port for\n+\t\t\tFMANv3 devices (DPAA_VERSION 11 and higher),\n+\t\t\tportId=0 MUST be used. */\n+\tuint16_t\t\t\tliodnBase;\n+\t/**< LIODN base for this port, to be used together with LIODN offset\n+\t\t(irrelevant for P4080 revision 1.0) */\n+\tuint32_t\t\t\terrFqid;\n+\t/**< Host-Command Port error queue Id. */\n+\tuint32_t\t\t\tconfFqid;\n+\t/**< Host-Command Port confirmation queue Id. */\n+\tuint32_t\t\t\tqmChannel;\n+\t/**< QM channel dedicated to this Host-Command port;\n+\t\twill be used by the FM for dequeue. */\n+\tt_FmPcdQmEnqueueCallback\t*f_QmEnqueue;\n+\t/**< Callback routine for enqueuing a frame to the QM */\n+\tt_Handle\t\t\th_QmArg;\n+\t/**< Application's handle passed to QM module on enqueue */\n+} t_FmPcdHcParams;\n+\n+/**\n+ @Description   The main structure for PCD initialization\n+ */\n+typedef struct t_FmPcdParams {\n+\tbool\t\t\tprsSupport;\n+\t/**< TRUE if Parser will be used for any of the FM ports. */\n+\tbool\t\t\tccSupport;\n+\t/**< TRUE if Coarse Classification will be used for any of the FM ports. */\n+\tbool\t\t\tkgSupport;\n+\t/**< TRUE if KeyGen will be used for any of the FM ports. */\n+\tbool\t\t\tplcrSupport;\n+\t/**< TRUE if Policer will be used for any of the FM ports. */\n+\tt_Handle\t\th_Fm;\n+\t/**< A handle to the FM module. */\n+\tuint8_t\t\t\tnumOfSchemes;\n+\t/**< Number of schemes dedicated to this partition.\n+\t\tthis parameter is relevant if 'kgSupport'=TRUE. */\n+\tbool\t\t\tuseHostCommand;\n+\t/**< Optional for single partition, Mandatory for Multi partition */\n+\tt_FmPcdHcParams\t\thc;\n+\t/**< Host Command parameters, relevant only if 'useHostCommand'=TRUE;\n+\t\tRelevant when FM not runs in \"guest-mode\". */\n+\n+\tt_FmPcdExceptionCallback\t*f_Exception;\n+\t/**< Callback routine for general PCD exceptions;\n+\t\tRelevant when FM not runs in \"guest-mode\". */\n+\tt_FmPcdIdExceptionCallback\t*f_ExceptionId;\n+\t/**< Callback routine for specific KeyGen scheme or\n+\t\tPolicer profile exceptions;\n+\t\tRelevant when FM not runs in \"guest-mode\". */\n+\tt_Handle\t\th_App;\n+\t/**< A handle to an application layer object; This handle will\n+\t\tbe passed by the driver upon calling the above callbacks;\n+\t\tRelevant when FM not runs in \"guest-mode\". */\n+\tuint8_t\t\t\tpartPlcrProfilesBase;\n+\t/**< The first policer-profile-id dedicated to this partition.\n+\t\tthis parameter is relevant if 'plcrSupport'=TRUE.\n+\t\tNOTE: this parameter relevant only when working with multiple partitions. */\n+\tuint16_t\t\tpartNumOfPlcrProfiles;\n+\t\t/**< Number of policer-profiles dedicated to this partition.\n+\t\tthis parameter is relevant if 'plcrSupport'=TRUE.\n+\t\tNOTE: this parameter relevant only when working with multiple partitions. */\n+} t_FmPcdParams;\n+\n+typedef struct t_FmPcdPrsLabelParams {\n+\tuint32_t instructionOffset;\n+\tioc_net_header_type hdr;\n+\tuint8_t indexPerHdr;\n+} t_FmPcdPrsLabelParams;\n+\n+typedef struct t_FmPcdPrsSwParams {\n+\tbool override;\n+\tuint32_t size;\n+\tuint16_t base;\n+\tuint8_t *p_Code;\n+\tuint32_t swPrsDataParams[FM_PCD_PRS_NUM_OF_HDRS];\n+\tuint8_t numOfLabels;\n+\tt_FmPcdPrsLabelParams labelsTable[FM_PCD_PRS_NUM_OF_LABELS];\n+} t_FmPcdPrsSwParams;\n+\n+/**\n+ @Function\tFM_PCD_Config\n+\n+ @Description   Basic configuration of the PCD module.\n+\t\tCreates descriptor for the FM PCD module.\n+\n+ @Param[in]\tp_FmPcdParams\tA structure of parameters for the initialization of PCD.\n+\n+ @Return\tA handle to the initialized module.\n+*/\n+t_Handle FM_PCD_Config(t_FmPcdParams *p_FmPcdParams);\n+\n+/**\n+ @Function\tFM_PCD_Init\n+\n+ @Description   Initialization of the PCD module.\n+\n+ @Param[in]\th_FmPcd - FM PCD module descriptor.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PCD_Init(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_Free\n+\n+ @Description   Frees all resources that were assigned to FM module.\n+\n+\t\tCalling this routine invalidates the descriptor.\n+\n+ @Param[in]\th_FmPcd - FM PCD module descriptor.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PCD_Free(t_Handle h_FmPcd);\n+\n+/**\n+ @Group\tFM_PCD_advanced_cfg_grp\tFM PCD Advanced Configuration Unit\n+\n+ @Description   Frame Manager PCD Advanced Configuration API.\n+\n+ @{\n+*/\n+\n+/**\n+ @Function\tFM_PCD_ConfigException\n+\n+ @Description   Calling this routine changes the internal driver data base\n+\t\tfrom its default selection of exceptions enabling.\n+\t\t[DEFAULT_numOfSharedPlcrProfiles].\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\texception\tThe exception to be selected.\n+ @Param[in]\tenable\tTRUE to enable interrupt, FALSE to mask it.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_ConfigException(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_exceptions exception, bool enable);\n+\n+/**\n+ @Function\tFM_PCD_ConfigHcFramesDataMemory\n+\n+ @Description   Configures memory-partition-id for FMan-Controller Host-Command\n+\t\tframes. Calling this routine changes the internal driver data\n+\t\tbase from its default configuration [0].\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tmemId\tMemory partition ID.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tThis routine may be called only if 'useHostCommand' was TRUE\n+\t\twhen FM_PCD_Config() routine was called.\n+*/\n+uint32_t FM_PCD_ConfigHcFramesDataMemory(t_Handle h_FmPcd, uint8_t memId);\n+\n+/**\n+ @Function\tFM_PCD_ConfigPlcrNumOfSharedProfiles\n+\n+ @Description   Calling this routine changes the internal driver data base\n+\t\tfrom its default selection of exceptions enablement.\n+\t\t[DEFAULT_numOfSharedPlcrProfiles].\n+\n+ @Param[in]\th_FmPcd\t\t\tFM PCD module descriptor.\n+ @Param[in]\tnumOfSharedPlcrProfiles\tNumber of profiles to\n+\t\t\t\tbe shared between ports on this partition\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PCD_ConfigPlcrNumOfSharedProfiles(t_Handle h_FmPcd,\n+\t\tuint16_t numOfSharedPlcrProfiles);\n+\n+/**\n+ @Function\tFM_PCD_ConfigPlcrAutoRefreshMode\n+\n+ @Description   Calling this routine changes the internal driver data base\n+\t\tfrom its default selection of exceptions enablement.\n+\t\tBy default auto-refresh is [DEFAULT_plcrAutoRefresh].\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_ConfigPlcrAutoRefreshMode(t_Handle h_FmPcd, bool enable);\n+\n+/**\n+ @Function\tFM_PCD_ConfigPrsMaxCycleLimit\n+\n+ @Description   Calling this routine changes the internal data structure for\n+\t\tthe maximum parsing time from its default value\n+\t\t[DEFAULT_MAX_PRS_CYC_LIM].\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tvalue\t0 to disable the mechanism, or new\n+\t\t\t\tmaximum parsing time.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_ConfigPrsMaxCycleLimit(t_Handle h_FmPcd, uint16_t value);\n+\n+/** @} */ /* end of FM_PCD_advanced_cfg_grp group */\n+/** @} */ /* end of FM_PCD_init_grp group */\n+\n+/**\n+ @Group\tFM_PCD_Runtime_grp FM PCD Runtime Unit\n+\n+ @Description   Frame Manager PCD Runtime Unit API\n+\n+\tThe runtime control allows creation of PCD infrastructure modules\n+\tsuch as Network Environment Characteristics, Classification Plan\n+\tGroups and Coarse Classification Trees.\n+\tIt also allows on-the-fly initialization, modification and removal\n+\tof PCD modules such as KeyGen schemes, coarse classification nodes\n+\tand Policer profiles.\n+\n+\tIn order to explain the programming model of the PCD driver interface\n+\ta few terms should be explained, and will be used below.\n+\t- Distinction Header - One of the 16 protocols supported by the FM parser,\n+\t\tor one of the SHIM headers (1 or 2). May be a header with a special\n+\t\toption (see below).\n+\t- Interchangeable Headers Group - This is a group of Headers recognized\n+\t\tby either one of them. For example, if in a specific context the user\n+\t\tchooses to treat IPv4 and IPV6 in the same way, they may create an\n+\t\tinterchangeable Headers Unit consisting of these 2 headers.\n+\t- A Distinction Unit - a Distinction Header or an Interchangeable Headers\n+\t\tGroup.\n+\t- Header with special option - applies to Ethernet, MPLS, VLAN, IPv4 and\n+\t\tIPv6, includes multicast, broadcast and other protocol specific options.\n+\t\tIn terms of hardware it relates to the options available in the classification\n+\t\tplan.\n+\t- Network Environment Characteristics - a set of Distinction Units that define\n+\t\tthe total recognizable header selection for a certain environment. This is\n+\t\tNOT the list of all headers that will ever appear in a flow, but rather\n+\t\teverything that needs distinction in a flow, where distinction is made by KeyGen\n+\t\tschemes and coarse classification action descriptors.\n+\n+\tThe PCD runtime modules initialization is done in stages. The first stage after\n+\tinitializing the PCD module itself is to establish a Network Flows Environment\n+\tDefinition. The application may choose to establish one or more such environments.\n+\tLater, when needed, the application will have to state, for some of its modules,\n+\tto which single environment it belongs.\n+\n+ @{\n+*/\n+\n+t_Handle FM_PCD_Open(t_FmPcdParams *p_FmPcdParams);\n+void FM_PCD_Close(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_Enable\n+\n+ @Description   This routine should be called after PCD is initialized for enabling all\n+\t\tPCD engines according to their existing configuration.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() and when PCD is disabled.\n+*/\n+uint32_t FM_PCD_Enable(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_Disable\n+\n+ @Description   This routine may be called when PCD is enabled in order to\n+\t\tdisable all PCD engines. It may be called\n+\t\tonly when none of the ports in the system are using the PCD.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() and when PCD is enabled.\n+*/\n+uint32_t FM_PCD_Disable(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_GetCounter\n+\n+ @Description   Reads one of the FM PCD counters.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tcounter\tThe requested counter.\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNote that it is user's responsibility to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+uint32_t FM_PCD_GetCounter(t_Handle h_FmPcd, ioc_fm_pcd_counters counter);\n+\n+/**\n+@Function\tFM_PCD_PrsLoadSw\n+\n+@Description\tThis routine may be called in order to load software parsing code.\n+\n+@Param[in]\th_FmPcd\tFM PCD module descriptor.\n+@Param[in]\tp_SwPrs\tA pointer to a structure of software\n+\t\t\t\tparser parameters, including the software\n+\t\t\t\tparser image.\n+\n+@Return\tE_OK on success; Error code otherwise.\n+\n+@Cautions\tAllowed only following FM_PCD_Init() and when PCD is disabled.\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_PrsLoadSw(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_prs_sw_params_t *p_SwPrs);\n+\n+/**\n+@Function\tFM_PCD_SetAdvancedOffloadSupport\n+\n+@Description   This routine must be called in order to support the following features:\n+\tIP-fragmentation, IP-reassembly, IPsec, Header-manipulation, frame-replicator.\n+\n+@Param[in]\th_FmPcd\tFM PCD module descriptor.\n+\n+@Return\tE_OK on success; Error code otherwise.\n+\n+@Cautions\tAllowed only following FM_PCD_Init() and when PCD is disabled.\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_SetAdvancedOffloadSupport(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_KgSetDfltValue\n+\n+ @Description   Calling this routine sets a global default value to be used\n+\t\tby the KeyGen when parser does not recognize a required\n+\t\tfield/header.\n+\t\tBy default default values are 0.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tvalueId\t0,1 - one of 2 global default values.\n+ @Param[in]\tvalue\tThe requested default value.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() and when PCD is disabled.\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_KgSetDfltValue(t_Handle h_FmPcd,\n+\t\tuint8_t valueId, uint32_t value);\n+\n+/**\n+ @Function\tFM_PCD_KgSetAdditionalDataAfterParsing\n+\n+ @Description   Calling this routine allows the KeyGen to access data past\n+\t\tthe parser finishing point.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tpayloadOffset   the number of bytes beyond the parser location.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() and when PCD is disabled.\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd,\n+\t\tuint8_t payloadOffset);\n+\n+/**\n+ @Function\tFM_PCD_SetException\n+\n+ @Description   Calling this routine enables/disables PCD interrupts.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\texception\tThe exception to be selected.\n+ @Param[in]\tenable\tTRUE to enable interrupt, FALSE to mask it.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_SetException(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_exceptions exception, bool enable);\n+\n+/**\n+ @Function\tFM_PCD_ModifyCounter\n+\n+ @Description   Sets a value to an enabled counter. Use \"0\" to reset the counter.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tcounter\tThe requested counter.\n+ @Param[in]\tvalue\tThe requested value to be written into the counter.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_ModifyCounter(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_counters counter, uint32_t value);\n+\n+/**\n+ @Function\tFM_PCD_SetPlcrStatistics\n+\n+ @Description   This routine may be used to enable/disable policer statistics\n+\t\tcounter. By default the statistics is enabled.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PCD_SetPlcrStatistics(t_Handle h_FmPcd, bool enable);\n+\n+/**\n+ @Function\tFM_PCD_SetPrsStatistics\n+\n+ @Description   Defines whether to gather parser statistics including all ports.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tNone\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+void FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable);\n+\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+/**\n+ @Function\tFM_PCD_DumpRegs\n+\n+ @Description   Dumps all PCD registers\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers\n+\t\tare mapped.\n+*/\n+uint32_t FM_PCD_DumpRegs(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_KgDumpRegs\n+\n+ @Description   Dumps all PCD KG registers\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers\n+\t\tare mapped.\n+*/\n+uint32_t FM_PCD_KgDumpRegs(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_PlcrDumpRegs\n+\n+ @Description   Dumps all PCD Policer registers\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers\n+\t\tare mapped.\n+*/\n+uint32_t FM_PCD_PlcrDumpRegs(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileDumpRegs\n+\n+ @Description   Dumps all PCD Policer profile registers\n+\n+ @Param[in]\th_Profile\tA handle to a Policer profile.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers\n+\t\tare mapped.\n+*/\n+uint32_t FM_PCD_PlcrProfileDumpRegs(t_Handle h_Profile);\n+\n+/**\n+ @Function\tFM_PCD_PrsDumpRegs\n+\n+ @Description   Dumps all PCD Parser registers\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers\n+\t\tare mapped.\n+*/\n+uint32_t FM_PCD_PrsDumpRegs(t_Handle h_FmPcd);\n+\n+/**\n+ @Function\tFM_PCD_HcDumpRegs\n+\n+ @Description   Dumps HC Port registers\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+\t\tNOTE: this routine may be called only for FM in master mode\n+\t\t(i.e. 'guestId'=NCSW_MASTER_ID).\n+*/\n+uint32_t\tFM_PCD_HcDumpRegs(t_Handle h_FmPcd);\n+#endif /* (defined(DEBUG_ERRORS) && ... */\n+\n+\n+/**\n+ KeyGen\tFM_PCD_Runtime_build_grp FM PCD Runtime Building Unit\n+\n+ @Description   Frame Manager PCD Runtime Building API\n+\n+\t\tThis group contains routines for setting, deleting and modifying\n+\t\tPCD resources, for defining the total PCD tree.\n+ @{\n+*/\n+\n+/**\n+ @Collection\tDefinitions of coarse classification\n+\t\tparameters as required by KeyGen (when coarse classification\n+\t\tis the next engine after this scheme).\n+*/\n+#define FM_PCD_MAX_NUM_OF_CC_TREES\t\t8\n+#define FM_PCD_MAX_NUM_OF_CC_GROUPS\t\t16\n+#define FM_PCD_MAX_NUM_OF_CC_UNITS\t\t4\n+#define FM_PCD_MAX_NUM_OF_KEYS\t\t256\n+#define FM_PCD_MAX_NUM_OF_FLOWS\t\t(4 * KILOBYTE)\n+#define FM_PCD_MAX_SIZE_OF_KEY\t\t56\n+#define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP\t16\n+#define FM_PCD_LAST_KEY_INDEX\t\t0xffff\n+\n+#define FM_PCD_MAX_NUM_OF_CC_NODES\t255 /* Obsolete, not used - will be removed in the future */\n+/* @} */\n+\n+/**\n+ @Collection\tA set of definitions to allow protocol\n+\t\tspecial option description.\n+*/\n+typedef uint32_t\tprotocolOpt_t;\t/**< A general type to define a protocol option. */\n+\n+typedef protocolOpt_t   ethProtocolOpt_t;\t/**< Ethernet protocol options. */\n+#define ETH_BROADCAST\t\t0x80000000  /**< Ethernet Broadcast. */\n+#define ETH_MULTICAST\t\t0x40000000  /**< Ethernet Multicast. */\n+\n+typedef protocolOpt_t   vlanProtocolOpt_t;\t/**< VLAN protocol options. */\n+#define VLAN_STACKED\t\t0x20000000  /**< Stacked VLAN. */\n+\n+typedef protocolOpt_t   mplsProtocolOpt_t;\t/**< MPLS protocol options. */\n+#define MPLS_STACKED\t\t0x10000000  /**< Stacked MPLS. */\n+\n+typedef protocolOpt_t   ipv4ProtocolOpt_t;\t/**< IPv4 protocol options. */\n+#define IPV4_BROADCAST_1\t\t0x08000000  /**< IPv4 Broadcast. */\n+#define IPV4_MULTICAST_1\t\t0x04000000  /**< IPv4 Multicast. */\n+#define IPV4_UNICAST_2\t\t0x02000000  /**< Tunneled IPv4 - Unicast. */\n+#define IPV4_MULTICAST_BROADCAST_2  0x01000000  /**< Tunneled IPv4 - Broadcast/Multicast. */\n+\n+#define IPV4_FRAG_1\t\t0x00000008  /**< IPV4 reassembly option.\n+\t\t\tIPV4 Reassembly manipulation requires network\n+\t\t\tenvironment with IPV4 header and IPV4_FRAG_1 option  */\n+\n+typedef protocolOpt_t   ipv6ProtocolOpt_t;\t/**< IPv6 protocol options. */\n+#define IPV6_MULTICAST_1\t0x00800000  /**< IPv6 Multicast. */\n+#define IPV6_UNICAST_2\t\t0x00400000  /**< Tunneled IPv6 - Unicast. */\n+#define IPV6_MULTICAST_2\t0x00200000  /**< Tunneled IPv6 - Multicast. */\n+\n+#define IPV6_FRAG_1\t\t0x00000004  /**< IPV6 reassembly option.\n+\t\t\tIPV6 Reassembly manipulation requires network\n+\t\t\tenvironment with IPV6 header and IPV6_FRAG_1 option;\n+\t\t\tin case where fragment found, the fragment-extension offset\n+\t\t\tmay be found at 'shim2' (in parser-result). */\n+#if (DPAA_VERSION >= 11)\n+typedef protocolOpt_t   capwapProtocolOpt_t;\t/**< CAPWAP protocol options. */\n+#define CAPWAP_FRAG_1\t\t0x00000008  /**< CAPWAP reassembly option.\n+\t\t\tCAPWAP Reassembly manipulation requires network\n+\t\t\tenvironment with CAPWAP header and CAPWAP_FRAG_1 option;\n+\t\t\tin case where fragment found, the fragment-extension offset\n+\t\t\tmay be found at 'shim2' (in parser-result). */\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/* @} */\n+\n+#define FM_PCD_MANIP_MAX_HDR_SIZE\t256\n+#define FM_PCD_MANIP_DSCP_TO_VLAN_TRANS\t64\n+\n+/**\n+ @Collection\tA set of definitions to support Header Manipulation selection.\n+*/\n+typedef uint32_t\t\thdrManipFlags_t;\n+\t\t/**< A general type to define a HMan update command flags. */\n+\n+typedef hdrManipFlags_t\tipv4HdrManipUpdateFlags_t;\n+\t\t/**< IPv4 protocol HMan update command flags. */\n+\n+#define HDR_MANIP_IPV4_TOS\t0x80000000\n+\t\t\t/**< update TOS with the given value ('tos' field\n+\t\t\tof t_FmPcdManipHdrFieldUpdateIpv4) */\n+#define HDR_MANIP_IPV4_ID\t0x40000000\n+\t\t\t/**< update IP ID with the given value ('id' field\n+\t\t\tof t_FmPcdManipHdrFieldUpdateIpv4) */\n+#define HDR_MANIP_IPV4_TTL\t0x20000000\n+\t\t\t/**< Decrement TTL by 1 */\n+#define HDR_MANIP_IPV4_SRC\t0x10000000\n+\t\t\t/**< update IP source address with the given value\n+\t\t\t('src' field of t_FmPcdManipHdrFieldUpdateIpv4) */\n+#define HDR_MANIP_IPV4_DST\t0x08000000\n+\t\t\t/**< update IP destination address with the given value\n+\t\t\t('dst' field of t_FmPcdManipHdrFieldUpdateIpv4) */\n+\n+typedef hdrManipFlags_t\tipv6HdrManipUpdateFlags_t;  /**< IPv6 protocol HMan update command flags. */\n+\n+#define HDR_MANIP_IPV6_TC\t0x80000000\n+\t\t\t/**< update Traffic Class address with the given value\n+\t\t\t('trafficClass' field of t_FmPcdManipHdrFieldUpdateIpv6) */\n+#define HDR_MANIP_IPV6_HL\t0x40000000\n+\t\t\t/**< Decrement Hop Limit by 1 */\n+#define HDR_MANIP_IPV6_SRC\t0x20000000\n+\t\t\t/**< update IP source address with the given value\n+\t\t\t('src' field of t_FmPcdManipHdrFieldUpdateIpv6) */\n+#define HDR_MANIP_IPV6_DST\t0x10000000\n+\t\t\t/**< update IP destination address with the given value\n+\t\t\t('dst' field of t_FmPcdManipHdrFieldUpdateIpv6) */\n+\n+typedef hdrManipFlags_t\ttcpUdpHdrManipUpdateFlags_t;\n+\t\t/**< TCP/UDP protocol HMan update command flags. */\n+\n+#define HDR_MANIP_TCP_UDP_SRC\t0x80000000\n+\t\t/**< update TCP/UDP source address with the given value\n+\t\t('src' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */\n+#define HDR_MANIP_TCP_UDP_DST\t0x40000000\n+\t\t/**< update TCP/UDP destination address with the given value\n+\t\t('dst' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */\n+#define HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000\n+\t\t/**< update TCP/UDP checksum */\n+\n+/* @} */\n+\n+/**\n+ @Description   A type used for returning the order of the key extraction.\n+\t\teach value in this array represents the index of the extraction\n+\t\tcommand as defined by the user in the initialization extraction array.\n+\t\tThe valid size of this array is the user define number of extractions\n+\t\trequired (also marked by the second '0' in this array).\n+*/\n+typedef\tuint8_t\tt_FmPcdKgKeyOrder[FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];\n+\n+#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+/**\n+ @Description   Enumeration type for selecting type of statistics mode\n+*/\n+typedef enum ioc_fm_pcd_stats_type_t {\n+\te_FM_PCD_STATS_PER_FLOWID = 0\n+\t\t/**< Flow ID is used as index for getting statistics */\n+} ioc_fm_pcd_stats_type_t;\n+#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */\n+\n+/**\n+ @Collection\tDefinitions for CC statistics\n+*/\n+#if (DPAA_VERSION >= 11)\n+#define FM_PCD_CC_STATS_MAX_NUM_OF_FLR\t10\n+\t/* Maximal supported number of frame length ranges */\n+#define FM_PCD_CC_STATS_FLR_SIZE\t2\n+\t/* Size in bytes of a frame length range limit */\n+#endif /* (DPAA_VERSION >= 11) */\n+#define FM_PCD_CC_STATS_COUNTER_SIZE\t4\n+\t/* Size in bytes of a frame length range counter */\n+/* @} */\n+\n+/**\n+ @Description   Parameters for defining CC keys parameters\n+\t\tThe driver supports two methods for CC node allocation: dynamic and static.\n+\t\tStatic mode was created in order to prevent runtime alloc/free\n+\t\tof FMan memory (MURAM), which may cause fragmentation; in this mode,\n+\t\tthe driver automatically allocates the memory according to\n+\t\t'maxNumOfKeys' parameter. The driver calculates the maximal memory\n+\t\tsize that may be used for this CC-Node taking into consideration\n+\t\t'maskSupport' and 'statisticsMode' parameters.\n+\t\tWhen 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction\n+\t\tparameters of this node, 'maxNumOfKeys' must be equal to 'numOfKeys'.\n+\t\tIn dynamic mode, 'maxNumOfKeys' must be zero. At initialization,\n+\t\tall required structures are allocated according to 'numOfKeys'\n+\t\tparameter. During runtime modification, these structures are\n+\t\tre-allocated according to the updated number of keys.\n+\n+\t\tPlease note that 'action' and 'icIndxMask' mentioned in the\n+\t\tspecific parameter explanations are passed in the extraction\n+\t\tparameters of the node (fields of extractCcParams.extractNonHdr).\n+*/\n+typedef struct t_KeysParams {\n+\tuint16_t\tmaxNumOfKeys;\n+\t/**< Maximum number of keys that will (ever) be used in this CC-Node;\n+\tA value of zero may be used for dynamic memory allocation. */\n+\tbool\t\tmaskSupport;\n+\t\t/**< This parameter is relevant only if a node is initialized with\n+\t\t'action' = e_FM_PCD_ACTION_EXACT_MATCH and maxNumOfKeys > 0;\n+\t\tShould be TRUE to reserve table memory for key masks, even if\n+\t\tinitial keys do not contain masks, or if the node was initialized\n+\t\tas 'empty' (without keys); this will allow user to add keys with\n+\t\tmasks at runtime.\n+\t\tNOTE that if user want to use only global-masks (i.e. one common mask\n+\t\tfor all the entries within this table, this parameter should set to 'FALSE'. */\n+\tioc_fm_pcd_cc_stats_mode\tstatisticsMode;\n+\t\t\t/**< Determines the supported statistics mode for all node's keys.\n+\t\t\tTo enable statistics gathering, statistics should be enabled per\n+\t\t\tevery key, using 'statisticsEn' in next engine parameters structure\n+\t\t\tof that key;\n+\t\t\tIf 'maxNumOfKeys' is set, all required structures will be\n+\t\t\tpreallocated for all keys. */\n+#if (DPAA_VERSION >= 11)\n+\tuint16_t\tframeLengthRanges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];\n+\t\t/**< Relevant only for 'RMON' statistics mode\n+\t\t(this feature is supported only on B4860 device);\n+\t\tHolds a list of programmable thresholds - for each received frame,\n+\t\tits length in bytes is examined against these range thresholds and\n+\t\tthe appropriate counter is incremented by 1 - for example, to belong\n+\t\tto range i, the following should hold:\n+\t\trange i-1 threshold < frame length <= range i threshold\n+\t\tEach range threshold must be larger then its preceding range\n+\t\tthreshold, and last range threshold must be 0xFFFF. */\n+#endif /* (DPAA_VERSION >= 11) */\n+\tuint16_t\tnumOfKeys;\n+\t\t/**< Number of initial keys;\n+\t\tNote that in case of 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP,\n+\t\tthis field should be power-of-2 of the number of bits that are\n+\t\tset in 'icIndxMask'. */\n+\tuint8_t\t\tkeySize;\n+\t\t\t/**< Size of key - for extraction of type FULL_FIELD, 'keySize' has\n+\t\t\tto be the standard size of the selected key; For other extraction\n+\t\t\ttypes, 'keySize' has to be as size of extraction; When 'action' =\n+\t\t\te_FM_PCD_ACTION_INDEXED_LOOKUP, 'keySize' must be 2. */\n+\tioc_fm_pcd_cc_key_params_t\tkeyParams[FM_PCD_MAX_NUM_OF_KEYS];\n+\t/**< An array with 'numOfKeys' entries, each entry specifies the\n+\t\tcorresponding key parameters;\n+\t\tWhen 'action' = e_FM_PCD_ACTION_EXACT_MATCH, this value must not\n+\t\texceed 255 (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved\n+\t\tfor the 'miss' entry. */\n+\tioc_fm_pcd_cc_next_engine_params_t   ccNextEngineParamsForMiss;\n+\t\t/**< Parameters for defining the next engine when a key is not matched;\n+\t\t\tNot relevant if action = e_FM_PCD_ACTION_INDEXED_LOOKUP. */\n+} t_KeysParams;\n+\n+#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+/**\n+ @Description   Parameters for defining an insertion manipulation\n+\t\tof type e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_insrt_by_template_params_t {\n+\tuint8_t\tsize;\t/**< Size of insert template to the start of the frame. */\n+\tuint8_t\thdrTemplate[FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE];\n+\t\t\t/**< Array of the insertion template. */\n+\n+\tbool\t\tmodifyOuterIp;\n+\t\t\t/**< TRUE if user want to modify some fields in outer IP. */\n+\tstruct {\n+\tuint16_t\tipOuterOffset;\n+\t/**< Offset of outer IP in the insert template, relevant if modifyOuterIp = TRUE.*/\n+\tuint16_t\tdscpEcn;\n+\t\t/**< value of dscpEcn in IP outer, relevant if modifyOuterIp = TRUE.\n+\t\tin IPV4 dscpEcn only byte - it has to be adjusted to the right*/\n+\tbool\tudpPresent;\n+\t/**< TRUE if UDP is present in the insert template, relevant if modifyOuterIp = TRUE.*/\n+\tuint8_t\tudpOffset;\n+\t/**< Offset in the insert template of UDP, relevant\n+\tif modifyOuterIp = TRUE and udpPresent=TRUE.*/\n+\tuint8_t\tipIdentGenId;\n+\t/**< Used by FMan-CTRL to calculate IP-identification field,\n+\trelevant if modifyOuterIp = TRUE.*/\n+\tbool\trecalculateLength;\n+\t/**< TRUE if recalculate length has to be performed due to the engines in the path\n+\twhich can change the frame later, relevant if modifyOuterIp = TRUE.*/\n+\tstruct {\n+\t\tuint8_t blockSize;\n+\t/**< The CAAM block-size; Used by FMan-CTRL to calculate the IP Total Length field.*/\n+\t\tuint8_t extraBytesAddedAlignedToBlockSize;\n+\t/**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length*/\n+\t\tuint8_t extraBytesAddedNotAlignedToBlockSize;\n+\t/**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length.*/\n+\t} recalculateLengthParams;\n+\t/**< Recalculate length parameters - relevant\n+\tif modifyOuterIp = TRUE and recalculateLength = TRUE */\n+\t} modifyOuterIpParams;\n+\t/**< Outer IP modification parameters - ignored if modifyOuterIp is FALSE */\n+\n+\tbool\tmodifyOuterVlan;\n+\t\t/**< TRUE if user wants to modify VPri field in the outer VLAN header*/\n+\tstruct {\n+\tuint8_t\tvpri;\t/**< Value of VPri, relevant if modifyOuterVlan = TRUE\n+\t\t\tVPri only 3 bits, it has to be adjusted to the right*/\n+\t} modifyOuterVlanParams;\n+} ioc_fm_pcd_manip_hdr_insrt_by_template_params_t;\n+\n+/**\n+ @Description   Parameters for defining CAPWAP fragmentation\n+*/\n+typedef struct ioc_capwap_fragmentation_params {\n+\tuint16_t\tsizeForFragmentation;\n+\t/**< if length of the frame is greater than this value,\n+\t\tCAPWAP fragmentation will be executed. */\n+\tbool\t\theaderOptionsCompr;\n+\t/**< TRUE - first fragment include the CAPWAP header options field,\n+\t\tand all other fragments exclude the CAPWAP options field,\n+\t\tFALSE - all fragments include CAPWAP header options field. */\n+} ioc_capwap_fragmentation_params;\n+\n+/**\n+ @Description   Parameters for defining CAPWAP reassembly\n+*/\n+typedef struct ioc_capwap_reassembly_params {\n+\tuint16_t\tmaxNumFramesInProcess;\n+\t/**< Number of frames which can be reassembled concurrently; must be power of 2.\n+\tIn case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,\n+\tmaxNumFramesInProcess has to be in the range of 4 - 512,\n+\tIn case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,\n+\tmaxNumFramesInProcess has to be in the range of 8 - 2048 */\n+\n+\tbool\thaltOnDuplicationFrag;\n+\t\t/**< If TRUE, reassembly process will be halted due to duplicated fragment,\n+\t\tand all processed fragments will be enqueued with error indication;\n+\t\tIf FALSE, only duplicated fragments will be enqueued with error indication. */\n+\n+\te_FmPcdManipReassemTimeOutMode timeOutMode;\n+\t\t\t/**< Expiration delay initialized by the reassembly process */\n+\tuint32_t\tfqidForTimeOutFrames;\n+\t/**< FQID in which time out frames will enqueue during Time Out Process  */\n+\tuint32_t\ttimeoutRoutineRequestTime;\n+\t\t/**< Represents the time interval in microseconds between consecutive\n+\t\ttimeout routine requests It has to be power of 2. */\n+\tuint32_t\ttimeoutThresholdForReassmProcess;\n+\t\t/**< Time interval (microseconds) for marking frames in process as too old;\n+\t\tFrames in process are those for which at least one fragment was received\n+\t\tbut not all fragments. */\n+\n+\te_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;\n+\t/**< Number of frames per hash entry (needed for the reassembly process) */\n+} ioc_capwap_reassembly_params;\n+\n+/**\n+ @Description   Parameters for defining fragmentation/reassembly manipulation\n+*/\n+typedef struct ioc_fm_pcd_manip_frag_or_reasm_params_t {\n+\tbool\tfrag;\t\t/**< TRUE if using the structure for fragmentation,\n+\t\t\t\totherwise this structure is used for reassembly */\n+\tuint8_t\tsgBpid;\t\t/**< Scatter/Gather buffer pool id;\n+\t\t\t\tSame LIODN number is used for these buffers as for\n+\t\t\t\tthe received frames buffers, so buffers of this pool\n+\t\t\t\tneed to be allocated in the same memory area as the\n+\t\t\t\treceived buffers. If the received buffers arrive\n+\t\t\t\tfrom different sources, the Scatter/Gather BP id\n+\t\t\t\tshould be mutual to all these sources. */\n+\tioc_net_header_type\thdr;\t\t/**< Header selection */\n+\tunion {\n+\tioc_capwap_fragmentation_params\tcapwapFragParams;\n+\t\t\t/**< Structure for CAPWAP fragmentation,\n+\t\t\trelevant if 'frag' = TRUE, 'hdr' = HEADER_TYPE_CAPWAP */\n+\tioc_capwap_reassembly_params\tcapwapReasmParams;\n+\t\t\t/**< Structure for CAPWAP reassembly,\n+\t\t\trelevant if 'frag' = FALSE, 'hdr' = HEADER_TYPE_CAPWAP */\n+\t} u;\n+} ioc_fm_pcd_manip_frag_or_reasm_params_t;\n+#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */\n+\n+/**\n+ @Description   Parameters for defining custom header manipulation for generic field replacement\n+*/\n+typedef struct ioc_fm_pcd_manip_hdr_custom_gen_field_replace {\n+\tuint8_t\t\tsrcOffset; /**< Location of new data - Offset from\n+\t\t\t\tParse Result  (>= 16, srcOffset+size <= 32, ) */\n+\tuint8_t\t\tdstOffset; /**< Location of data to be overwritten - Offset from\n+\t\t\t\tstart of frame (dstOffset + size <= 256). */\n+\tuint8_t\t\tsize; /**< The number of bytes (<=16) to be replaced */\n+\tuint8_t\t\tmask;\t/**< Optional 1 byte mask. Set to select bits for\n+\t\t\t\treplacement (1 - bit will be replaced);\n+\t\t\t\tClear to use field as is. */\n+\tuint8_t\t\tmaskOffset;\t/**< Relevant if mask != 0;\n+\t\t\t\t\tMask offset within the replaces \"size\" */\n+} ioc_fm_pcd_manip_hdr_custom_gen_field_replace;\n+\n+#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+/**\n+ @Description   structure for defining statistics node\n+*/\n+typedef struct ioc_fm_pcd_stats_params_t {\n+\tioc_fm_pcd_stats_type_t\ttype;   /**< type of statistics node */\n+} ioc_fm_pcd_stats_params_t;\n+#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */\n+\n+/**\n+ @Function\tFM_PCD_NetEnvCharacteristicsSet\n+\n+ @Description   Define a set of Network Environment Characteristics.\n+\n+\t\tWhen setting an environment it is important to understand its\n+\t\tapplication. It is not meant to describe the flows that will run\n+\t\ton the ports using this environment, but what the user means TO DO\n+\t\twith the PCD mechanisms in order to parse-classify-distribute those\n+\t\tframes.\n+\t\tBy specifying a distinction unit, the user means it would use that option\n+\t\tfor distinction between frames at either a KeyGen scheme or a coarse\n+\t\tclassification action descriptor. Using interchangeable headers to define a\n+\t\tunit means that the user is indifferent to which of the interchangeable\n+\t\theaders is present in the frame, and wants the distinction to be based\n+\t\ton the presence of either one of them.\n+\n+\t\tDepending on context, there are limitations to the use of environments. A\n+\t\tport using the PCD functionality is bound to an environment. Some or even\n+\t\tall ports may share an environment but also an environment per port is\n+\t\tpossible. When initializing a scheme, a classification plan group (see below),\n+\t\tor a coarse classification tree, one of the initialized environments must be\n+\t\tstated and related to. When a port is bound to a scheme, a classification\n+\t\tplan group, or a coarse classification tree, it MUST be bound to the same\n+\t\tenvironment.\n+\n+\t\tThe different PCD modules, may relate (for flows definition) ONLY on\n+\t\tdistinction units as defined by their environment. When initializing a\n+\t\tscheme for example, it may not choose to select IPV4 as a match for\n+\t\trecognizing flows unless it was defined in the relating environment. In\n+\t\tfact, to guide the user through the configuration of the PCD, each module's\n+\t\tcharacterization in terms of flows is not done using protocol names, but using\n+\t\tenvironment indexes.\n+\n+\t\tIn terms of HW implementation, the list of distinction units sets the LCV\n+\t\tvectors and later used for match vector, classification plan vectors and\n+\t\tcoarse classification indexing.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tp_NetEnvParams  A structure of parameters for the initialization of\n+\t\t\t\tthe network environment.\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_NetEnvCharacteristicsSet(t_Handle,\n+\t\t\t\t\t ioc_fm_pcd_net_env_params_t *);\n+\n+/**\n+ @Function\tFM_PCD_NetEnvCharacteristicsDelete\n+\n+ @Description   Deletes a set of Network Environment Characteristics.\n+\n+ @Param[in]\th_NetEnv\tA handle to the Network environment.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PCD_NetEnvCharacteristicsDelete(t_Handle h_NetEnv);\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeSet\n+\n+ @Description   Initializing or modifying and enabling a scheme for the KeyGen.\n+\t\tThis routine should be called for adding or modifying a scheme.\n+\t\tWhen a scheme needs modifying, the API requires that it will be\n+\t\trewritten. In such a case 'modify' should be TRUE. If the\n+\t\troutine is called for a valid scheme and 'modify' is FALSE,\n+\t\tit will return error.\n+\n+ @Param[in]\th_FmPcd\tIf this is a new scheme - A handle to an FM PCD Module.\n+\t\t\t\tOtherwise NULL (ignored by driver).\n+ @Param[in,out] p_SchemeParams  A structure of parameters for defining the scheme\n+\n+ @Return\tA handle to the initialized scheme on success; NULL code otherwise.\n+\t\tWhen used as \"modify\" (rather than for setting a new scheme),\n+\t\tp_SchemeParams->id.h_Scheme will return NULL if action fails due to scheme\n+\t\tBUSY state.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_KgSchemeSet(t_Handle h_FmPcd,\n+\t\t\t    ioc_fm_pcd_kg_scheme_params_t *p_SchemeParams);\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeDelete\n+\n+ @Description   Deleting an initialized scheme.\n+\n+ @Param[in]\th_Scheme\tscheme handle as returned by FM_PCD_KgSchemeSet()\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().\n+*/\n+uint32_t\tFM_PCD_KgSchemeDelete(t_Handle h_Scheme);\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeGetCounter\n+\n+ @Description   Reads scheme packet counter.\n+\n+ @Param[in]\th_Scheme\tscheme handle as returned by FM_PCD_KgSchemeSet().\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().\n+*/\n+uint32_t  FM_PCD_KgSchemeGetCounter(t_Handle h_Scheme);\n+\n+/**\n+ @Function\tFM_PCD_KgSchemeSetCounter\n+\n+ @Description   Writes scheme packet counter.\n+\n+ @Param[in]\th_Scheme\tscheme handle as returned by FM_PCD_KgSchemeSet().\n+ @Param[in]\tvalue\tNew scheme counter value - typically '0' for\n+\t\t\t\tresetting the counter.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().\n+*/\n+uint32_t  FM_PCD_KgSchemeSetCounter(t_Handle h_Scheme,\n+\t\t\tuint32_t value);\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileSet\n+\n+ @Description   Sets a profile entry in the policer profile table.\n+\t\tThe routine overrides any existing value.\n+\n+ @Param[in]\th_FmPcd\tA handle to an FM PCD Module.\n+ @Param[in]\tp_Profile\tA structure of parameters for defining a\n+\t\t\t\tpolicer profile entry.\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\t\tWhen used as \"modify\" (rather than for setting a new profile),\n+\t\tp_Profile->id.h_Profile will return NULL if action fails due to profile\n+\t\tBUSY state.\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_PlcrProfileSet(t_Handle h_FmPcd,\n+\t\t\t       ioc_fm_pcd_plcr_profile_params_t  *p_Profile);\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileDelete\n+\n+ @Description   Delete a profile entry in the policer profile table.\n+\t\tThe routine set entry to invalid.\n+\n+ @Param[in]\th_Profile\tA handle to the profile.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_PlcrProfileDelete(t_Handle h_Profile);\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileGetCounter\n+\n+ @Description   Sets an entry in the classification plan.\n+\t\tThe routine overrides any existing value.\n+\n+ @Param[in]\th_Profile\tA handle to the profile.\n+ @Param[in]\tcounter\tCounter selector.\n+\n+ @Return\tspecific counter value.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_PlcrProfileGetCounter(t_Handle \th_Profile,\n+\t\t\tioc_fm_pcd_plcr_profile_counters\tcounter);\n+\n+/**\n+ @Function\tFM_PCD_PlcrProfileSetCounter\n+\n+ @Description   Sets an entry in the classification plan.\n+\t\tThe routine overrides any existing value.\n+\n+ @Param[in]\th_Profile\tA handle to the profile.\n+ @Param[in]\tcounter\tCounter selector.\n+ @Param[in]\tvalue\tvalue to set counter with.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_PlcrProfileSetCounter(t_Handle h_Profile,\n+\t\t\t\t      ioc_fm_pcd_plcr_profile_counters counter,\n+\t\t\t\t\tuint32_t\t\tvalue);\n+\n+/**\n+ @Function\tFM_PCD_CcRootBuild\n+\n+ @Description   This routine must be called to define a complete coarse\n+\t\tclassification tree. This is the way to define coarse\n+\t\tclassification to a certain flow - the KeyGen schemes\n+\t\tmay point only to trees defined in this way.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tp_Params\tA structure of parameters to define the tree.\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_CcRootBuild(t_Handle h_FmPcd,\n+\t\t\t     ioc_fm_pcd_cc_tree_params_t  *p_Params);\n+\n+/**\n+ @Function\tFM_PCD_CcRootDelete\n+\n+ @Description   Deleting an built tree.\n+\n+ @Param[in]\th_CcTree\tA handle to a CC tree.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_CcRootDelete(t_Handle h_CcTree);\n+\n+/**\n+ @Function\tFM_PCD_CcRootModifyNextEngine\n+\n+ @Description   Modify the Next Engine Parameters in the entry of the tree.\n+\n+ @Param[in]\th_CcTree\t\t\tA handle to the tree\n+ @Param[in]\tgrpId\t\t\tA Group index in the tree\n+ @Param[in]\tindex\t\t\tEntry index in the group defined by grpId\n+ @Param[in]\tp_FmPcdCcNextEngineParams   Pointer to new next engine parameters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_CcBuildTree().\n+*/\n+uint32_t FM_PCD_CcRootModifyNextEngine(t_Handle h_CcTree,\n+\t\tuint8_t\t\tgrpId,\n+\t\tuint8_t\t\tindex,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableSet\n+\n+ @Description   This routine should be called for each CC (coarse classification)\n+\t\tnode. The whole CC tree should be built bottom up so that each\n+\t\tnode points to already defined nodes.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tp_Param\tA structure of parameters defining the CC node\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle   FM_PCD_MatchTableSet(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_cc_node_params_t *p_Param);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableDelete\n+\n+ @Description   Deleting an built node.\n+\n+ @Param[in]\th_CcNode\tA handle to a CC node.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_MatchTableDelete(t_Handle h_CcNode);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyMissNextEngine\n+\n+ @Description   Modify the Next Engine Parameters of the Miss key case of the node.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tp_FmPcdCcNextEngineParams   Parameters for defining next engine\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet();\n+\t\tNot relevant in the case the node is of type 'INDEXED_LOOKUP'.\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+\n+*/\n+uint32_t FM_PCD_MatchTableModifyMissNextEngine(t_Handle h_CcNode,\n+\t       ioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableRemoveKey\n+\n+ @Description   Remove the key (including next engine parameters of this key)\n+\t\tdefined by the index of the relevant node.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeyIndex\t\t\tKey index for removing\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+*/\n+uint32_t FM_PCD_MatchTableRemoveKey(t_Handle h_CcNode,\n+\t\t\tuint16_t keyIndex);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableAddKey\n+\n+ @Description   Add the key (including next engine parameters of this key in the\n+\t\tindex defined by the keyIndex. Note that 'FM_PCD_LAST_KEY_INDEX'\n+\t\tmay be used by user that don't care about the position of the\n+\t\tkey in the table - in that case, the key will be automatically\n+\t\tadded by the driver in the last available entry.\n+\n+ @Param[in]\th_CcNode\tA handle to the node\n+ @Param[in]\tkeyIndex\tKey index for adding.\n+ @Param[in]\tkeySize\tKey size of added key\n+ @Param[in]\tp_KeyParams  A pointer to the parameters includes\n+\t\t\t\tnew key with Next Engine Parameters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+*/\n+uint32_t FM_PCD_MatchTableAddKey(t_Handle h_CcNode,\n+\t\t\t\tuint16_t\t\tkeyIndex,\n+\t\t\t\tuint8_t\t\tkeySize,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_KeyParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyNextEngine\n+\n+ @Description   Modify the Next Engine Parameters in the relevant key entry of the node.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeyIndex\t\t\tKey index for Next Engine modifications\n+ @Param[in]\tp_FmPcdCcNextEngineParams   Parameters for defining next engine\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+\n+*/\n+uint32_t FM_PCD_MatchTableModifyNextEngine(t_Handle h_CcNode,\n+\t\tuint16_t\t\tkeyIndex,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyKeyAndNextEngine\n+\n+ @Description   Modify the key and Next Engine Parameters of this key in the\n+\t\tindex defined by the keyIndex.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeyIndex\t\t\tKey index for adding\n+ @Param[in]\tkeySize\t\t\tKey size of added key\n+ @Param[in]\tp_KeyParams\t\tA pointer to the parameters includes\n+\t\t\t\t\tmodified key and modified Next Engine Params\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+*/\n+uint32_t FM_PCD_MatchTableModifyKeyAndNextEngine(t_Handle h_CcNode,\n+\t\t\t\tuint16_t\t\tkeyIndex,\n+\t\t\t\tuint8_t\t\tkeySize,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_KeyParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableModifyKey\n+\n+ @Description   Modify the key in the index defined by the keyIndex.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeyIndex\t\t\tKey index for adding\n+ @Param[in]\tkeySize\t\t\tKey size of added key\n+ @Param[in]\tp_Key\t\t\tA pointer to the new key\n+ @Param[in]\tp_Mask\t\t\tA pointer to the new mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+*/\n+uint32_t FM_PCD_MatchTableModifyKey(t_Handle h_CcNode,\n+\t\t\t\tuint16_t keyIndex,\n+\t\t\t\tuint8_t  keySize,\n+\t\t\t\tuint8_t  *p_Key,\n+\t\t\t\tuint8_t  *p_Mask);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableFindNRemoveKey\n+\n+ @Description   Remove the key (including next engine parameters of this key)\n+\t\tdefined by the key and mask. Note that this routine will search\n+\t\tthe node to locate the index of the required key (& mask) to remove.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeySize\t\t\tKey size of the one to remove.\n+ @Param[in]\tp_Key\t\t\tA pointer to the requested key to remove.\n+ @Param[in]\tp_Mask\t\t\tA pointer to the mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+*/\n+uint32_t FM_PCD_MatchTableFindNRemoveKey(t_Handle h_CcNode,\n+\t\t\t\t\tuint8_t  keySize,\n+\t\t\t\t\tuint8_t  *p_Key,\n+\t\t\t\t\tuint8_t  *p_Mask);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableFindNModifyNextEngine\n+\n+ @Description   Modify the Next Engine Parameters in the relevant key entry of\n+\t\tthe node. Note that this routine will search the node to locate\n+\t\tthe index of the required key (& mask) to modify.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeySize\t\t\tKey size of the one to modify.\n+ @Param[in]\tp_Key\t\t\tA pointer to the requested key to modify.\n+ @Param[in]\tp_Mask\t\t\tA pointer to the mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+ @Param[in]\tp_FmPcdCcNextEngineParams   Parameters for defining next engine\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+*/\n+uint32_t FM_PCD_MatchTableFindNModifyNextEngine(t_Handle h_CcNode,\n+\t\tuint8_t\t\tkeySize,\n+\t\tuint8_t\t\t*p_Key,\n+\t\tuint8_t\t\t*p_Mask,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableFindNModifyKeyAndNextEngine\n+\n+ @Description   Modify the key and Next Engine Parameters of this key in the\n+\t\tindex defined by the keyIndex. Note that this routine will search\n+\t\tthe node to locate the index of the required key (& mask) to modify.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeySize\t\t\tKey size of the one to modify.\n+ @Param[in]\tp_Key\t\t\tA pointer to the requested key to modify.\n+ @Param[in]\tp_Mask\t\t\tA pointer to the mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+ @Param[in]\tp_KeyParams\t\tA pointer to the parameters includes\n+\t\t\t\t\tmodified key and modified Next Engine Params\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+*/\n+uint32_t FM_PCD_MatchTableFindNModifyKeyAndNextEngine(\n+\t\t\t\tt_Handle\th_CcNode,\n+\t\t\t\tuint8_t\t\tkeySize,\n+\t\t\t\tuint8_t\t\t*p_Key,\n+\t\t\t\tuint8_t\t\t*p_Mask,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_KeyParams);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableFindNModifyKey\n+\n+ @Description   Modify the key  in the index defined by the keyIndex. Note that\n+\t\tthis routine will search the node to locate the index of the\n+\t\trequired key (& mask) to modify.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node\n+ @Param[in]\tkeySize\t\t\tKey size of the one to modify.\n+ @Param[in]\tp_Key\t\t\tA pointer to the requested key to modify.\n+ @Param[in]\tp_Mask\t\t\tA pointer to the mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+ @Param[in]\tp_NewKey\t\t\tA pointer to the new key\n+ @Param[in]\tp_NewMask\t\tA pointer to the new mask if relevant,\n+\t\t\t\t\t\totherwise pointer to NULL\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet() was called for this\n+\t\tnode and the nodes that lead to it.\n+*/\n+uint32_t FM_PCD_MatchTableFindNModifyKey(t_Handle h_CcNode,\n+\t\t\t\t\tuint8_t  keySize,\n+\t\t\t\t\tuint8_t  *p_Key,\n+\t\t\t\t\tuint8_t  *p_Mask,\n+\t\t\t\t\tuint8_t  *p_NewKey,\n+\t\t\t\t\tuint8_t  *p_NewMask);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableGetKeyCounter\n+\n+ @Description   This routine may be used to get a counter of specific key in a CC\n+\t\tNode; This counter reflects how many frames passed that were matched\n+\t\tthis key.\n+\n+ @Param[in]\th_CcNode\tA handle to the node\n+ @Param[in]\tkeyIndex\tKey index for adding\n+\n+ @Return\tThe specific key counter.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+uint32_t FM_PCD_MatchTableGetKeyCounter(t_Handle h_CcNode,\n+\t\t\t\tuint16_t keyIndex);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableGetKeyStatistics\n+\n+ @Description   This routine may be used to get statistics counters of specific key\n+\t\tin a CC Node.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames passed that were matched\n+\t\tthis key; The total frames count will be returned in the counter\n+\t\tof the first range (as only one frame length range was defined).\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total\n+\t\tframe count will be separated to frame length counters, based on\n+\t\tprovided frame length ranges.\n+\n+ @Param[in]\th_CcNode\tA handle to the node\n+ @Param[in]\tkeyIndex\tKey index for adding\n+ @Param[out]\tp_KeyStatistics Key statistics counters\n+\n+ @Return\tThe specific key statistics.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+uint32_t FM_PCD_MatchTableGetKeyStatistics(t_Handle h_CcNode,\n+\t\t\tuint16_t\t\tkeyIndex,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t\t*p_KeyStatistics);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableGetMissStatistics\n+\n+ @Description   This routine may be used to get statistics counters of miss entry\n+\t\tin a CC Node.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames were not matched to any\n+\t\texisting key and therefore passed through the miss entry; The\n+\t\ttotal frames count will be returned in the counter of the\n+\t\tfirst range (as only one frame length range was defined).\n+\n+ @Param[in]\th_CcNode\t\tA handle to the node\n+ @Param[out]\tp_MissStatistics\tStatistics counters for 'miss'\n+\n+ @Return\tThe statistics for 'miss'.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+uint32_t FM_PCD_MatchTableGetMissStatistics(t_Handle h_CcNode,\n+\t\t    ioc_fm_pcd_cc_key_statistics_t\t*p_MissStatistics);\n+\n+/**\n+ @Function\tFM_PCD_MatchTableFindNGetKeyStatistics\n+\n+ @Description   This routine may be used to get statistics counters of specific key\n+\t\tin a CC Node.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames passed that were matched\n+\t\tthis key; The total frames count will be returned in the counter\n+\t\tof the first range (as only one frame length range was defined).\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total\n+\t\tframe count will be separated to frame length counters, based on\n+\t\tprovided frame length ranges.\n+\t\tNote that this routine will search the node to locate the index\n+\t\tof the required key based on received key parameters.\n+\n+ @Param[in]\th_CcNode\tA handle to the node\n+ @Param[in]\tkeySize\tSize of the requested key\n+ @Param[in]\tp_Key\tA pointer to the requested key\n+ @Param[in]\tp_Mask\tA pointer to the mask if relevant,\n+\t\t\t\totherwise pointer to NULL\n+ @Param[out]\tp_KeyStatistics Key statistics counters\n+\n+ @Return\tThe specific key statistics.\n+\n+ @Cautions\tAllowed only following FM_PCD_MatchTableSet().\n+*/\n+uint32_t FM_PCD_MatchTableFindNGetKeyStatistics(t_Handle h_CcNode,\n+\t\t\tuint8_t\t\tkeySize,\n+\t\t\tuint8_t\t\t*p_Key,\n+\t\t\tuint8_t\t\t*p_Mask,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t   *p_KeyStatistics);\n+\n+/*\n+ @Function\tFM_PCD_MatchTableGetNextEngine\n+\n+ @Description   Gets NextEngine of the relevant keyIndex.\n+\n+ @Param[in]\th_CcNode\t\t\tA handle to the node.\n+ @Param[in]\tkeyIndex\t\t\tkeyIndex in the relevant node.\n+ @Param[out]\tp_FmPcdCcNextEngineParams   here updated nextEngine parameters for\n+\t\t\t\t\t\tthe relevant keyIndex of the CC Node\n+\t\t\t\t\t\treceived as parameter to this function\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+uint32_t FM_PCD_MatchTableGetNextEngine(t_Handle \th_CcNode,\n+\tuint16_t\t\t\tkeyIndex,\n+\tioc_fm_pcd_cc_next_engine_params_t\t*p_FmPcdCcNextEngineParams);\n+\n+/*\n+ @Function\tFM_PCD_MatchTableGetIndexedHashBucket\n+\n+ @Description   This routine simulates KeyGen operation on the provided key and\n+\t\tcalculates to which hash bucket it will be mapped.\n+\n+ @Param[in]\th_CcNode\t\tA handle to the node.\n+ @Param[in]\tkgKeySize\t\tKey size as it was configured in the KG\n+\t\t\t\t\tscheme that leads to this hash.\n+ @Param[in]\tp_KgKey\t\tPointer to the key; must be like the key\n+\t\t\t\t\tthat the KG is generated, i.e. the same\n+\t\t\t\t\textraction and with mask if exist.\n+ @Param[in]\tkgHashShift\t\tHash-shift as it was configured in the KG\n+\t\t\t\t\tscheme that leads to this hash.\n+ @Param[out]\tp_CcNodeBucketHandle\tPointer to the bucket of the provided key.\n+ @Param[out]\tp_BucketIndex\tIndex to the bucket of the provided key\n+ @Param[out]\tp_LastIndex\t\tPointer to last index in the bucket of the\n+\t\t\t\t\tprovided key.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet()\n+*/\n+uint32_t FM_PCD_MatchTableGetIndexedHashBucket(t_Handle h_CcNode,\n+\t\t\t\tuint8_t\tkgKeySize,\n+\t\t\t\tuint8_t\t*p_KgKey,\n+\t\t\t\tuint8_t\tkgHashShift,\n+\t\t\t\tt_Handle\t*p_CcNodeBucketHandle,\n+\t\t\t\tuint8_t\t*p_BucketIndex,\n+\t\t\t\tuint16_t\t*p_LastIndex);\n+\n+/**\n+ @Function\tFM_PCD_HashTableSet\n+\n+ @Description   This routine initializes a hash table structure.\n+\t\tKeyGen hash result determines the hash bucket.\n+\t\tNext, KeyGen key is compared against all keys of this\n+\t\tbucket (exact match).\n+\t\tNumber of sets (number of buckets) of the hash equals to the\n+\t\tnumber of 1-s in 'hashResMask' in the provided parameters.\n+\t\tNumber of hash table ways is then calculated by dividing\n+\t\t'maxNumOfKeys' equally between the hash sets. This is the maximal\n+\t\tnumber of keys that a hash bucket may hold.\n+\t\tThe hash table is initialized empty and keys may be\n+\t\tadded to it following the initialization. Keys masks are not\n+\t\tsupported in current hash table implementation.\n+\t\tThe initialized hash table can be integrated as a node in a\n+\t\tCC tree.\n+\n+ @Param[in]\th_FmPcd\tFM PCD module descriptor.\n+ @Param[in]\tp_Param\tA structure of parameters defining the hash table\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd,\n+\tioc_fm_pcd_hash_table_params_t *p_Param);\n+\n+/**\n+ @Function\tFM_PCD_HashTableDelete\n+\n+ @Description   This routine deletes the provided hash table and released all\n+\t\tits allocated resources.\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableDelete(t_Handle h_HashTbl);\n+\n+/**\n+ @Function\tFM_PCD_HashTableAddKey\n+\n+ @Description   This routine adds the provided key (including next engine\n+\t\tparameters of this key) to the hash table.\n+\t\tThe key is added as the last key of the bucket that it is\n+\t\tmapped to.\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+ @Param[in]\tkeySize\tKey size of added key\n+ @Param[in]\tp_KeyParams  A pointer to the parameters includes\n+\t\t\t\tnew key with next engine parameters; The pointer\n+\t\t\t\tto the key mask must be NULL, as masks are not\n+\t\t\t\tsupported in hash table implementation.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableAddKey(t_Handle h_HashTbl,\n+\t\t\t\tuint8_t\t\tkeySize,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_KeyParams);\n+\n+/**\n+ @Function\tFM_PCD_HashTableRemoveKey\n+\n+ @Description   This routine removes the requested key (including next engine\n+\t\tparameters of this key) from the hash table.\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+ @Param[in]\tkeySize\tKey size of the one to remove.\n+ @Param[in]\tp_Key\tA pointer to the requested key to remove.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableRemoveKey(t_Handle h_HashTbl,\n+\t\t\t\tuint8_t  keySize,\n+\t\t\t\tuint8_t  *p_Key);\n+\n+/**\n+ @Function\tFM_PCD_HashTableModifyNextEngine\n+\n+ @Description   This routine modifies the next engine for the provided key. The\n+\t\tkey should be previously added to the hash table.\n+\n+ @Param[in]\th_HashTbl\t\tA handle to a hash table\n+ @Param[in]\tkeySize\t\t\tKey size of the key to modify.\n+ @Param[in]\tp_Key\t\t\tA pointer to the requested key to modify.\n+ @Param[in]\tp_FmPcdCcNextEngineParams   A structure for defining new next engine\n+\t\t\t\t\t\tparameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+*/\n+uint32_t FM_PCD_HashTableModifyNextEngine(t_Handle h_HashTbl,\n+\t\tuint8_t\t\tkeySize,\n+\t\tuint8_t\t\t*p_Key,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_HashTableModifyMissNextEngine\n+\n+ @Description   This routine modifies the next engine on key match miss.\n+\n+ @Param[in]\th_HashTbl\t\tA handle to a hash table\n+ @Param[in]\tp_FmPcdCcNextEngineParams   A structure for defining new next engine\n+\t\t\t\t\t\tparameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+\t\tWhen configuring nextEngine = e_FM_PCD_CC, note that\n+\t\tp_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different\n+\t\tfrom the currently changed table.\n+*/\n+uint32_t FM_PCD_HashTableModifyMissNextEngine(t_Handle h_HashTbl,\n+\t      ioc_fm_pcd_cc_next_engine_params_t *p_FmPcdCcNextEngineParams);\n+\n+/*\n+ @Function\tFM_PCD_HashTableGetMissNextEngine\n+\n+ @Description   Gets NextEngine in case of key match miss.\n+\n+ @Param[in]\th_HashTbl\t\tA handle to a hash table\n+ @Param[out]\tp_FmPcdCcNextEngineParams   Next engine parameters for the specified\n+\t\t\t\t\t\thash table.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableGetMissNextEngine(t_Handle\th_HashTbl,\n+\t   ioc_fm_pcd_cc_next_engine_params_t\t*p_FmPcdCcNextEngineParams);\n+\n+/**\n+ @Function\tFM_PCD_HashTableFindNGetKeyStatistics\n+\n+ @Description   This routine may be used to get statistics counters of specific key\n+\t\tin a hash table.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames passed that were matched\n+\t\tthis key; The total frames count will be returned in the counter\n+\t\tof the first range (as only one frame length range was defined).\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total\n+\t\tframe count will be separated to frame length counters, based on\n+\t\tprovided frame length ranges.\n+\t\tNote that this routine will identify the bucket of this key in\n+\t\tthe hash table and will search the bucket to locate the index\n+\t\tof the required key based on received key parameters.\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+ @Param[in]\tkeySize\tSize of the requested key\n+ @Param[in]\tp_Key\tA pointer to the requested key\n+ @Param[out]\tp_KeyStatistics Key statistics counters\n+\n+ @Return\tThe specific key statistics.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableFindNGetKeyStatistics(t_Handle h_HashTbl,\n+\t\t\tuint8_t\t\tkeySize,\n+\t\t\tuint8_t\t\t*p_Key,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t   *p_KeyStatistics);\n+\n+/**\n+ @Function\tFM_PCD_HashTableGetMissStatistics\n+\n+ @Description   This routine may be used to get statistics counters of 'miss'\n+\t\tentry of the a hash table.\n+\n+\t\tIf 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+\t\t'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,\n+\t\tthese counters reflect how many frames were not matched to any\n+\t\texisting key and therefore passed through the miss entry;\n+\n+ @Param[in]\th_HashTbl\tA handle to a hash table\n+ @Param[out]\tp_MissStatistics\tStatistics counters for 'miss'\n+\n+ @Return\tThe statistics for 'miss'.\n+\n+ @Cautions\tAllowed only following FM_PCD_HashTableSet().\n+*/\n+uint32_t FM_PCD_HashTableGetMissStatistics(t_Handle\th_HashTbl,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t   *p_MissStatistics);\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeSet\n+\n+ @Description   This routine should be called for defining a manipulation\n+\t\tnode. A manipulation node must be defined before the CC node\n+\t\tthat precedes it.\n+\n+ @Param[in]\th_FmPcd\t\tFM PCD module descriptor.\n+ @Param[in]\tp_FmPcdManipParams  A structure of parameters defining the manipulation\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_ManipNodeSet(t_Handle h_FmPcd,\n+\tioc_fm_pcd_manip_params_t *p_FmPcdManipParams);\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeDelete\n+\n+ @Description   Delete an existing manipulation node.\n+\n+ @Param[in]\th_ManipNode\tA handle to a manipulation node.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+uint32_t  FM_PCD_ManipNodeDelete(t_Handle h_ManipNode);\n+\n+/**\n+ @Function\tFM_PCD_ManipGetStatistics\n+\n+ @Description   Retrieve the manipulation statistics.\n+\n+ @Param[in]\th_ManipNode\tA handle to a manipulation node.\n+ @Param[out]\tp_FmPcdManipStats   A structure for retrieving the manipulation statistics\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+uint32_t FM_PCD_ManipGetStatistics(t_Handle h_ManipNode,\n+\tioc_fm_pcd_manip_stats_t *p_FmPcdManipStats);\n+\n+/**\n+ @Function\tFM_PCD_ManipNodeReplace\n+\n+ @Description   Change existing manipulation node to be according to new requirement.\n+\n+ @Param[in]\th_ManipNode\tA handle to a manipulation node.\n+ @Param[out]\tp_ManipParams\tA structure of parameters defining the change requirement\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_ManipNodeSet().\n+*/\n+uint32_t FM_PCD_ManipNodeReplace(t_Handle h_ManipNode,\n+ioc_fm_pcd_manip_params_t *p_ManipParams);\n+\n+#if (DPAA_VERSION >= 11)\n+/**\n+ @Function\tFM_PCD_FrmReplicSetGroup\n+\n+ @Description   Initialize a Frame Replicator group.\n+\n+ @Param[in]\th_FmPcd\t\tFM PCD module descriptor.\n+ @Param[in]\tp_FrmReplicGroupParam  A structure of parameters for the initialization of\n+\t\t\t\t\tthe frame replicator group.\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_FrmReplicSetGroup(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_frm_replic_group_params_t *p_FrmReplicGroupParam);\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicDeleteGroup\n+\n+ @Description   Delete a Frame Replicator group.\n+\n+ @Param[in]\th_FrmReplicGroup  A handle to the frame replicator group.\n+\n+ @Return\tE_OK on success;  Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup().\n+*/\n+uint32_t FM_PCD_FrmReplicDeleteGroup(t_Handle h_FrmReplicGroup);\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicAddMember\n+\n+ @Description   Add the member in the index defined by the memberIndex.\n+\n+ @Param[in]\th_FrmReplicGroup   A handle to the frame replicator group.\n+ @Param[in]\tmemberIndex\tmember index for adding.\n+ @Param[in]\tp_MemberParams\tA pointer to the new member parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup() of this group.\n+*/\n+uint32_t FM_PCD_FrmReplicAddMember(t_Handle h_FrmReplicGroup,\n+\t\t\tuint16_t\t\tmemberIndex,\n+\t\t\tioc_fm_pcd_cc_next_engine_params_t *p_MemberParams);\n+\n+/**\n+ @Function\tFM_PCD_FrmReplicRemoveMember\n+\n+ @Description   Remove the member defined by the index from the relevant group.\n+\n+ @Param[in]\th_FrmReplicGroup   A handle to the frame replicator group.\n+ @Param[in]\tmemberIndex\tmember index for removing.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_FrmReplicSetGroup() of this group.\n+*/\n+uint32_t FM_PCD_FrmReplicRemoveMember(t_Handle h_FrmReplicGroup,\n+\t\t\t\t      uint16_t memberIndex);\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))\n+/**\n+ @Function\tFM_PCD_StatisticsSetNode\n+\n+ @Description   This routine should be called for defining a statistics node.\n+\n+ @Param[in]\th_FmPcd\t\tFM PCD module descriptor.\n+ @Param[in]\tp_FmPcdstatsParams  A structure of parameters defining the statistics\n+\n+ @Return\tA handle to the initialized object on success; NULL code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PCD_Init().\n+*/\n+t_Handle FM_PCD_StatisticsSetNode(t_Handle h_FmPcd,\n+\t\tioc_fm_pcd_stats_params_t *p_FmPcdstatsParams);\n+#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */\n+\n+/** @} */ /* end of FM_PCD_Runtime_build_grp group */\n+/** @} */ /* end of FM_PCD_Runtime_grp group */\n+/** @} */ /* end of FM_PCD_grp group */\n+/** @} */ /* end of FM_grp group */\n+\n+#endif /* __FM_PCD_EXT_H */\ndiff --git a/drivers/net/dpaa/fmlib/fm_port_ext.h b/drivers/net/dpaa/fmlib/fm_port_ext.h\nnew file mode 100644\nindex 000000000..e937eec5b\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_port_ext.h\n@@ -0,0 +1,3512 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#ifndef __FM_PORT_EXT_H\n+#define __FM_PORT_EXT_H\n+\n+#include <errno.h>\n+#include \"ncsw_ext.h\"\n+#include \"fm_pcd_ext.h\"\n+#include \"fm_ext.h\"\n+#include \"net_ext.h\"\n+#include \"dpaa_integration.h\"\n+\n+/**\n+ @Description   FM Port routines\n+*/\n+\n+/**\n+\n+ @Group\tlnx_ioctl_FM_grp Frame Manager Linux IOCTL API\n+\n+ @Description   FM Linux ioctls definitions and enums\n+\n+ @{\n+*/\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PORT_grp FM Port\n+\n+ @Description   FM Port API\n+\n+\tThe FM uses a general module called \"port\" to represent a Tx port\n+\t(MAC), an Rx port (MAC), offline parsing flow or host command\n+\tflow. There may be up to 17 (may change) ports in an FM - 5 Tx\n+\tports (4 for the 1G MACs, 1 for the 10G MAC), 5 Rx Ports, and 7\n+\tHost command/Offline parsing ports. The SW driver manages these\n+\tports as sub-modules of the FM, i.e. after an FM is initialized,\n+\tits ports may be initialized and operated upon.\n+\n+\tThe port is initialized aware of its type, but other functions on\n+\ta port may be indifferent to its type. When necessary, the driver\n+\tverifies coherency and returns error if applicable.\n+\n+\tOn initialization, user specifies the port type and it's index\n+\t(relative to the port's type). Host command and Offline parsing\n+\tports share the same id range, I.e user may not initialized host\n+\tcommand port 0 and offline parsing port 0.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   An enum for defining port PCD modes.\n+\t(Must match enum e_FmPortPcdSupport defined in fm_port_ext.h)\n+\n+\tThis enum defines the superset of PCD engines support - i.e. not\n+\tall engines have to be used, but all have to be enabled. The real\n+\tflow of a specific frame depends on the PCD configuration and the\n+\tframe headers and payload.\n+\tNote: the first engine and the first engine after the parser (if\n+\texists) should be in order, the order is important as it will\n+\tdefine the flow of the port. However, as for the rest engines\n+\t(the ones that follows), the order is not important anymore as\n+\tit is defined by the PCD graph itself.\n+*/\n+typedef enum ioc_fm_port_pcd_support {\n+\te_IOC_FM_PORT_PCD_SUPPORT_NONE = 0\t/**< BMI to BMI, PCD is not used */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_ONLY\t/**< Use only Parser */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PLCR_ONLY\t/**< Use only Policer */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR/**< Use Parser and Policer */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG\t/**< Use Parser and Keygen */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC\n+\t\t\t/**< Use Parser, Keygen and Coarse Classification */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR\n+\t\t\t/**< Use all PCD engines */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR\n+\t\t\t/**< Use Parser, Keygen and Policer */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_CC\n+\t\t\t/**< Use Parser and Coarse Classification */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_CC_AND_PLCR\n+\t\t\t/**< Use Parser and Coarse Classification and Policer */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_CC_ONLY\t/**< Use only Coarse Classification */\n+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_CC_AND_KG\n+\t\t\t/**< Use Coarse Classification,and Keygen */\n+\t, e_IOC_FM_PORT_PCD_SUPPORT_CC_AND_KG_AND_PLCR\n+\t\t\t/**< Use Coarse Classification, Keygen and Policer */\n+#endif /* FM_CAPWAP_SUPPORT */\n+} ioc_fm_port_pcd_support;\n+\n+/**\n+ @Collection   FM Frame error\n+*/\n+typedef uint32_t\tioc_fm_port_frame_err_select_t;\n+\t/**< typedef for defining Frame Descriptor errors */\n+\n+/* @} */\n+\n+/**\n+ @Description   An enum for defining Dual Tx rate limiting scale.\n+\t(Must match e_FmPortDualRateLimiterScaleDown defined in fm_port_ext.h)\n+*/\n+typedef enum ioc_fm_port_dual_rate_limiter_scale_down {\n+\te_IOC_FM_PORT_DUAL_RATE_LIMITER_NONE = 0,\n+\t\t\t/**< Use only single rate limiter*/\n+\te_IOC_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_2,\n+\t\t\t/**< Divide high rate limiter by 2 */\n+\te_IOC_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_4,\n+\t\t\t/**< Divide high rate limiter by 4 */\n+\te_IOC_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_8\n+\t\t\t/**< Divide high rate limiter by 8 */\n+} ioc_fm_port_dual_rate_limiter_scale_down;\n+\n+/**\n+ @Description   A structure for defining Tx rate limiting\n+\t(Must match struct t_FmPortRateLimit defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_rate_limit_t {\n+\tuint16_t\tmax_burst_size;/**< in KBytes for Tx ports, in frames\n+\t\t\tfor offline parsing ports. (note that\n+\t\t\tfor early chips burst size is\n+\t\t\trounded up to a multiply of 1000 frames).*/\n+\tuint32_t\trate_limit;/**< in Kb/sec for Tx ports, in frame/sec for\n+\t\t\t\toffline parsing ports. Rate limit refers to\n+\t\t\t\tdata rate (rather than line rate). */\n+\tioc_fm_port_dual_rate_limiter_scale_down rate_limit_divider;\n+\t\t/**< For offline parsing ports only. Not-valid\n+\t\tfor some earlier chip revisions */\n+} ioc_fm_port_rate_limit_t;\n+\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PORT_runtime_control_grp FM Port Runtime Control Unit\n+\n+ @Description FM Port Runtime control unit API functions, definitions and enums.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   An enum for defining FM Port counters.\n+\t\t(Must match enum e_FmPortCounters defined in fm_port_ext.h)\n+*/\n+typedef enum ioc_fm_port_counters {\n+\te_IOC_FM_PORT_COUNTERS_CYCLE,\t/**< BMI performance counter */\n+\te_IOC_FM_PORT_COUNTERS_TASK_UTIL,\t/**< BMI performance counter */\n+\te_IOC_FM_PORT_COUNTERS_QUEUE_UTIL,\t/**< BMI performance counter */\n+\te_IOC_FM_PORT_COUNTERS_DMA_UTIL,\t/**< BMI performance counter */\n+\te_IOC_FM_PORT_COUNTERS_FIFO_UTIL,\t/**< BMI performance counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_PAUSE_ACTIVATION,\n+\t\t\t\t\t/**< BMI Rx only performance counter */\n+\te_IOC_FM_PORT_COUNTERS_FRAME,\t\t/**< BMI statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_DISCARD_FRAME,\t/**< BMI statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_DEALLOC_BUF,\n+\t\t\t\t\t/**< BMI deallocate buffer statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_BAD_FRAME,\t/**< BMI Rx only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_LARGE_FRAME,\t/**< BMI Rx only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_FILTER_FRAME,\n+\t\t\t\t\t/**< BMI Rx & OP only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_LIST_DMA_ERR,\n+\t\t\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD,\n+\t\t\t\t\t/**< BMI Rx, OP & HC statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_PREPARE_TO_ENQUEUE_COUNTER,\n+\t\t\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_WRED_DISCARD,/**< BMI OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_LENGTH_ERR,\t/**< BMI non-Rx statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_UNSUPPRTED_FORMAT,/**< BMI non-Rx statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_DEQ_TOTAL,/**< QMI total QM dequeues counter */\n+\te_IOC_FM_PORT_COUNTERS_ENQ_TOTAL,/**< QMI total QM enqueues counter */\n+\te_IOC_FM_PORT_COUNTERS_DEQ_FROM_DEFAULT,/**< QMI counter */\n+\te_IOC_FM_PORT_COUNTERS_DEQ_CONFIRM\t/**< QMI counter */\n+} ioc_fm_port_counters;\n+\n+typedef struct ioc_fm_port_bmi_stats_t {\n+\tuint32_t cnt_cycle;\n+\tuint32_t cnt_task_util;\n+\tuint32_t cnt_queue_util;\n+\tuint32_t cnt_dma_util;\n+\tuint32_t cnt_fifo_util;\n+\tuint32_t cnt_rx_pause_activation;\n+\tuint32_t cnt_frame;\n+\tuint32_t cnt_discard_frame;\n+\tuint32_t cnt_dealloc_buf;\n+\tuint32_t cnt_rx_bad_frame;\n+\tuint32_t cnt_rx_large_frame;\n+\tuint32_t cnt_rx_filter_frame;\n+\tuint32_t cnt_rx_list_dma_err;\n+\tuint32_t cnt_rx_out_of_buffers_discard;\n+\tuint32_t cnt_wred_discard;\n+\tuint32_t cnt_length_err;\n+\tuint32_t cnt_unsupported_format;\n+} ioc_fm_port_bmi_stats_t;\n+\n+/**\n+ @Description   Structure for Port id parameters.\n+\t\t(Description may be inaccurate;\n+\t\tmust match struct t_FmPortCongestionGrps defined in fm_port_ext.h)\n+\n+\t\tFields commented 'IN' are passed by the port module to be used\n+\t\tby the FM module.\n+\t\tFields commented 'OUT' will be filled by FM before returning to port.\n+*/\n+typedef struct ioc_fm_port_congestion_groups_t {\n+\tuint16_t\tnum_of_congestion_grps_to_consider;\n+\t\t\t/**< The number of required congestion groups\n+\t\t\tto define the size of the following array */\n+\tuint8_t\tcongestion_grps_to_consider[FM_PORT_NUM_OF_CONGESTION_GRPS];\n+\t\t/**< An array of CG indexes;\n+\t\tNote that the size of the array should be\n+\t\t'num_of_congestion_grps_to_consider'. */\n+#if DPAA_VERSION >= 11\n+\tbool\tpfc_priorities_enable[FM_PORT_NUM_OF_CONGESTION_GRPS][FM_MAX_NUM_OF_PFC_PRIORITIES];\n+\t\t/**< A matrix that represents the map between the CG ids\n+\t\tdefined in 'congestion_grps_to_consider' to the priorities\n+\t\tmapping array. */\n+#endif /* DPAA_VERSION >= 11 */\n+} ioc_fm_port_congestion_groups_t;\n+\n+\n+/**\n+ @Function\tFM_PORT_Disable\n+\n+ @Description   Gracefully disable an FM port. The port will not start new\n+\t\ttasks after all tasks associated with the port are terminated.\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tThis is a blocking routine, it returns after port is\n+\t\tgracefully stopped, i.e. the port will not except new frames,\n+\t\tbut it will finish all frames or tasks which were already began\n+*/\n+#define FM_PORT_IOC_DISABLE   _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(1))\n+\n+/**\n+ @Function\tFM_PORT_Enable\n+\n+ @Description   A runtime routine provided to allow disable/enable of port.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_ENABLE   _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(2))\n+\n+/**\n+ @Function\tFM_PORT_SetRateLimit\n+\n+ @Description   Calling this routine enables rate limit algorithm.\n+\t\tBy default, this functionality is disabled.\n+\n+\t\tNote that rate - limit mechanism uses the FM time stamp.\n+\t\tThe selected rate limit specified here would be\n+\t\trounded DOWN to the nearest 16M.\n+\n+\t\tMay be used for Tx and offline parsing ports only\n+\n+ @Param[in]\tioc_fm_port_rate_limit A structure of rate limit parameters\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_SET_RATE_LIMIT \\\n+\tIOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(3), ioc_fm_port_rate_limit_t)\n+\n+/**\n+ @Function\tFM_PORT_DeleteRateLimit\n+\n+ @Description   Calling this routine disables the previously enabled rate limit.\n+\n+\t\tMay be used for Tx and offline parsing ports only\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_DELETE_RATE_LIMIT _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(5))\n+#define FM_PORT_IOC_REMOVE_RATE_LIMIT FM_PORT_IOC_DELETE_RATE_LIMIT\n+\n+/**\n+ @Function\tFM_PORT_AddCongestionGrps\n+\n+ @Description   This routine effects the corresponding Tx port.\n+\t\tIt should be called in order to enable pause\n+\t\tframe transmission in case of congestion in one or more\n+\t\tof the congestion groups relevant to this port.\n+\t\tEach call to this routine may add one or more congestion\n+\t\tgroups to be considered relevant to this port.\n+\n+\t\tMay be used for Rx, or RX+OP ports only (depending on chip)\n+\n+ @Param[in]\tioc_fm_port_congestion_groups_t - A pointer to an array of\n+\t\t\t\t\tcongestion group ids to consider.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_ADD_CONGESTION_GRPS\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(34), ioc_fm_port_congestion_groups_t)\n+\n+/**\n+ @Function\tFM_PORT_RemoveCongestionGrps\n+\n+ @Description   This routine effects the corresponding Tx port. It should be\n+\t\tcalled when congestion groups were\n+\t\tdefined for this port and are no longer relevant, or pause\n+\t\tframes transmitting is not required on their behalf.\n+\t\tEach call to this routine may remove one or more congestion\n+\t\tgroups to be considered relevant to this port.\n+\n+\t\tMay be used for Rx, or RX+OP ports only (depending on chip)\n+\n+ @Param[in]\tioc_fm_port_congestion_groups_t - A pointer to an array of\n+\t\t\t\t\tcongestion group ids to consider.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_REMOVE_CONGESTION_GRPS\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(35), ioc_fm_port_congestion_groups_t)\n+\n+/**\n+ @Function\tFM_PORT_SetErrorsRoute\n+\n+ @Description   Errors selected for this routine will cause a frame with that error\n+\t\tto be enqueued to error queue.\n+\t\tErrors not selected for this routine will cause a frame with that error\n+\t\tto be enqueued to the one of the other port queues.\n+\t\tBy default all errors are defined to be enqueued to error queue.\n+\t\tErrors that were configured to be discarded (at initialization)\n+\t\tmay not be selected here.\n+\n+\t\tMay be used for Rx and offline parsing ports only\n+\n+ @Param[in]\tioc_fm_port_frame_err_select_t  A list of errors to enqueue to error queue\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\t(szbs001: How is it possible to have one function that needs to be\n+\t\t\tcalled BEFORE FM_PORT_Init() implemented as an ioctl,\n+\t\t\twhich will ALWAYS be called AFTER the FM_PORT_Init()\n+\t\t\tfor that port!?!?!?!???!?!??!?!?)\n+*/\n+#define FM_PORT_IOC_SET_ERRORS_ROUTE \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(4), ioc_fm_port_frame_err_select_t)\n+\n+/**\n+ @Group\tlnx_ioctl_FM_PORT_pcd_runtime_control_grp FM Port PCD Runtime Control Unit\n+\n+ @Description   FM Port PCD Runtime control unit API functions, definitions and enums.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   A structure defining the KG scheme after the parser.\n+\t\t(Must match struct ioc_fm_pcd_kg_scheme_select_t defined in fm_port_ext.h)\n+\n+\t\tThis is relevant only to change scheme selection mode - from\n+\t\tdirect to indirect and vice versa, or when the scheme is selected directly,\n+\t\tto select the scheme id.\n+\n+*/\n+typedef struct ioc_fm_pcd_kg_scheme_select_t {\n+\tbool\tdirect;\t/**< TRUE to use 'scheme_id' directly, FALSE to use LCV.*/\n+\tvoid\t*scheme_id;/**< Relevant for 'direct'=TRUE only.\n+\t\t\t'scheme_id' selects the scheme after parser. */\n+} ioc_fm_pcd_kg_scheme_select_t;\n+\n+/**\n+ @Description   Scheme IDs structure\n+\t(Must match struct ioc_fm_pcd_port_schemes_params_t defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_port_schemes_params_t {\n+\tuint8_t\tnum_of_schemes;\t/**< Number of schemes for port to be bound to. */\n+\tvoid\t*scheme_ids[FM_PCD_KG_NUM_OF_SCHEMES];\n+\t/**< Array of 'num_of_schemes' schemes for the port to be bound to */\n+} ioc_fm_pcd_port_schemes_params_t;\n+\n+/**\n+ @Description   A union for defining port protocol parameters for parser\n+\t\t(Must match union u_FmPcdHdrPrsOpts defined in fm_port_ext.h)\n+*/\n+typedef union ioc_fm_pcd_hdr_prs_opts_u {\n+\t/* MPLS */\n+\tstruct {\n+\tbool label_interpretation_enable;\n+\t\t\t/**< When this bit is set, the last MPLS label will be\n+\t\t\tinterpreted as described in HW spec table. When the bit\n+\t\t\tis cleared, the parser will advance to MPLS next parse */\n+\tioc_net_header_type next_parse;/**< must be equal or higher than IPv4 */\n+\t} mpls_prs_options;\n+\n+\t/* VLAN */\n+\tstruct {\n+\tuint16_t\ttag_protocol_id1;\n+\t\t\t/**< User defined Tag Protocol Identifier, to be recognized\n+\t\t\ton VLAN TAG on top of 0x8100 and 0x88A8 */\n+\tuint16_t\ttag_protocol_id2;\n+\t\t\t/**< User defined Tag Protocol Identifier, to be recognized\n+\t\t\ton VLAN TAG on top of 0x8100 and 0x88A8 */\n+\t} vlan_prs_options;\n+\n+\t/* PPP */\n+\tstruct{\n+\t\tbool\t\tenable_mtu_check;\n+\t\t/**< Check validity of MTU according to RFC2516 */\n+\t} pppoe_prs_options;\n+\n+\t/* IPV6 */\n+\tstruct {\n+\t\tbool\t\trouting_hdr_disable;\n+\t\t/**< Disable routing header */\n+\t} ipv6_prs_options;\n+\n+\t/* UDP */\n+\tstruct {\n+\t\tbool\t\tpad_ignore_checksum;\n+\t\t/**< TRUE to ignore pad in checksum */\n+\t} udp_prs_options;\n+\n+\t/* TCP */\n+\tstruct {\n+\t\tbool\t\tpad_ignore_checksum;\n+\t\t/**< TRUE to ignore pad in checksum */\n+\t} tcp_prs_options;\n+} ioc_fm_pcd_hdr_prs_opts_u;\n+\n+/**\n+ @Description   A structure for defining each header for the parser\n+\t\t(must match struct t_FmPcdPrsAdditionalHdrParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_prs_additional_hdr_params_t {\n+\tioc_net_header_type\thdr; /**< Selected header */\n+\tbool\terr_disable; /**< TRUE to disable error indication */\n+\tbool\tsoft_prs_enable;/**< Enable jump to SW parser when this\n+\t\t\t\theader is recognized by the HW parser. */\n+\tuint8_t\tindex_per_hdr;\t/**< Normally 0, if more than one sw parser\n+\t\t\t\tattachments exists for the same header,\n+\t\t\t\t(in the main sw parser code) use this\n+\t\t\t\tindex to distinguish between them. */\n+\tbool\tuse_prs_opts;\t/**< TRUE to use parser options. */\n+\tioc_fm_pcd_hdr_prs_opts_u prs_opts;/**< A unuion according to header type,\n+\t\t\t\tdefining the parser options selected.*/\n+} ioc_fm_pcd_prs_additional_hdr_params_t;\n+\n+/**\n+ @Description   A structure for defining port PCD parameters\n+\t\t(Must match t_FmPortPcdPrsParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_pcd_prs_params_t {\n+\tuint8_t\t\tprs_res_priv_info;\n+\t\t\t\t/**< The private info provides a method of inserting\n+\t\t\t\tport information into the parser result. This information\n+\t\t\t\tmay be extracted by KeyGen and be used for frames\n+\t\t\t\tdistribution when a per-port distinction is required,\n+\t\t\t\tit may also be used as a port logical id for analyzing\n+\t\t\t\tincoming frames. */\n+\tuint8_t\t\tparsing_offset;\n+\t\t\t/**< Number of bytes from begining of packet to start parsing */\n+\tioc_net_header_type\tfirst_prs_hdr;\n+\t\t\t/**< The type of the first header axpected at 'parsing_offset' */\n+\tbool\t\tinclude_in_prs_statistics;\n+\t\t\t\t/**< TRUE to include this port in the parser statistics */\n+\tuint8_t\t\tnum_of_hdrs_with_additional_params;\n+\t\t\t/**< Normally 0, some headers may get special parameters */\n+\tioc_fm_pcd_prs_additional_hdr_params_t  additional_params[IOC_FM_PCD_PRS_NUM_OF_HDRS];\n+\t\t\t/**< 'num_of_hdrs_with_additional_params' structures\n+\t\t\tadditional parameters for each header that requires them */\n+\tbool\t\tset_vlan_tpid1;\n+\t\t\t\t/**< TRUE to configure user selection of Ethertype to\n+\t\t\t\tindicate a VLAN tag (in addition to the TPID values\n+\t\t\t\t0x8100 and 0x88A8). */\n+\tuint16_t\tvlan_tpid1;\n+\t\t\t\t/**< extra tag to use if set_vlan_tpid1=TRUE. */\n+\tbool\t\tset_vlan_tpid2;\n+\t\t\t\t/**< TRUE to configure user selection of Ethertype to\n+\t\t\t\tindicate a VLAN tag (in addition to the TPID values\n+\t\t\t\t0x8100 and 0x88A8). */\n+\tuint16_t\tvlan_tpid2; /**< extra tag to use if set_vlan_tpid1=TRUE. */\n+} ioc_fm_port_pcd_prs_params_t;\n+\n+/**\n+ @Description   A structure for defining coarse alassification parameters\n+\t\t(Must match t_FmPortPcdCcParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_pcd_cc_params_t {\n+\tvoid\t\t*cc_tree_id; /**< CC tree id */\n+} ioc_fm_port_pcd_cc_params_t;\n+\n+/**\n+ @Description   A structure for defining keygen parameters\n+\t\t(Must match t_FmPortPcdKgParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_pcd_kg_params_t {\n+\tuint8_t\t\tnum_of_schemes;\n+\t\t\t\t/**< Number of schemes for port to be bound to. */\n+\tvoid\t\t*scheme_ids[FM_PCD_KG_NUM_OF_SCHEMES];\n+\t\t\t\t/**< Array of 'num_of_schemes' schemes for the\n+\t\t\t\tport to be bound to */\n+\tbool\t\tdirect_scheme;\n+\t\t\t\t/**< TRUE for going from parser to a specific scheme,\n+\t\t\t\tregardless of parser result */\n+\tvoid\t\t*direct_scheme_id;\n+\t\t\t\t/**< Scheme id, as returned by FM_PCD_KgSetScheme;\n+\t\t\t\trelevant only if direct=TRUE. */\n+} ioc_fm_port_pcd_kg_params_t;\n+\n+/**\n+ @Description   A structure for defining policer parameters\n+\t\t(Must match t_FmPortPcdPlcrParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_pcd_plcr_params_t {\n+\tvoid\t\t*plcr_profile_id;/**< Selected profile handle;\n+\t\t\trelevant in one of the following cases:\n+\t\t\te_IOC_FM_PORT_PCD_SUPPORT_PLCR_ONLY or\n+\t\t\te_IOC_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR were selected,\n+\t\t\tor if any flow uses a KG scheme where policer\n+\t\t\tprofile is not generated (bypass_plcr_profile_generation selected) */\n+} ioc_fm_port_pcd_plcr_params_t;\n+\n+/**\n+ @Description   A structure for defining port PCD parameters\n+\t\t(Must match struct t_FmPortPcdParams defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_port_pcd_params_t {\n+\tioc_fm_port_pcd_support\tpcd_support;\n+\t\t\t\t/**< Relevant for Rx and offline ports only.\n+\t\t\t\tDescribes the active PCD engines for this port. */\n+\tvoid\t\t*net_env_id;\t/**< HL Unused in PLCR only mode */\n+\tioc_fm_port_pcd_prs_params_t\t*p_prs_params;\n+\t\t\t\t\t/**< Parser parameters for this port */\n+\tioc_fm_port_pcd_cc_params_t\t*p_cc_params;\n+\t\t\t\t/**< Coarse classification parameters for this port */\n+\tioc_fm_port_pcd_kg_params_t\t*p_kg_params;\n+\t\t\t\t/**< Keygen parameters for this port */\n+\tioc_fm_port_pcd_plcr_params_t\t*p_plcr_params;\n+\t\t\t\t/**< Policer parameters for this port */\n+\tvoid\t\t*p_ip_reassembly_manip;/**< IP Reassembly manipulation */\n+#if (DPAA_VERSION >= 11)\n+\tvoid\t\t*p_capwap_reassembly_manip;\n+\t\t\t\t/**< CAPWAP Reassembly manipulation */\n+#endif /* (DPAA_VERSION >= 11) */\n+} ioc_fm_port_pcd_params_t;\n+\n+/**\n+ @Description   A structure for defining the Parser starting point\n+\t\t(Must match struct ioc_fm_pcd_prs_start_t defined in fm_port_ext.h)\n+*/\n+typedef struct ioc_fm_pcd_prs_start_t {\n+\tuint8_t\tparsing_offset; /**< Number of bytes from begining of packet to\n+\t\t\t\tstart parsing */\n+\tioc_net_header_type first_prs_hdr;/**< The type of the first header axpected at\n+\t\t\t\t'parsing_offset' */\n+} ioc_fm_pcd_prs_start_t;\n+\n+/**\n+ @Description   FQID parameters structure\n+*/\n+typedef struct ioc_fm_port_pcd_fqids_params_t {\n+\tuint32_t\tnum_fqids;  /**< Number of fqids to be allocated for the port */\n+\tuint8_t\t\talignment;  /**< Alignment required for this port */\n+\tuint32_t\tbase_fqid;  /**< output parameter - the base fqid */\n+} ioc_fm_port_pcd_fqids_params_t;\n+\n+/**\n+ @Function\tFM_PORT_IOC_ALLOC_PCD_FQIDS\n+\n+ @Description   Allocates FQID's\n+\n+\t\tMay be used for Rx and offline parsing ports only\n+\n+ @Param[in,out] ioc_fm_port_pcd_fqids_params_t  Parameters for allocating FQID's\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_ALLOC_PCD_FQIDS \\\n+\t_IOWR(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(19), ioc_fm_port_pcd_fqids_params_t)\n+\n+/**\n+ @Function\tFM_PORT_IOC_FREE_PCD_FQIDS\n+\n+ @Description   Frees previously-allocated FQIDs\n+\n+\t\tMay be used for Rx and offline parsing ports only\n+\n+ @Param[in]\tuint32_t\tBase FQID of previously allocated range.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_FREE_PCD_FQIDS \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(19), uint32_t)\n+\n+/**\n+ @Function\tFM_PORT_SetPCD\n+\n+ @Description   Calling this routine defines the port's PCD configuration.\n+\t\tIt changes it from its default configuration which is PCD\n+\t\tdisabled (BMI to BMI) and configures it according to the passed\n+\t\tparameters.\n+\n+\t\tMay be used for Rx and offline parsing ports only\n+\n+ @Param[in]\tioc_fm_port_pcd_params_t\n+\t\tA Structure of parameters defining the port's PCD configuration.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_SET_PCD_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(20), ioc_compat_fm_port_pcd_params_t)\n+#endif\n+#define FM_PORT_IOC_SET_PCD \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(20), ioc_fm_port_pcd_params_t)\n+\n+/**\n+ @Function\tFM_PORT_DeletePCD\n+\n+ @Description   Calling this routine releases the port's PCD configuration.\n+\t\tThe port returns to its default configuration which is PCD\n+\t\tdisabled (BMI to BMI) and all PCD configuration is removed.\n+\n+\t\tMay be used for Rx and offline parsing ports which are\n+\t\tin PCD mode only\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_DELETE_PCD _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(21))\n+\n+/**\n+ @Function\tFM_PORT_AttachPCD\n+\n+ @Description   This routine may be called after FM_PORT_DetachPCD was called,\n+\t\tto return to the originally configured PCD support flow.\n+\t\tThe couple of routines are used to allow PCD configuration changes\n+\t\tthat demand that PCD will not be used while changes take place.\n+\n+\t\tMay be used for Rx and offline parsing ports which are\n+\t\tin PCD mode only\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_ATTACH_PCD _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(23))\n+\n+/**\n+ @Function\tFM_PORT_DetachPCD\n+\n+ @Description   Calling this routine detaches the port from its PCD functionality.\n+\t\tThe port returns to its default flow which is BMI to BMI.\n+\n+\t\tMay be used for Rx and offline parsing ports which are\n+\t\tin PCD mode only\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#define FM_PORT_IOC_DETACH_PCD _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(22))\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrAllocProfiles\n+\n+ @Description   This routine may be called only for ports that use the Policer in\n+\t\torder to allocate private policer profiles.\n+\n+ @Param[in]\tuint16_t\tThe number of required policer profiles\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed before FM_PORT_SetPCD() only.\n+*/\n+#define FM_PORT_IOC_PCD_PLCR_ALLOC_PROFILES\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(24), uint16_t)\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrFreeProfiles\n+\n+ @Description   This routine should be called for freeing private policer profiles.\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed before FM_PORT_SetPCD() only.\n+*/\n+#define FM_PORT_IOC_PCD_PLCR_FREE_PROFILES\t\\\n+\t_IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(25))\n+\n+/**\n+ @Function\tFM_PORT_PcdKgModifyInitialScheme\n+\n+ @Description   This routine may be called only for ports that use the keygen in\n+\t\torder to change the initial scheme frame should be routed to.\n+\t\tThe change may be of a scheme id (in case of direct mode),\n+\t\tfrom direct to indirect, or from indirect to direct - specifying the scheme id.\n+\n+ @Param[in]\tioc_fm_pcd_kg_scheme_select_t\n+\t\tA structure of parameters for defining whether\n+\t\ta scheme is direct/indirect, and if direct - scheme id.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_PCD_KG_MODIFY_INITIAL_SCHEME_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(26), ioc_compat_fm_pcd_kg_scheme_select_t)\n+#endif\n+#define FM_PORT_IOC_PCD_KG_MODIFY_INITIAL_SCHEME \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(26), ioc_fm_pcd_kg_scheme_select_t)\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrModifyInitialProfile\n+\n+ @Description   This routine may be called for ports with flows\n+\te_IOC_FM_PCD_SUPPORT_PLCR_ONLY or e_IOC_FM_PCD_SUPPORT_PRS_AND_PLCR\n+\tonly, to change the initial Policer profile frame should be routed to.\n+\tThe change may be of a profile and / or absolute / direct mode selection.\n+\n+ @Param[in]\tioc_fm_obj_t\tPolicer profile Id as returned from FM_PCD_PlcrSetProfile.\n+\n+ @Return\t0 on success; error code otherwise.\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_PCD_PLCR_MODIFY_INITIAL_PROFILE_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(27), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PORT_IOC_PCD_PLCR_MODIFY_INITIAL_PROFILE \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(27), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PORT_PcdCcModifyTree\n+\n+ @Description   This routine may be called to change this port connection to\n+\t\ta pre - initializes coarse classification Tree.\n+\n+ @Param[in]\tioc_fm_obj_t\tId of new coarse classification tree selected for this port.\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_SetPCD() and FM_PORT_DetachPCD()\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_PCD_CC_MODIFY_TREE_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(28), ioc_compat_fm_obj_t)\n+#endif\n+#define FM_PORT_IOC_PCD_CC_MODIFY_TREE \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(28), ioc_fm_obj_t)\n+\n+/**\n+ @Function\tFM_PORT_PcdKgBindSchemes\n+\n+ @Description   These routines may be called for modifying the binding of ports\n+\t\tto schemes. The scheme itself is not added,\n+\t\tjust this specific port starts using it.\n+\n+ @Param[in]\tioc_fm_pcd_port_schemes_params_t\tSchemes parameters structre\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_SetPCD().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_PCD_KG_BIND_SCHEMES_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(30), ioc_compat_fm_pcd_port_schemes_params_t)\n+#endif\n+#define FM_PORT_IOC_PCD_KG_BIND_SCHEMES \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(30), ioc_fm_pcd_port_schemes_params_t)\n+\n+/**\n+ @Function\tFM_PORT_PcdKgUnbindSchemes\n+\n+ @Description   These routines may be called for modifying the binding of ports\n+\t\tto schemes. The scheme itself is not removed or invalidated,\n+\t\tjust this specific port stops using it.\n+\n+ @Param[in]\tioc_fm_pcd_port_schemes_params_t\tSchemes parameters structre\n+\n+ @Return\t0 on success; error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_SetPCD().\n+*/\n+#if defined(CONFIG_COMPAT)\n+#define FM_PORT_IOC_PCD_KG_UNBIND_SCHEMES_COMPAT \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(31), ioc_compat_fm_pcd_port_schemes_params_t)\n+#endif\n+#define FM_PORT_IOC_PCD_KG_UNBIND_SCHEMES \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(31), ioc_fm_pcd_port_schemes_params_t)\n+\n+#define ENET_NUM_OCTETS_PER_ADDRESS 6\n+\t\t/**< Number of octets (8-bit bytes) in an ethernet address */\n+typedef struct ioc_fm_port_mac_addr_params_t {\n+\tuint8_t addr[ENET_NUM_OCTETS_PER_ADDRESS];\n+} ioc_fm_port_mac_addr_params_t;\n+\n+/**\n+ @Function\tFM_MAC_AddHashMacAddr\n+\n+ @Description   Add an Address to the hash table. This is for filter purpose only.\n+\n+ @Param[in]\tioc_fm_port_mac_addr_params_t - Ethernet Mac address\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_MAC_Init(). It is a filter only address.\n+ @Cautions\tSome address need to be filtered out in upper FM blocks.\n+*/\n+#define FM_PORT_IOC_ADD_RX_HASH_MAC_ADDR  \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(36), ioc_fm_port_mac_addr_params_t)\n+\n+/**\n+ @Function\tFM_MAC_RemoveHashMacAddr\n+\n+ @Description   Delete an Address to the hash table. This is for filter purpose only.\n+\n+ @Param[in]\tioc_fm_port_mac_addr_params_t - Ethernet Mac address\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_MAC_Init().\n+*/\n+#define FM_PORT_IOC_REMOVE_RX_HASH_MAC_ADDR  \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(37), ioc_fm_port_mac_addr_params_t)\n+\n+typedef struct ioc_fm_port_tx_pause_frames_params_t {\n+\tuint8_t  priority;\n+\tuint16_t pause_time;\n+\tuint16_t thresh_time;\n+} ioc_fm_port_tx_pause_frames_params_t;\n+\n+/**\n+ @Function\tFM_MAC_SetTxPauseFrames\n+\n+ @Description   Enable/Disable transmission of Pause-Frames.\n+\t\tThe routine changes the default configuration:\n+\t\tpause-time - [0xf000]\n+\t\tthreshold-time - [0]\n+\n+ @Param[in]\tioc_fm_port_tx_pause_frames_params_t\n+\t\tA structure holding the required parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_MAC_Init().\n+\t\tPFC is supported only on new mEMAC; i.e. in MACs that don't have\n+\t\tPFC support (10G-MAC and dTSEC), user should use 'FM_MAC_NO_PFC'\n+\t\tin the 'priority' field.\n+*/\n+#define FM_PORT_IOC_SET_TX_PAUSE_FRAMES\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(40), ioc_fm_port_tx_pause_frames_params_t)\n+\n+typedef struct ioc_fm_port_mac_statistics_t {\n+\t/* RMON */\n+\tuint64_t  e_stat_pkts_64;\t/**< r-10G tr-DT 64 byte frame counter */\n+\tuint64_t  e_stat_pkts_65_to_127;/**< r-10G 65 to 127 byte frame counter */\n+\tuint64_t  e_stat_pkts_128_to_255;/**< r-10G 128 to 255 byte frame counter */\n+\tuint64_t  e_stat_pkts_256_to_511;/**< r-10G 256 to 511 byte frame counter */\n+\tuint64_t  e_stat_pkts_512_to_1023;/**< r-10G 512 to 1023 byte frame counter*/\n+\tuint64_t  e_stat_pkts_1024_to_1518;\n+\t\t\t\t\t/**< r-10G 1024 to 1518 byte frame counter */\n+\tuint64_t  e_stat_pkts_1519_to_1522;\n+\t\t\t\t/**< r-10G 1519 to 1522 byte good frame count */\n+\t/* */\n+\tuint64_t  e_stat_fragments;\n+\t/**< Total number of packets that were less than 64 octets long with a wrong CRC.*/\n+\tuint64_t  e_stat_jabbers;\n+\t/**< Total number of packets longer than valid maximum length octets */\n+\tuint64_t  e_stat_drop_events;\n+\t/**< number of dropped packets due to internal errors of the MAC Client\n+\t(during recieve). */\n+\tuint64_t  e_stat_CRC_align_errors;\n+\t/**< Incremented when frames of correct length but with CRC error are received.*/\n+\tuint64_t  e_stat_undersize_pkts;\n+\t/**< Incremented for frames under 64 bytes with a valid FCS and otherwise\n+\t\twell formed; This count does not include range length errors */\n+\tuint64_t  e_stat_oversize_pkts;\n+\t/**< Incremented for frames which exceed 1518 (non VLAN) or 1522 (VLAN)\n+\tand contains a valid FCS and otherwise well formed */\n+\t/* Pause */\n+\tuint64_t  te_stat_pause;\t/**< Pause MAC Control received */\n+\tuint64_t  re_stat_pause;\t/**< Pause MAC Control sent */\n+\t/* MIB II */\n+\tuint64_t  if_in_octets;\t\t/**< Total number of byte received. */\n+\tuint64_t  if_in_pkts;\t\t/**< Total number of packets received.*/\n+\tuint64_t  if_in_ucast_pkts;\t/**< Total number of unicast frame received;\n+\t\t\t\tNOTE: this counter is not supported on dTSEC MAC */\n+\tuint64_t  if_in_mcast_pkts;/**< Total number of multicast frame received*/\n+\tuint64_t  if_in_bcast_pkts;/**< Total number of broadcast frame received */\n+\tuint64_t  if_in_discards;\n+\t\t/**< Frames received, but discarded due to problems within the MAC RX. */\n+\tuint64_t  if_in_errors;\t\t/**< Number of frames received with error:\n+\t\t\t- FIFO Overflow Error\n+\t\t\t- CRC Error\n+\t\t\t- Frame Too Long Error\n+\t\t\t- Alignment Error\n+\t\t\t- The dedicated Error Code (0xfe, not a code error) was received */\n+\tuint64_t  if_out_octets;\t/**< Total number of byte sent. */\n+\tuint64_t  if_out_pkts;\t\t/**< Total number of packets sent .*/\n+\tuint64_t  if_out_ucast_pkts;\t/**< Total number of unicast frame sent;\n+\t\t\t\tNOTE: this counter is not supported on dTSEC MAC */\n+\tuint64_t  if_out_mcast_pkts;\t/**< Total number of multicast frame sent */\n+\tuint64_t  if_out_bcast_pkts;\t/**< Total number of multicast frame sent */\n+\tuint64_t  if_out_discards;\n+\t/**< Frames received, but discarded due to problems within the MAC TX N/A!.*/\n+\tuint64_t  if_out_errors;\t/**< Number of frames transmitted with error:\n+\t\t\t\t\t- FIFO Overflow Error\n+\t\t\t\t\t- FIFO Underflow Error\n+\t\t\t\t\t- Other */\n+} ioc_fm_port_mac_statistics_t;\n+\n+/**\n+ @Function\tFM_MAC_GetStatistics\n+\n+ @Description   get all MAC statistics counters\n+\n+ @Param[out]\tioc_fm_port_mac_statistics_t\tA structure holding the statistics\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_Init().\n+*/\n+#define FM_PORT_IOC_GET_MAC_STATISTICS\t\\\n+\t_IOR(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(41), ioc_fm_port_mac_statistics_t)\n+\n+/**\n+ @Function\tFM_PORT_GetBmiCounters\n+\n+ @Description   Read port's BMI stat counters and place them into\n+\t\ta designated structure of counters.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[out]\tp_BmiStats  counters structure\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+\n+#define FM_PORT_IOC_GET_BMI_COUNTERS \\\n+\t_IOR(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(42), ioc_fm_port_bmi_stats_t)\n+\n+/** @} */ /* end of lnx_ioctl_FM_PORT_pcd_runtime_control_grp group */\n+/** @} */ /* end of lnx_ioctl_FM_PORT_runtime_control_grp group */\n+\n+/** @} */ /* end of lnx_ioctl_FM_PORT_grp group */\n+/** @} */ /* end of lnx_ioctl_FM_grp group */\n+\n+\n+/**\n+ @Group\tgen_id  General Drivers Utilities\n+\n+ @Description   External routines.\n+\n+ @{\n+*/\n+\n+/**\n+ @Group\tgen_error_id  Errors, Events and Debug\n+\n+ @Description   External routines.\n+\n+ @{\n+*/\n+\n+/**\n+The scheme below provides the bits description for error codes:\n+\n+ 0   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15\n+|\tReserved (should be zero)\t|\t\tModule ID\t\t|\n+\n+ 16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31\n+|\t\t\t\tError Type\t\t\t\t|\n+*/\n+\n+#define ERROR_CODE(_err)  ((((uint32_t)_err) & 0x0000FFFF) | __ERR_MODULE__)\n+\n+#define GET_ERROR_TYPE(_errcode)\t((_errcode) & 0x0000FFFF)\n+\t\t\t\t/**< Extract module code from error code (#uint32_t) */\n+\n+#define GET_ERROR_MODULE(_errcode)  ((_errcode) & 0x00FF0000)\n+\t\t\t\t/**< Extract error type (#e_ErrorType) from\n+\t\t\t\terror code (#uint32_t) */\n+\n+#define RETURN_ERROR(_level, _err, _vmsg) { \\\n+\treturn ERROR_CODE(_err); \t    \\\n+}\n+\n+/**\n+ @Description\tError Type Enumeration\n+*/\n+typedef enum e_ErrorType {\n+\tE_OK = 0\t/*   Never use \"RETURN_ERROR\" with E_OK; Use \"return E_OK;\"*/\n+\t, E_WRITE_FAILED = EIO   /**< Write access failed on memory/device.*/\n+\t\t\t\t/*   String: none, or device name.*/\n+\t, E_NO_DEVICE = ENXIO\t/**< The associated device is not initialized.*/\n+\t\t\t\t/*   String: none.*/\n+\t, E_NOT_AVAILABLE = EAGAIN\n+\t\t\t\t/**< Resource is unavailable.*/\n+\t\t\t\t/*   String: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add resource description). */\n+\t, E_NO_MEMORY = ENOMEM   /**< External memory allocation failed.*/\n+\t\t\t/*   String: description of item for which allocation failed. */\n+\t, E_INVALID_ADDRESS = EFAULT\n+\t\t\t\t/**< Invalid address.*/\n+\t\t\t\t/*   String: description of the specific violation.*/\n+\t, E_BUSY = EBUSY\t/**< Resource or module is busy.*/\n+\t\t\t\t/*   String: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add resource description). */\n+\t, E_ALREADY_EXISTS = EEXIST\n+\t\t\t\t/**< Requested resource or item already exists.*/\n+\t\t\t/*   Use when resource duplication or sharing are not allowed.\n+\t\t\t\tString: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add item description).*/\n+\t, E_INVALID_OPERATION = ENODEV\n+\t\t\t\t/**< The operation/command is invalid (unrecognized).*/\n+\t\t\t\t/*   String: none.*/\n+\t, E_INVALID_VALUE = EDOM /**< Invalid value.*/\n+\t\t\t\t/*   Use for non-enumeration parameters, and\n+\t\t\tonly when other error types are not suitable.\n+\t\t\tString: parameter description + \"(should be <attribute>)\",\n+\t\t\te.g: \"Maximum Rx buffer length (should be divisible by 8)\",\n+\t\t\t\"Channel number (should be even)\".*/\n+\t, E_NOT_IN_RANGE = ERANGE/**< Parameter value is out of range.*/\n+\t\t\t\t/*   Don't use this error for enumeration parameters.\n+\t\t\t\tString: parameter description + \"(should be %d-%d)\",\n+\t\t\t\te.g: \"Number of pad characters (should be 0-15)\".*/\n+\t, E_NOT_SUPPORTED = ENOSYS\n+\t\t\t\t/**< The function is not supported or not implemented.*/\n+\t\t\t\t/*   String: none.*/\n+\t, E_INVALID_STATE /**< The operation is not allowed in current module state.*/\n+\t\t\t\t/*   String: none.*/\n+\t, E_INVALID_HANDLE\t/**< Invalid handle of module or object.*/\n+\t\t\t/*   String: none, unless the function takes in more than one\n+\t\t\t\thandle (in this case add the handle description)*/\n+\t, E_INVALID_ID\t/**< Invalid module ID (usually enumeration or index).*/\n+\t\t\t/*   String: none, unless the function takes in more than one\n+\t\t\t\tID (in this case add the ID description)*/\n+\t, E_NULL_POINTER\t/**< Unexpected NULL pointer.*/\n+\t\t\t\t/*   String: pointer description.*/\n+\t, E_INVALID_SELECTION\t/**< Invalid selection or mode.*/\n+\t\t\t/*   Use for enumeration values, only when other error types\n+\t\t\t\tare not suitable.\n+\t\t\t\tString: parameter description.*/\n+\t, E_INVALID_COMM_MODE\t/**< Invalid communication mode.*/\n+\t\t\t/*   String: none, unless the function takes in more than one\n+\t\t\t\tcommunication mode indications (in this case add\n+\t\t\t\tparameter description).*/\n+\t, E_INVALID_MEMORY_TYPE  /**< Invalid memory type.*/\n+\t\t\t/*   String: none, unless the function takes in more than one\n+\t\t\t\tmemory types (in this case add memory description,\n+\t\t\t\te.g: \"Data memory\", \"Buffer descriptors memory\").*/\n+\t, E_INVALID_CLOCK\t/**< Invalid clock.*/\n+\t\t\t/*   String: none, unless the function takes in more than one\n+\t\t\tclocks (in this case add clock description,\n+\t\t\te.g: \"Rx clock\", \"Tx clock\").*/\n+\t, E_CONFLICT\t\t/**< Some setting conflicts with another setting.*/\n+\t\t\t\t/*   String: description of the conflicting settings.*/\n+\t, E_NOT_ALIGNED\t/**< Non-aligned address.*/\n+\t\t/*   String: parameter description + \"(should be %d-bytes aligned)\",\n+\t\t\t\te.g: \"Rx data buffer (should be 32-bytes aligned)\".*/\n+\t, E_NOT_FOUND\t\t/**< Requested resource or item was not found.*/\n+\t\t\t/*   Use only when the resource/item is uniquely identified.\n+\t\t\t\tString: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add item description).*/\n+\t, E_FULL\t\t/**< Resource is full.*/\n+\t\t\t\t/*   String: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add resource description). */\n+\t, E_EMPTY\t\t/**< Resource is empty.*/\n+\t\t\t\t/*   String: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add resource description). */\n+\t, E_ALREADY_FREE /**< Specified resource or item is already free or deleted.*/\n+\t\t\t\t/*   String: none, unless the operation is not the main goal\n+\t\t\t\tof the function (in this case add item description).*/\n+\t, E_READ_FAILED\t/**< Read access failed on memory/device.*/\n+\t\t\t\t/*   String: none, or device name.*/\n+\t, E_INVALID_FRAME /**< Invalid frame object (NULL handle or missing buffers).*/\n+\t\t\t\t/*   String: none.*/\n+\t, E_SEND_FAILED\t/**< Send operation failed on device.*/\n+\t\t\t\t/*   String: none, or device name.*/\n+\t, E_RECEIVE_FAILED\t/**< Receive operation failed on device.*/\n+\t\t\t\t/*   String: none, or device name.*/\n+\t, E_TIMEOUT/* = ETIMEDOUT*/  /**< The operation timed out.*/\n+\t\t\t\t/*   String: none.*/\n+\n+\t, E_DUMMY_LAST\t/* NEVER USED */\n+\n+} e_ErrorType;\n+\n+/**\n+\n+ @Group\tFM_grp Frame Manager API\n+\n+ @Description   FM API functions, definitions and enums\n+\n+ @{\n+*/\n+\n+/**\n+ @Group\tFM_PORT_grp FM Port\n+\n+ @Description   FM Port API\n+\n+\t\tThe FM uses a general module called \"port\" to represent a Tx port\n+\t\t(MAC), an Rx port (MAC) or Offline Parsing port.\n+\t\tThe number of ports in an FM varies between SOCs.\n+\t\tThe SW driver manages these ports as sub-modules of the FM, i.e.\n+\t\tafter an FM is initialized, its ports may be initialized and\n+\t\toperated upon.\n+\n+\t\tThe port is initialized aware of its type, but other functions on\n+\t\ta port may be indifferent to its type. When necessary, the driver\n+\t\tverifies coherence and returns error if applicable.\n+\n+\t\tOn initialization, user specifies the port type and it's index\n+\t\t(relative to the port's type) - always starting at 0.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   An enum for defining port PCD modes.\n+\t\tThis enum defines the superset of PCD engines support - i.e. not\n+\t\tall engines have to be used, but all have to be enabled. The real\n+\t\tflow of a specific frame depends on the PCD configuration and the\n+\t\tframe headers and payload.\n+\t\tNote: the first engine and the first engine after the parser (if\n+\t\texists) should be in order, the order is important as it will\n+\t\tdefine the flow of the port. However, as for the rest engines\n+\t\t(the ones that follows), the order is not important anymore as\n+\t\tit is defined by the PCD graph itself.\n+*/\n+typedef enum e_FmPortPcdSupport {\n+\te_FM_PORT_PCD_SUPPORT_NONE = 0\t\t/**< BMI to BMI, PCD is not used */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_ONLY\t/**< Use only Parser */\n+\t, e_FM_PORT_PCD_SUPPORT_PLCR_ONLY\t/**< Use only Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR\t/**< Use Parser and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG\t/**< Use Parser and Keygen */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC\n+\t\t\t\t/**< Use Parser, Keygen and Coarse Classification */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR\n+\t\t\t\t\t/**< Use all PCD engines */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR\n+\t\t\t\t\t/**< Use Parser, Keygen and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_CC\n+\t\t\t\t\t/**< Use Parser and Coarse Classification */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_CC_AND_PLCR\n+\t\t\t\t/**< Use Parser and Coarse Classification and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_CC_ONLY\t\t/**< Use only Coarse Classification */\n+#ifdef FM_CAPWAP_SUPPORT\n+\t, e_FM_PORT_PCD_SUPPORT_CC_AND_KG\n+\t\t\t\t\t/**< Use Coarse Classification,and Keygen */\n+\t, e_FM_PORT_PCD_SUPPORT_CC_AND_KG_AND_PLCR\n+\t\t\t\t/**< Use Coarse Classification, Keygen and Policer */\n+#endif /* FM_CAPWAP_SUPPORT */\n+} e_FmPortPcdSupport;\n+\n+/**\n+ @Description   Port interrupts\n+*/\n+typedef enum e_FmPortExceptions {\n+\te_FM_PORT_EXCEPTION_IM_BUSY\t\t/**< Independent-Mode Rx-BUSY */\n+} e_FmPortExceptions;\n+\n+/**\n+ @Collection\tGeneral FM Port defines\n+*/\n+#define FM_PORT_PRS_RESULT_NUM_OF_WORDS\t8\n+\t\t/**< Number of 4 bytes words in parser result */\n+/* @} */\n+\n+/**\n+ @Collection   FM Frame error\n+*/\n+typedef uint32_t\tfmPortFrameErrSelect_t;\n+\t\t\t\t/**< typedef for defining Frame Descriptor errors */\n+\n+#define FM_PORT_FRM_ERR_UNSUPPORTED_FORMAT FM_FD_ERR_UNSUPPORTED_FORMAT\n+\t\t\t\t/**< Not for Rx-Port! Unsupported Format */\n+#define FM_PORT_FRM_ERR_LENGTH\t\tFM_FD_ERR_LENGTH\n+\t\t\t\t/**< Not for Rx-Port! Length Error */\n+#define FM_PORT_FRM_ERR_DMA\t\tFM_FD_ERR_DMA\t/**< DMA Data error */\n+#define FM_PORT_FRM_ERR_NON_FM\t\tFM_FD_RX_STATUS_ERR_NON_FM\n+\t\t\t/**< non Frame-Manager error; probably come from SEC that\n+\t\t\t\t\t\twas chained to FM */\n+\n+#define FM_PORT_FRM_ERR_IPRE\t\t(FM_FD_ERR_IPR & ~FM_FD_IPR)\n+\t\t\t\t\t/**< IPR error */\n+#define FM_PORT_FRM_ERR_IPR_NCSP\t(FM_FD_ERR_IPR_NCSP & ~FM_FD_IPR)\n+\t\t\t\t\t/**< IPR non-consistent-sp */\n+\n+#define FM_PORT_FRM_ERR_IPFE\t\t0\n+\t\t\t\t/**< Obsolete; will be removed in the future */\n+\n+#ifdef FM_CAPWAP_SUPPORT\n+#define FM_PORT_FRM_ERR_CRE\t\tFM_FD_ERR_CRE\n+#define FM_PORT_FRM_ERR_CHE\t\tFM_FD_ERR_CHE\n+#endif /* FM_CAPWAP_SUPPORT */\n+\n+#define FM_PORT_FRM_ERR_PHYSICAL\tFM_FD_ERR_PHYSICAL\n+\t\t\t/**< Rx FIFO overflow, FCS error, code error, running disparity\n+\t\t\terror (SGMII and TBI modes), FIFO parity error. PHY\n+\t\t\tSequence error, PHY error control character detected. */\n+#define FM_PORT_FRM_ERR_SIZE\t\tFM_FD_ERR_SIZE\n+\t\t\t/**< Frame too long OR Frame size exceeds max_length_frame*/\n+#define FM_PORT_FRM_ERR_CLS_DISCARD\tFM_FD_ERR_CLS_DISCARD\n+\t\t\t/**< indicates a classifier \"drop\" operation */\n+#define FM_PORT_FRM_ERR_EXTRACTION\tFM_FD_ERR_EXTRACTION\n+\t\t\t/**< Extract Out of Frame */\n+#define FM_PORT_FRM_ERR_NO_SCHEME\tFM_FD_ERR_NO_SCHEME\n+\t\t\t/**< No Scheme Selected */\n+#define FM_PORT_FRM_ERR_KEYSIZE_OVERFLOW FM_FD_ERR_KEYSIZE_OVERFLOW\n+\t\t\t/**< Keysize Overflow */\n+#define FM_PORT_FRM_ERR_COLOR_RED\tFM_FD_ERR_COLOR_RED\n+\t\t\t/**< Frame color is red */\n+#define FM_PORT_FRM_ERR_COLOR_YELLOW\tFM_FD_ERR_COLOR_YELLOW\n+\t\t\t/**< Frame color is yellow */\n+#define FM_PORT_FRM_ERR_ILL_PLCR\tFM_FD_ERR_ILL_PLCR\n+\t\t\t/**< Illegal Policer Profile selected */\n+#define FM_PORT_FRM_ERR_PLCR_FRAME_LEN\tFM_FD_ERR_PLCR_FRAME_LEN\n+\t\t\t/**< Policer frame length error */\n+#define FM_PORT_FRM_ERR_PRS_TIMEOUT\tFM_FD_ERR_PRS_TIMEOUT\n+\t\t\t/**< Parser Time out Exceed */\n+#define FM_PORT_FRM_ERR_PRS_ILL_INSTRUCT FM_FD_ERR_PRS_ILL_INSTRUCT\n+\t\t\t/**< Invalid Soft Parser instruction */\n+#define FM_PORT_FRM_ERR_PRS_HDR_ERR\tFM_FD_ERR_PRS_HDR_ERR\n+\t\t\t/**< Header error was identified during parsing */\n+#define FM_PORT_FRM_ERR_BLOCK_LIMIT_EXCEEDED\tFM_FD_ERR_BLOCK_LIMIT_EXCEEDED\n+\t\t\t/**< Frame parsed beyind 256 first bytes */\n+#define FM_PORT_FRM_ERR_PROCESS_TIMEOUT\t0x00000001\n+\t\t\t/**< FPM Frame Processing Timeout Exceeded */\n+/* @} */\n+\n+\n+/**\n+ @Group\tFM_PORT_init_grp FM Port Initialization Unit\n+\n+ @Description   FM Port Initialization Unit\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   Exceptions user callback routine, will be called upon an\n+\t\texception passing the exception identification.\n+\n+ @Param[in]\th_App\t- User's application descriptor.\n+ @Param[in]\texception  - The exception.\n+*/\n+typedef void (t_FmPortExceptionCallback) (t_Handle h_App,\n+\t\t\t\t\te_FmPortExceptions exception);\n+\n+/**\n+ @Description   User callback function called by driver with received data.\n+\n+\t\tUser provides this function. Driver invokes it.\n+\n+ @Param[in]\th_App\tApplication's handle originally specified to\n+\t\t\t\tthe API Config function\n+ @Param[in]\tp_Data\tA pointer to data received\n+ @Param[in]\tlength\tlength of received data\n+ @Param[in]\tstatus\treceive status and errors\n+ @Param[in]\tposition\tposition of buffer in frame\n+ @Param[in]\th_BufContext\tA handle of the user acossiated with this buffer\n+\n+ @Retval\te_RX_STORE_RESPONSE_CONTINUE - order the driver to continue Rx\n+\t\t\t\toperation for all ready data.\n+ @Retval\te_RX_STORE_RESPONSE_PAUSE\t- order the driver to stop Rx operation.\n+*/\n+typedef e_RxStoreResponse(t_FmPortImRxStoreCallback) (t_Handle h_App,\n+\t\t\t\t\tuint8_t  *p_Data,\n+\t\t\t\t\tuint16_t length,\n+\t\t\t\t\tuint16_t status,\n+\t\t\t\t\tuint8_t  position,\n+\t\t\t\t\tt_Handle h_BufContext);\n+\n+/**\n+ @Description   User callback function called by driver when transmit completed.\n+\n+\t\tUser provides this function. Driver invokes it.\n+\n+ @Param[in]\th_App\tApplication's handle originally specified to\n+\t\t\t\tthe API Config function\n+ @Param[in]\tp_Data\tA pointer to data received\n+ @Param[in]\tstatus\ttransmit status and errors\n+ @Param[in]\tlastBuffer\tis last buffer in frame\n+ @Param[in]\th_BufContext\tA handle of the user acossiated with this buffer\n+ */\n+typedef void (t_FmPortImTxConfCallback) (t_Handle   h_App,\n+\t\t\t\tuint8_t\t*p_Data,\n+\t\t\t\tuint16_t   status,\n+\t\t\t\tt_Handle   h_BufContext);\n+\n+/**\n+ @Description   A structure for additional Rx port parameters\n+*/\n+typedef struct t_FmPortRxParams {\n+\tuint32_t\t\terrFqid;\t/**< Error Queue Id. */\n+\tuint32_t\t\tdfltFqid;\t/**< Default Queue Id.*/\n+\tuint16_t\t\tliodnOffset;\t/**< Port's LIODN offset. */\n+\tt_FmExtPools\t\textBufPools;/**< Which external buffer pools are used\n+\t\t\t(up to FM_PORT_MAX_NUM_OF_EXT_POOLS), and their sizes. */\n+} t_FmPortRxParams;\n+\n+/**\n+ @Description   A structure for additional non-Rx port parameters\n+*/\n+typedef struct t_FmPortNonRxParams {\n+\tuint32_t\t\terrFqid;\t/**< Error Queue Id. */\n+\tuint32_t\t\tdfltFqid;/**< For Tx - Default Confirmation queue,\n+\t\t\t\t\t0 means no Tx confirmation for processed\n+\t\t\t\t\tframes. For OP port - default Rx queue. */\n+\tuint32_t\t\tqmChannel;\n+\t/**< QM-channel dedicated to this port; will be used by the FM for dequeue. */\n+} t_FmPortNonRxParams;\n+\n+/**\n+ @Description   A structure for additional Rx port parameters\n+*/\n+typedef struct t_FmPortImRxTxParams {\n+\tt_Handle\t\t\th_FmMuram;\n+\t\t\t\t\t/**< A handle of the FM-MURAM partition */\n+\tuint16_t\t\t\tliodnOffset;\n+\t\t\t\t\t/**< For Rx ports only. Port's LIODN Offset. */\n+\tuint8_t\t\t\tdataMemId;\n+\t\t\t\t\t/**< Memory partition ID for data buffers */\n+\tuint32_t\t\t\tdataMemAttributes;\n+\t\t\t\t\t/**< Memory attributes for data buffers */\n+\tt_BufferPoolInfo\t\trxPoolParams;\t/**< For Rx ports only. */\n+\tt_FmPortImRxStoreCallback   *f_RxStore;\t/**< For Rx ports only. */\n+\tt_FmPortImTxConfCallback\t*f_TxConf;\t/**< For Tx ports only. */\n+} t_FmPortImRxTxParams;\n+\n+/**\n+ @Description   A union for additional parameters depending on port type\n+*/\n+typedef union u_FmPortSpecificParams {\n+\tt_FmPortImRxTxParams\timRxTxParams;\n+\t\t\t/**< Rx/Tx Independent-Mode port parameter structure */\n+\tt_FmPortRxParams\trxParams;\t/**< Rx port parameters structure */\n+\tt_FmPortNonRxParams\tnonRxParams;/**< Non-Rx port parameters structure */\n+} u_FmPortSpecificParams;\n+\n+/**\n+ @Description   A structure representing FM initialization parameters\n+*/\n+typedef struct t_FmPortParams {\n+\tuintptr_t\tbaseAddr;\n+\t\t\t/**< Virtual Address of memory mapped FM Port registers.*/\n+\tt_Handle\th_Fm;\n+\t\t\t/**< A handle to the FM object this port related to */\n+\te_FmPortType\tportType;\t/**< Port type */\n+\tuint8_t\t\tportId;\t\t/**< Port Id - relative to type;\n+\t\t\t\tNOTE: When configuring Offline Parsing port for\n+\t\t\t\tFMANv3 devices (DPAA_VERSION 11 and higher),\n+\t\t\t\tit is highly recommended NOT to use portId=0 due to lack\n+\t\t\t\tof HW resources on portId=0. */\n+\tbool\t\tindependentModeEnable;\n+\t\t\t/**< This port is Independent-Mode - Used for Rx/Tx ports only!*/\n+\tuint16_t\t\tliodnBase;\n+\t\t\t/**< Irrelevant for P4080 rev 1. LIODN base for this port, to be\n+\t\t\t\tused together with LIODN offset. */\n+\tu_FmPortSpecificParams\tspecificParams;\n+\t\t\t\t/**< Additional parameters depending on port type. */\n+\n+\tt_FmPortExceptionCallback   *f_Exception;\n+\t\t/**< Relevant for IM only Callback routine to be called on BUSY exception */\n+\tt_Handle\t\th_App;\n+\t\t/**< A handle to an application layer object; This handle will\n+\t\tbe passed by the driver upon calling the above callbacks */\n+} t_FmPortParams;\n+\n+/**\n+ @Function\tFM_PORT_Config\n+\n+ @Description   Creates a descriptor for the FM PORT module.\n+\n+\t\tThe routine returns a handle(descriptor) to the FM PORT object.\n+\t\tThis descriptor must be passed as first parameter to all other\n+\t\tFM PORT function calls.\n+\n+\t\tNo actual initialization or configuration of FM hardware is\n+\t\tdone by this routine.\n+\n+ @Param[in]\tp_FmPortParams   - Pointer to data structure of parameters\n+\n+ @Retval\tHandle to FM object, or NULL for Failure.\n+*/\n+t_Handle FM_PORT_Config(t_FmPortParams *p_FmPortParams);\n+\n+/**\n+ @Function\tFM_PORT_Init\n+\n+ @Description   Initializes the FM PORT module by defining the software structure\n+\t\tand configuring the hardware registers.\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PORT_Init(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_Free\n+\n+ @Description   Frees all resources that were assigned to FM PORT module.\n+\n+\t\tCalling this routine invalidates the descriptor.\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PORT_Free(t_Handle h_FmPort);\n+\n+t_Handle FM_PORT_Open(t_FmPortParams *p_FmPortParams);\n+void FM_PORT_Close(t_Handle h_FmPort);\n+\n+\n+/**\n+ @Group\tFM_PORT_advanced_init_grp\tFM Port Advanced Configuration Unit\n+\n+ @Description   Configuration functions used to change default values.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   enum for defining QM frame dequeue\n+*/\n+typedef enum e_FmPortDeqType {\n+   e_FM_PORT_DEQ_TYPE1,\t/**< Dequeue from the SP channel - with priority precedence,\n+\t\t\tand Intra-Class Scheduling respected. */\n+   e_FM_PORT_DEQ_TYPE2,\t/**< Dequeue from the SP channel - with active FQ precedence,\n+\t\t\tand Intra-Class Scheduling respected. */\n+   e_FM_PORT_DEQ_TYPE3\t/**< Dequeue from the SP channel - with active FQ precedence,\n+\t\t\tand override Intra-Class Scheduling */\n+} e_FmPortDeqType;\n+\n+/**\n+ @Description   enum for defining QM frame dequeue\n+*/\n+typedef enum e_FmPortDeqPrefetchOption {\n+   e_FM_PORT_DEQ_NO_PREFETCH,\t/**< QMI preforms a dequeue action for a single frame\n+\t\t\t\tonly when a dedicated portID Tnum is waiting. */\n+   e_FM_PORT_DEQ_PARTIAL_PREFETCH,  /**< QMI preforms a dequeue action for 3 frames\n+\t\t\t\twhen one dedicated portId tnum is waiting. */\n+   e_FM_PORT_DEQ_FULL_PREFETCH\t/**< QMI preforms a dequeue action for 3 frames when\n+\t\t\t\tno dedicated portId tnums are waiting. */\n+\n+} e_FmPortDeqPrefetchOption;\n+\n+/**\n+ @Description   enum for defining port default color\n+*/\n+typedef enum e_FmPortColor {\n+\te_FM_PORT_COLOR_GREEN,\t/**< Default port color is green */\n+\te_FM_PORT_COLOR_YELLOW,\t/**< Default port color is yellow */\n+\te_FM_PORT_COLOR_RED,\t/**< Default port color is red */\n+\te_FM_PORT_COLOR_OVERRIDE/**< Ignore color */\n+} e_FmPortColor;\n+\n+/**\n+ @Description   A structure for defining Dual Tx rate limiting scale\n+*/\n+typedef enum e_FmPortDualRateLimiterScaleDown {\n+\te_FM_PORT_DUAL_RATE_LIMITER_NONE = 0,\t/**< Use only single rate limiter*/\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_2,\n+\t\t\t\t\t\t/**< Divide high rate limiter by 2 */\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_4,\n+\t\t\t\t\t\t/**< Divide high rate limiter by 4 */\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_8\n+\t\t\t\t\t\t/**< Divide high rate limiter by 8 */\n+} e_FmPortDualRateLimiterScaleDown;\n+\n+/**\n+ @Description   A structure for defining FM port resources\n+*/\n+typedef struct t_FmPortRsrc {\n+\tuint32_t\tnum;\t\t/**< Committed required resource */\n+\tuint32_t\textra;\t\t/**< Extra (not committed) required resource */\n+} t_FmPortRsrc;\n+\n+/**\n+ @Description   A structure for defining observed pool depletion\n+*/\n+typedef struct t_FmPortObservedBufPoolDepletion {\n+\tt_FmBufPoolDepletion\tpoolDepletionParams;\n+\t\t\t\t/**< parameters to define pool depletion */\n+\tt_FmExtPools\t\tpoolsParams;\n+\t\t\t\t/**< Which external buffer pools are observed\n+\t\t\t\t(up to FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS),\n+\t\t\t\tand their sizes. */\n+} t_FmPortObservedBufPoolDepletion;\n+\n+/**\n+ @Description   A structure for defining Tx rate limiting\n+*/\n+typedef struct t_FmPortRateLimit {\n+\tuint16_t\t\tmaxBurstSize;\n+\t\t\t\t/**< in KBytes for Tx ports, in frames\n+\t\t\t\tfor OP ports. (note that\n+\t\t\t\tfor early chips burst size is\n+\t\t\t\trounded up to a multiply of 1000 frames).*/\n+\tuint32_t\t\trateLimit;\n+\t\t\t\t/**< in Kb/sec for Tx ports, in frame/sec for\n+\t\t\t\tOP ports. Rate limit refers to\n+\t\t\t\tdata rate (rather than line rate). */\n+\te_FmPortDualRateLimiterScaleDown\trateLimitDivider;\n+\t\t\t\t/**< For OP ports only. Not-valid\n+\t\t\t\tfor some earlier chip revisions */\n+} t_FmPortRateLimit;\n+\n+/**\n+ @Description   A structure for defining the parameters of\n+\t\tthe Rx port performance counters\n+*/\n+typedef struct t_FmPortPerformanceCnt {\n+\tuint8_t\ttaskCompVal;\t\t/**< Task compare value */\n+\tuint8_t\tqueueCompVal;\t/**< Rx queue/Tx confirm queue compare\n+\t\t\t\tvalue (unused for H/O) */\n+\tuint8_t\tdmaCompVal;\t\t/**< Dma compare value */\n+\tuint32_t\tfifoCompVal;\t/**< Fifo compare value (in bytes) */\n+} t_FmPortPerformanceCnt;\n+\n+/**\n+ @Description   A structure for defining the sizes of the Deep Sleep\n+\t\tthe Auto Response tables\n+*/\n+typedef struct t_FmPortDsarTablesSizes {\n+\tuint16_t   maxNumOfArpEntries;\n+\tuint16_t   maxNumOfEchoIpv4Entries;\n+\tuint16_t   maxNumOfNdpEntries;\n+\tuint16_t   maxNumOfEchoIpv6Entries;\n+\tuint16_t   maxNumOfSnmpIPV4Entries;\n+\tuint16_t   maxNumOfSnmpIPV6Entries;\n+\tuint16_t   maxNumOfSnmpOidEntries;\n+\tuint16_t   maxNumOfSnmpOidChar;\n+\t\t\t/* total amount of character needed for the snmp table */\n+\tuint16_t   maxNumOfIpProtFiltering;\n+\tuint16_t   maxNumOfTcpPortFiltering;\n+\tuint16_t   maxNumOfUdpPortFiltering;\n+} t_FmPortDsarTablesSizes;\n+\n+/**\n+ @Function\tFM_PORT_ConfigDsarSupport\n+\n+ @Description   This function will allocate the amount of MURAM needed for\n+\t\tthis max number of entries for Deep Sleep Auto Response.\n+\t\tit will calculate all needed MURAM for autoresponse including\n+\t\tnecessary common stuff.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tparams\tA pointer to a structure containing the maximum\n+\t\t\t\tsizes of the auto response tables\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDsarSupport(t_Handle h_FmPortRx,\n+\t\t\t\t\tt_FmPortDsarTablesSizes *params);\n+\n+/**\n+ @Function\tFM_PORT_ConfigNumOfOpenDmas\n+\n+ @Description   Calling this routine changes the max number of open DMA's\n+\t\tavailable for this port. It changes this parameter in the\n+\t\tinternal driver data base from its default configuration\n+\t\t[OP: 1]\n+\t\t[1G-RX, 1G-TX: 1 (+1)]\n+\t\t[10G-RX, 10G-TX: 8 (+8)]\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_OpenDmas  A pointer to a structure of parameters defining\n+\t\t\t\tthe open DMA allocation.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigNumOfOpenDmas(t_Handle h_FmPort,\n+\t\t\t\t\t\tt_FmPortRsrc *p_OpenDmas);\n+\n+/**\n+ @Function\tFM_PORT_ConfigNumOfTasks\n+\n+ @Description   Calling this routine changes the max number of tasks\n+\t\tavailable for this port. It changes this parameter in the\n+\t\tinternal driver data base from its default configuration\n+\t\t[OP : 1]\n+\t\t[1G - RX, 1G - TX : 3 ( + 2)]\n+\t\t[10G - RX, 10G - TX : 16 ( + 8)]\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_NumOfTasks\tA pointer to a structure of parameters defining\n+\t\t\t\tthe tasks allocation.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigNumOfTasks(t_Handle h_FmPort,\n+\t\t\t\t\tt_FmPortRsrc *p_NumOfTasks);\n+\n+/**\n+ @Function\tFM_PORT_ConfigSizeOfFifo\n+\n+ @Description   Calling this routine changes the max FIFO size configured for this port.\n+\n+\t\tThis function changes the internal driver data base from its\n+\t\tdefault configuration. Please refer to the driver's User Guide for\n+\t\tinformation on default FIFO sizes in the various devices.\n+\t\t[OP: 2KB]\n+\t\t[1G-RX, 1G-TX: 11KB]\n+\t\t[10G-RX, 10G-TX: 12KB]\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_SizeOfFifo\tA pointer to a structure of parameters defining\n+\t\t\t\tthe FIFO allocation.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigSizeOfFifo(t_Handle h_FmPort,\n+\t\t\t\t\tt_FmPortRsrc *p_SizeOfFifo);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDeqHighPriority\n+\n+ @Description   Calling this routine changes the dequeue priority in the\n+\t\tinternal driver data base from its default configuration\n+\t\t1G: [DEFAULT_PORT_deqHighPriority_1G]\n+\t\t10G: [DEFAULT_PORT_deqHighPriority_10G]\n+\n+\t\tMay be used for Non - Rx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\thighPri\tTRUE to select high priority, FALSE for normal operation.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDeqHighPriority(t_Handle h_FmPort, bool highPri);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDeqType\n+\n+ @Description   Calling this routine changes the dequeue type parameter in the\n+\t\tinternal driver data base from its default configuration\n+\t\t[DEFAULT_PORT_deqType].\n+\n+\t\tMay be used for Non - Rx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tdeqType\tAccording to QM definition.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDeqType(t_Handle h_FmPort,\n+\t\t\t\t\te_FmPortDeqType deqType);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDeqPrefetchOption\n+\n+ @Description   Calling this routine changes the dequeue prefetch option parameter in the\n+\t\tinternal driver data base from its default configuration\n+\t\t[DEFAULT_PORT_deqPrefetchOption]\n+\t\tNote: Available for some chips only\n+\n+\t\tMay be used for Non - Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tdeqPrefetchOption   New option\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDeqPrefetchOption(t_Handle h_FmPort,\n+\t\t\t\te_FmPortDeqPrefetchOption deqPrefetchOption);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDeqByteCnt\n+\n+ @Description   Calling this routine changes the dequeue byte count parameter in\n+\t\tthe internal driver data base from its default configuration\n+\t\t1G:[DEFAULT_PORT_deqByteCnt_1G].\n+\t\t10G:[DEFAULT_PORT_deqByteCnt_10G].\n+\n+\t\tMay be used for Non - Rx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tdeqByteCnt\tNew byte count\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDeqByteCnt(t_Handle h_FmPort,\n+\t\t\t\t\tuint16_t deqByteCnt);\n+\n+/**\n+ @Function\tFM_PORT_ConfigBufferPrefixContent\n+\n+ @Description   Defines the structure, size and content of the application buffer.\n+\t\tThe prefix will\n+\t\tIn Tx ports, if 'passPrsResult', the application\n+\t\tshould set a value to their offsets in the prefix of\n+\t\tthe FM will save the first 'privDataSize', than,\n+\t\tdepending on 'passPrsResult' and 'passTimeStamp', copy parse result\n+\t\tand timeStamp, and the packet itself (in this order), to the\n+\t\tapplication buffer, and to offset.\n+\t\tCalling this routine changes the buffer margins definitions\n+\t\tin the internal driver data base from its default\n+\t\tconfiguration: Data size:  [DEFAULT_PORT_bufferPrefixContent_privDataSize]\n+\t\t Pass Parser result: [DEFAULT_PORT_bufferPrefixContent_passPrsResult].\n+\t\t Pass timestamp: [DEFAULT_PORT_bufferPrefixContent_passTimeStamp].\n+\n+\t\tMay be used for all ports\n+\n+ @Param[in]\th_FmPort\t\t\tA handle to a FM Port module.\n+ @Param[in,out] p_FmBufferPrefixContent\tA structure of parameters describing the\n+\t\t\t\t\tstructure of the buffer.\n+\t\t\t\t\tOut parameter: Start margin - offset\n+\t\t\t\t\tof data from start of external buffer.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigBufferPrefixContent(t_Handle\th_FmPort,\n+\t\t\tt_FmBufferPrefixContent\t*p_FmBufferPrefixContent);\n+\n+/**\n+ @Function\tFM_PORT_ConfigCheksumLastBytesIgnore\n+\n+ @Description   Calling this routine changes the number of checksum bytes to ignore\n+\t\tparameter in the internal driver data base from its default configuration\n+\t\t[DEFAULT_PORT_cheksumLastBytesIgnore]\n+\n+\t\tMay be used by Tx & Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tcheksumLastBytesIgnore  New value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigCheksumLastBytesIgnore(t_Handle h_FmPort,\n+\t\t\tuint8_t cheksumLastBytesIgnore);\n+\n+/**\n+ @Function\tFM_PORT_ConfigCutBytesFromEnd\n+\n+ @Description   Calling this routine changes the number of bytes to cut from a\n+\t\tframe's end parameter in the internal driver data base\n+\t\tfrom its default configuration [DEFAULT_PORT_cutBytesFromEnd]\n+\t\tNote that if the result of (frame length before chop - cutBytesFromEnd) is\n+\t\tless than 14 bytes, the chop operation is not executed.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tcutBytesFromEnd\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigCutBytesFromEnd(t_Handle h_FmPort,\n+\t\t\tuint8_t cutBytesFromEnd);\n+\n+/**\n+ @Function\tFM_PORT_ConfigPoolDepletion\n+\n+ @Description   Calling this routine enables pause frame generation depending on the\n+\t\tdepletion status of BM pools. It also defines the conditions to activate\n+\t\tthis functionality. By default, this functionality is disabled.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_BufPoolDepletion\tA structure of pool depletion parameters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigPoolDepletion(t_Handle h_FmPort,\n+\t\t\tt_FmBufPoolDepletion *p_BufPoolDepletion);\n+\n+/**\n+ @Function\tFM_PORT_ConfigObservedPoolDepletion\n+\n+ @Description   Calling this routine enables a mechanism to stop port enqueue\n+\t\tdepending on the depletion status of selected BM pools.\n+\t\tIt also defines the conditions to activate\n+\t\tthis functionality. By default, this functionality is disabled.\n+\n+\t\tNote: Available for some chips only\n+\n+\t\tMay be used for OP ports only\n+\n+ @Param[in]\th_FmPort\t\t\t\tA handle to a FM Port module.\n+ @Param[in]\tp_FmPortObservedBufPoolDepletion\n+\t\tA structure of parameters for pool depletion.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigObservedPoolDepletion(t_Handle h_FmPort,\n+\tt_FmPortObservedBufPoolDepletion *p_FmPortObservedBufPoolDepletion);\n+\n+/**\n+ @Function\tFM_PORT_ConfigExtBufPools\n+\n+ @Description   This routine should be called for OP ports\n+\t\tthat internally use BM buffer pools. In such cases, e.g. for fragmentation and\n+\t\tre-assembly, the FM needs new BM buffers. By calling this routine the user\n+\t\tspecifies the BM buffer pools that should be used.\n+\n+\t\tNote: Available for some chips only\n+\n+\t\tMay be used for OP ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_FmExtPools\tA structure of parameters for the external pools.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigExtBufPools(t_Handle h_FmPort,\n+\t\t\tt_FmExtPools *p_FmExtPools);\n+\n+/**\n+ @Function\tFM_PORT_ConfigBackupPools\n+\n+ @Description   Calling this routine allows the configuration of some of the BM pools\n+\t\tdefined for this port as backup pools.\n+\t\tA pool configured to be a backup pool will be used only if all other\n+\t\tenabled non - backup pools are depleted.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_FmPortBackupBmPools   An array of pool id's. All pools specified here will\n+\t\t\t\tbe defined as backup pools.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigBackupPools(t_Handle h_FmPort,\n+\t\t\tt_FmBackupBmPools *p_FmPortBackupBmPools);\n+\n+/**\n+ @Function\tFM_PORT_ConfigFrmDiscardOverride\n+\n+ @Description   Calling this routine changes the error frames destination parameter\n+\t\tin the internal driver data base from its default configuration :\n+\t\toverride =[DEFAULT_PORT_frmDiscardOverride]\n+\n+\t\tMay be used for Rx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\toverride\tTRUE to override discarding of error frames and\n+\t\t\t\tenqueueing them to error queue.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigFrmDiscardOverride(t_Handle h_FmPort,\n+\t\t\tbool override);\n+\n+/**\n+ @Function\tFM_PORT_ConfigErrorsToDiscard\n+\n+ @Description   Calling this routine changes the behaviour on error parameter\n+\t\tin the internal driver data base from its default configuration :\n+\t\t[DEFAULT_PORT_errorsToDiscard].\n+\t\tIf a requested error was previously defined as \"ErrorsToEnqueue\" it's\n+\t\tdefinition will change and the frame will be discarded.\n+\t\tErrors that were not defined either as \"ErrorsToEnqueue\" nor as\n+\t\t\"ErrorsToDiscard\", will be forwarded to CPU.\n+\n+\t\tMay be used for Rx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\terrs\tA list of errors to discard\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigErrorsToDiscard(t_Handle h_FmPort,\n+\t\tfmPortFrameErrSelect_t errs);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDmaSwapData\n+\n+ @Description   Calling this routine changes the DMA swap data aparameter\n+\t\tin the internal driver data base from its default\n+\t\tconfiguration[DEFAULT_PORT_dmaSwapData]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tswapData\tNew selection\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDmaSwapData(t_Handle h_FmPort,\n+\t\te_FmDmaSwapOption swapData);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDmaIcCacheAttr\n+\n+ @Description   Calling this routine changes the internal context cache\n+\t\tattribute parameter in the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_dmaIntContextCacheAttr]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tintContextCacheAttr\tNew selection\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDmaIcCacheAttr(t_Handle h_FmPort,\n+\t\te_FmDmaCacheOption intContextCacheAttr);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDmaHdrAttr\n+\n+ @Description   Calling this routine changes the header cache\n+\t\tattribute parameter in the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_dmaHeaderCacheAttr]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\t\tA handle to a FM Port module.\n+ @Param[in]\theaderCacheAttr\t\tNew selection\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDmaHdrAttr(t_Handle h_FmPort,\n+\t\te_FmDmaCacheOption headerCacheAttr);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDmaScatterGatherAttr\n+\n+ @Description   Calling this routine changes the scatter gather cache\n+\t\tattribute parameter in the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_dmaScatterGatherCacheAttr]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\t\tA handle to a FM Port module.\n+ @Param[in]\tscatterGatherCacheAttr\tNew selection\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDmaScatterGatherAttr(t_Handle h_FmPort,\n+\t\te_FmDmaCacheOption scatterGatherCacheAttr);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDmaWriteOptimize\n+\n+ @Description   Calling this routine changes the write optimization\n+parameter in the internal driver data base\n+from its default configuration : By default optimize = [DEFAULT_PORT_dmaWriteOptimize].\n+Note:\n+\n+1. For head optimization, data alignment must be >= 16 (supported by default).\n+\n+3. For tail optimization, note that the optimization is performed by extending the write transaction\n+of the frame payload at the tail as needed to achieve optimal bus transfers, so that the last write\n+is extended to be on 16 / 64 bytes aligned block (chip dependent).\n+\n+Relevant for non - Tx port types\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\toptimize\tTRUE to enable optimization, FALSE for normal operation\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDmaWriteOptimize(t_Handle h_FmPort,\n+\t\t\t\t\t\tbool optimize);\n+\n+/**\n+ @Function\tFM_PORT_ConfigNoScatherGather\n+\n+ @Description\tCalling this routine changes the noScatherGather parameter in internal driver\n+\t\tdata base from its default configuration.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tnoScatherGather\n+\t\t\t(TRUE - frame is discarded if can not be stored in single buffer,\n+\t\t\tFALSE - frame can be stored in scatter gather (S / G) format).\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigNoScatherGather(t_Handle h_FmPort,\n+\t\t\t\t\t\tbool noScatherGather);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDfltColor\n+\n+ @Description   Calling this routine changes the internal default color parameter\n+\t\tin the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_color]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tcolor\tNew selection\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDfltColor(t_Handle h_FmPort, e_FmPortColor color);\n+\n+/**\n+ @Function\tFM_PORT_ConfigSyncReq\n+\n+ @Description   Calling this routine changes the synchronization attribute parameter\n+\t\tin the internal driver data base from its default configuration :\n+\t\tsyncReq =[DEFAULT_PORT_syncReq]\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tsyncReq\tTRUE to request synchronization, FALSE otherwize.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigSyncReq(t_Handle h_FmPort, bool syncReq);\n+\n+/**\n+ @Function\tFM_PORT_ConfigForwardReuseIntContext\n+\n+ @Description   This routine is relevant for Rx ports that are routed to OP port.\n+\t\tIt changes the internal context reuse option in the internal\n+\t\tdriver data base from its default configuration :\n+\t\treuse =[DEFAULT_PORT_forwardIntContextReuse]\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\treuse\tTRUE to reuse internal context on frames\n+\t\t\t\tforwarded to OP port.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigForwardReuseIntContext(t_Handle h_FmPort,\n+\t\t\t\t\t\tbool reuse);\n+\n+/**\n+ @Function\tFM_PORT_ConfigDontReleaseTxBufToBM\n+\n+ @Description   This routine should be called if no Tx confirmation\n+\t\tis done, and yet buffers should not be released to the BM.\n+\n+\t\tNormally, buffers are returned using the Tx confirmation\n+\t\tprocess. When Tx confirmation is not used (defFqid = 0),\n+\t\tbuffers are typically released to the BM. This routine\n+\t\tmay be called to avoid this behavior and not release the\n+\t\tbuffers.\n+\n+\t\tMay be used for Tx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigDontReleaseTxBufToBM(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_ConfigIMMaxRxBufLength\n+\n+ @Description   Changes the maximum receive buffer length from its default\n+\t\tconfiguration: Closest rounded down power of 2 value of the\n+\t\tdata buffer size.\n+\n+\t\tThe maximum receive buffer length directly affects the structure\n+\t\tof received frames (single- or multi-buffered) and the performance\n+\t\tof both the FM and the driver.\n+\n+\t\tThe selection between single- or multi-buffered frames should be\n+\t\tdone according to the characteristics of the specific application.\n+\t\tThe recommended mode is to use a single data buffer per packet,\n+\t\tas this mode provides the best performance. However, the user can\n+\t\tselect to use multiple data buffers per packet.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tnewVal\tMaximum receive buffer length (in bytes).\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\tThis routine is to be used only if Independent-Mode is enabled.\n+*/\n+uint32_t FM_PORT_ConfigIMMaxRxBufLength(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint16_t newVal);\n+\n+/**\n+ @Function\tFM_PORT_ConfigIMRxBdRingLength\n+\n+ @Description   Changes the receive BD ring length from its default\n+\t\tconfiguration:[DEFAULT_PORT_rxBdRingLength]\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tnewVal\tThe desired BD ring length.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\tThis routine is to be used only if Independent-Mode is enabled.\n+*/\n+uint32_t FM_PORT_ConfigIMRxBdRingLength(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint16_t newVal);\n+\n+/**\n+ @Function\tFM_PORT_ConfigIMTxBdRingLength\n+\n+ @Description   Changes the transmit BD ring length from its default\n+\t\tconfiguration:[DEFAULT_PORT_txBdRingLength]\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tnewVal\tThe desired BD ring length.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\tThis routine is to be used only if Independent-Mode is enabled.\n+*/\n+uint32_t FM_PORT_ConfigIMTxBdRingLength(t_Handle h_FmPort,\n+\t\t\t\t\tuint16_t newVal);\n+\n+/**\n+ @Function\tFM_PORT_ConfigIMFmanCtrlExternalStructsMemory\n+\n+ @Description   Configures memory partition and attributes for FMan-Controller\n+\t\tdata structures (e.g. BD rings).\n+\t\tCalling this routine changes the internal driver data base\n+\t\tfrom its default configuration\n+\t\t[DEFAULT_PORT_ImfwExtStructsMemId,\n+\t\tDEFAULT_PORT_ImfwExtStructsMemAttr].\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tmemId\tMemory partition ID.\n+ @Param[in]\tmemAttributes   Memory attributes mask\n+\t\t\t(a combination of MEMORY_ATTR_x flags).\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t  FM_PORT_ConfigIMFmanCtrlExternalStructsMemory(\n+\t\t\t\t\tt_Handle h_FmPort,\n+\t\t\t\t\tuint8_t  memId,\n+\t\t\t\t\tuint32_t memAttributes);\n+\n+/**\n+ @Function\tFM_PORT_ConfigIMPolling\n+\n+ @Description   Changes the Rx flow from interrupt driven (default) to polling.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\tThis routine is to be used only if Independent-Mode is enabled.\n+*/\n+uint32_t FM_PORT_ConfigIMPolling(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_ConfigMaxFrameLength\n+\n+ @Description   Changes the definition of the max size of frame that should be\n+\t\ttransmitted/received on this port from\n+\t\tits default value [DEFAULT_PORT_maxFrameLength].\n+\t\tThis parameter is used for confirmation of the minimum Fifo\n+\t\tsize calculations and only for Tx ports or ports working in\n+\t\tindependent mode. This should be larger than the maximum possible\n+\t\tMTU that will be used for this port (i.e. its MAC).\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tlength\tMax size of frame\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+\t\tThis routine is to be used only if Independent-Mode is enabled.\n+*/\n+uint32_t FM_PORT_ConfigMaxFrameLength(t_Handle h_FmPort,\n+\t\t\t\t\tuint16_t length);\n+\n+/*\n+ @Function\tFM_PORT_ConfigTxFifoMinFillLevel\n+\n+ @Description   Calling this routine changes the fifo minimum\n+\t\tfill level parameter in the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_txFifoMinFillLevel]\n+\n+\t\tMay be used for Tx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tminFillLevel\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigTxFifoMinFillLevel(t_Handle h_FmPort,\n+\t\t\t\t\tuint32_t minFillLevel);\n+\n+/*\n+ @Function\tFM_PORT_ConfigFifoDeqPipelineDepth\n+\n+ @Description   Calling this routine changes the fifo dequeue\n+\t\tpipeline depth parameter in the internal driver data base\n+\n+\t\tfrom its default configuration :\n+\t\t1G ports : [DEFAULT_PORT_fifoDeqPipelineDepth_1G],\n+\t\t10G port : [DEFAULT_PORT_fifoDeqPipelineDepth_10G],\n+\t\tOP port : [DEFAULT_PORT_fifoDeqPipelineDepth_OH]\n+\n+\t\tMay be used for Tx / OP ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tdeqPipelineDepth\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigFifoDeqPipelineDepth(t_Handle h_FmPort,\n+\t\t\t\tuint8_t deqPipelineDepth);\n+\n+/*\n+ @Function\tFM_PORT_ConfigTxFifoLowComfLevel\n+\n+ @Description   Calling this routine changes the fifo low comfort level\n+\t\tparameter in internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_txFifoLowComfLevel]\n+\n+\t\tMay be used for Tx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tfifoLowComfLevel\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigTxFifoLowComfLevel(t_Handle h_FmPort,\n+\t\t\t\t\tuint32_t fifoLowComfLevel);\n+\n+/*\n+ @Function\tFM_PORT_ConfigRxFifoThreshold\n+\n+ @Description   Calling this routine changes the threshold of the FIFO\n+\t\tfill level parameter in the internal driver data base\n+\t\tfrom its default configuration[DEFAULT_PORT_rxFifoThreshold]\n+\n+\t\tIf the total number of buffers which are\n+\t\tcurrently in use and associated with the\n+\t\tspecific RX port exceed this threshold, the\n+\t\tBMI will signal the MAC to send a pause frame\n+\t\tover the link.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tfifoThreshold\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigRxFifoThreshold(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint32_t fifoThreshold);\n+\n+/*\n+ @Function\tFM_PORT_ConfigRxFifoPriElevationLevel\n+\n+ @Description   Calling this routine changes the priority elevation level\n+\t\tparameter in the internal driver data base from its default\n+\t\tconfiguration[DEFAULT_PORT_rxFifoPriElevationLevel]\n+\n+\t\tIf the total number of buffers which are currently in use and\n+\t\tassociated with the specific RX port exceed the amount specified\n+\t\tin priElevationLevel, BMI will signal the main FM's DMA to\n+\n+\t\televate the FM priority on the system bus.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tpriElevationLevel   New value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigRxFifoPriElevationLevel(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint32_t priElevationLevel);\n+\n+#ifdef FM_HEAVY_TRAFFIC_HANG_ERRATA_FMAN_A005669\n+/*\n+ @Function\tFM_PORT_ConfigBCBWorkaround\n+\n+ @Description   Configures BCB errata workaround.\n+\n+\t\tWhen BCB errata is applicable, the workaround is always\n+\t\tperformed by FM Controller. Thus, this functions doesn't\n+\t\tactually enable errata workaround but rather allows driver\n+\t\tto perform adjustments required due to errata workaround\n+\t\texecution in FM controller.\n+\n+\t\tApplying BCB workaround also configures FM_PORT_FRM_ERR_PHYSICAL\n+\t\terrors to be discarded. Thus FM_PORT_FRM_ERR_PHYSICAL can't be\n+\t\tset by FM_PORT_SetErrorsRoute() function.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigBCBWorkaround(t_Handle h_FmPort);\n+#endif /* FM_HEAVY_TRAFFIC_HANG_ERRATA_FMAN_A005669 */\n+\n+#if (DPAA_VERSION >= 11)\n+/*\n+ @Function\tFM_PORT_ConfigInternalBuffOffset\n+\n+ @Description   Configures internal buffer offset.\n+\n+\t\tMay be used for Rx and OP ports only\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tval\t\tNew value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ConfigInternalBuffOffset(t_Handle h_FmPort, uint8_t val);\n+#endif /* (DPAA_VERSION >= 11) */\n+\n+/** @} */ /* end of FM_PORT_advanced_init_grp group */\n+/** @} */ /* end of FM_PORT_init_grp group */\n+\n+/**\n+ @Group\tFM_PORT_runtime_control_grp FM Port Runtime Control Unit\n+\n+ @Description   FM Port Runtime control unit API functions, definitions and enums.\n+\n+ @{\n+*/\n+\n+/**\n+ @Description   enum for defining FM Port counters\n+*/\n+typedef enum e_FmPortCounters {\n+\te_FM_PORT_COUNTERS_CYCLE,\t\t/**< BMI performance counter */\n+\te_FM_PORT_COUNTERS_TASK_UTIL,\t\t/**< BMI performance counter */\n+\te_FM_PORT_COUNTERS_QUEUE_UTIL,\t\t/**< BMI performance counter */\n+\te_FM_PORT_COUNTERS_DMA_UTIL,\t\t/**< BMI performance counter */\n+\te_FM_PORT_COUNTERS_FIFO_UTIL,\t\t/**< BMI performance counter */\n+\te_FM_PORT_COUNTERS_RX_PAUSE_ACTIVATION,\n+\t\t\t\t\t/**< BMI Rx only performance counter */\n+\te_FM_PORT_COUNTERS_FRAME,\t\t/**< BMI statistics counter */\n+\te_FM_PORT_COUNTERS_DISCARD_FRAME,\t/**< BMI statistics counter */\n+\te_FM_PORT_COUNTERS_DEALLOC_BUF,\t/**< BMI deallocate buffer statistics counter */\n+\te_FM_PORT_COUNTERS_RX_BAD_FRAME,\t/**< BMI Rx only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_LARGE_FRAME,\t/**< BMI Rx only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_FILTER_FRAME,/**< BMI Rx & OP only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_LIST_DMA_ERR,\n+\t\t\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD,\n+\t\t\t\t\t/**< BMI Rx, OP & HC statistics counter */\n+\te_FM_PORT_COUNTERS_PREPARE_TO_ENQUEUE_COUNTER,\n+\t\t\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_WRED_DISCARD,/**< BMI OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_LENGTH_ERR,\t\t/**< BMI non-Rx statistics counter */\n+\te_FM_PORT_COUNTERS_UNSUPPRTED_FORMAT,\t/**< BMI non-Rx statistics counter */\n+\te_FM_PORT_COUNTERS_DEQ_TOTAL,\t/**< QMI total QM dequeues counter */\n+\te_FM_PORT_COUNTERS_ENQ_TOTAL,\t/**< QMI total QM enqueues counter */\n+\te_FM_PORT_COUNTERS_DEQ_FROM_DEFAULT,\t/**< QMI counter */\n+\te_FM_PORT_COUNTERS_DEQ_CONFIRM\t\t/**< QMI counter */\n+} e_FmPortCounters;\n+\n+typedef struct t_FmPortBmiStats {\n+\tuint32_t cntCycle;\n+\tuint32_t cntTaskUtil;\n+\tuint32_t cntQueueUtil;\n+\tuint32_t cntDmaUtil;\n+\tuint32_t cntFifoUtil;\n+\tuint32_t cntRxPauseActivation;\n+\tuint32_t cntFrame;\n+\tuint32_t cntDiscardFrame;\n+\tuint32_t cntDeallocBuf;\n+\tuint32_t cntRxBadFrame;\n+\tuint32_t cntRxLargeFrame;\n+\tuint32_t cntRxFilterFrame;\n+\tuint32_t cntRxListDmaErr;\n+\tuint32_t cntRxOutOfBuffersDiscard;\n+\tuint32_t cntWredDiscard;\n+\tuint32_t cntLengthErr;\n+\tuint32_t cntUnsupportedFormat;\n+} t_FmPortBmiStats;\n+\n+/**\n+ @Description   Structure for Port id parameters.\n+\t\tFields commented 'IN' are passed by the port module to be used\n+\t\tby the FM module.\n+\t\tFields commented 'OUT' will be filled by FM before returning to port.\n+*/\n+typedef struct t_FmPortCongestionGrps {\n+\tuint16_t\tnumOfCongestionGrpsToConsider;\n+\t\t\t\t/**< The number of required CGs\n+\t\t\t\tto define the size of the following array */\n+\tuint8_t\tcongestionGrpsToConsider[FM_PORT_NUM_OF_CONGESTION_GRPS];\n+\t\t\t\t/**< An array of CG indexes;\n+\t\t\t\tNote that the size of the array should be\n+\t\t\t\t'numOfCongestionGrpsToConsider'. */\n+#if (DPAA_VERSION >= 11)\n+\tbool\tpfcPrioritiesEn[FM_PORT_NUM_OF_CONGESTION_GRPS][FM_MAX_NUM_OF_PFC_PRIORITIES];\n+\t\t\t\t/**< a matrix that represents the map between the CG ids\n+\t\t\t\tdefined in 'congestionGrpsToConsider' to the priorties\n+\t\t\t\tmapping array. */\n+#endif /* (DPAA_VERSION >= 11) */\n+} t_FmPortCongestionGrps;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response ARP Entry\n+*/\n+typedef struct t_FmPortDsarArpEntry {\n+\tuint32_t  ipAddress;\n+\tuint8_t   mac[6];\n+\tbool\tisVlan;\n+\tuint16_t  vid;\n+} t_FmPortDsarArpEntry;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response ARP info\n+*/\n+typedef struct t_FmPortDsarArpInfo {\n+\tuint8_t\ttableSize;\n+\tt_FmPortDsarArpEntry *p_AutoResTable;\n+\tbool\t\tenableConflictDetection;\n+\t/* when TRUE Conflict Detection will be checked and wake the host if needed */\n+} t_FmPortDsarArpInfo;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response NDP Entry\n+*/\n+typedef struct t_FmPortDsarNdpEntry {\n+\tuint32_t  ipAddress[4];\n+\tuint8_t   mac[6];\n+\tbool\tisVlan;\n+\tuint16_t  vid;\n+} t_FmPortDsarNdpEntry;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response NDP info\n+*/\n+typedef struct t_FmPortDsarNdpInfo {\n+\tuint32_t\t\tmulticastGroup;\n+\n+\tuint8_t\t\ttableSizeAssigned;\n+\tt_FmPortDsarNdpEntry  *p_AutoResTableAssigned;\n+\t\t/* This list refer to solicitation IP addresses.\n+\t\tNote that all IP addresses must be from the same multicast group.\n+\t\tThis will be checked and if not operation will fail. */\n+\tuint8_t\t\ttableSizeTmp;\n+\tt_FmPortDsarNdpEntry  *p_AutoResTableTmp;\n+\t\t/* This list refer to temp IP addresses.\n+\t\tNote that all temp IP addresses must be from the same multicast group.\n+\t\tThis will be checked and if not operation will fail. */\n+\n+\tbool\t\tenableConflictDetection;\n+\t/* when TRUE Conflict Detection will be checked and wake the host if needed */\n+\n+} t_FmPortDsarNdpInfo;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response ICMPV4 info\n+*/\n+typedef struct t_FmPortDsarEchoIpv4Info {\n+\tuint8_t\t\ttableSize;\n+\tt_FmPortDsarArpEntry  *p_AutoResTable;\n+} t_FmPortDsarEchoIpv4Info;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response ICMPV6 info\n+*/\n+typedef struct t_FmPortDsarEchoIpv6Info {\n+\tuint8_t\t\ttableSize;\n+\tt_FmPortDsarNdpEntry  *p_AutoResTable;\n+} t_FmPortDsarEchoIpv6Info;\n+\n+/**\n+@Description\tDeep Sleep Auto Response SNMP OIDs table entry\n+\n+*/\n+typedef struct {\n+\tuint16_t\toidSize;\n+\tuint8_t\t*oidVal; /* only the oid string */\n+\tuint16_t\tresSize;\n+\tuint8_t\t*resVal; /* resVal will be the entire reply,\n+\t\ti.e. \"Type|Length|Value\" */\n+} t_FmPortDsarOidsEntry;\n+\n+/**\n+ @Description   Deep Sleep Auto Response SNMP IPv4 Addresses Table Entry\n+\t\tRefer to the FMan Controller spec for more details.\n+*/\n+typedef struct {\n+\tuint32_t ipv4Addr; /*!< 32 bit IPv4 Address. */\n+\tbool\tisVlan;\n+\tuint16_t vid;   /*!< 12 bits VLAN ID. The 4 left-most bits should be cleared*/\n+\t/*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */\n+} t_FmPortDsarSnmpIpv4AddrTblEntry;\n+\n+/**\n+ @Description   Deep Sleep Auto Response SNMP IPv6 Addresses Table Entry\n+\t\tRefer to the FMan Controller spec for more details.\n+*/\n+typedef struct {\n+\tuint32_t ipv6Addr[4];  /*!< 4 * 32 bit IPv6 Address.*/\n+\tbool\tisVlan;\n+\tuint16_t vid;\t/*!< 12 bits VLAN ID. The 4 left-most bits should be cleared*/\n+\t/*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */\n+} t_FmPortDsarSnmpIpv6AddrTblEntry;\n+\n+/**\n+ @Description   Deep Sleep Auto Response SNMP Descriptor\n+\n+*/\n+typedef struct {\n+\tuint16_t control;\t/**< Control bits [0-15]. */\n+\tuint16_t maxSnmpMsgLength;/**< Maximal allowed SNMP message length. */\n+\tuint16_t numOfIpv4Addresses; /**< Number of entries in IPv4 addresses table. */\n+\tuint16_t numOfIpv6Addresses; /**< Number of entries in IPv6 addresses table. */\n+\tt_FmPortDsarSnmpIpv4AddrTblEntry *p_Ipv4AddrTbl;\n+\t\t\t\t/**< Pointer to IPv4 addresses table. */\n+\tt_FmPortDsarSnmpIpv6AddrTblEntry *p_Ipv6AddrTbl;\n+\t\t\t\t/**< Pointer to IPv6 addresses table. */\n+\tuint8_t *p_RdOnlyCommunityStr;\n+\t\t\t\t/**< Pointer to the Read Only Community String. */\n+\tuint8_t *p_RdWrCommunityStr;/**< Pointer to the Read Write Community String. */\n+\tt_FmPortDsarOidsEntry *p_OidsTbl;/**< Pointer to OIDs table. */\n+\tuint32_t oidsTblSize;\t/**< Number of entries in OIDs table. */\n+} t_FmPortDsarSnmpInfo;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response filtering Entry\n+*/\n+typedef struct t_FmPortDsarFilteringEntry {\n+\tuint16_t\tsrcPort;\n+\tuint16_t\tdstPort;\n+\tuint16_t\tsrcPortMask;\n+\tuint16_t\tdstPortMask;\n+} t_FmPortDsarFilteringEntry;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response filtering info\n+*/\n+typedef struct t_FmPortDsarFilteringInfo {\n+\t/* IP protocol filtering parameters */\n+\tuint8_t\tipProtTableSize;\n+\tuint8_t\t*p_IpProtTablePtr;\n+\tbool\tipProtPassOnHit;\n+\t\t\t/* when TRUE, miss in the table will cause the packet to be droped,\n+\t\t\thit will pass the packet to UDP/TCP filters if needed and if not\n+\t\t\tto the classification tree. If the classification tree will pass\n+\t\t\tthe packet to a queue it will cause a wake interupt.\n+\t\t\tWhen FALSE it the other way around. */\n+\t/* UDP port filtering parameters */\n+\tuint8_t\tudpPortsTableSize;\n+\tt_FmPortDsarFilteringEntry *p_UdpPortsTablePtr;\n+\tbool\tudpPortPassOnHit;\n+\t\t\t/* when TRUE, miss in the table will cause the packet to be droped,\n+\t\t\thit will pass the packet to classification tree.\n+\t\t\tIf the classification tree will pass the packet to a queue it\n+\t\t\twill cause a wake interupt.\n+\t\t\tWhen FALSE it the other way around. */\n+\t/* TCP port filtering parameters */\n+\tuint16_t\ttcpFlagsMask;\n+\tuint8_t\ttcpPortsTableSize;\n+\tt_FmPortDsarFilteringEntry *p_TcpPortsTablePtr;\n+\tbool\ttcpPortPassOnHit;\n+\t\t\t/* when TRUE, miss in the table will cause the packet to be droped,\n+\t\t\thit will pass the packet to classification tree.\n+\t\t\tIf the classification tree will pass the packet to a queue it\n+\t\t\twill cause a wake interupt.\n+\t\t\tWhen FALSE it the other way around. */\n+} t_FmPortDsarFilteringInfo;\n+\n+/**\n+ @Description   Structure for Deep Sleep Auto Response parameters\n+*/\n+typedef struct t_FmPortDsarParams {\n+\tt_Handle\t\th_FmPortTx;\n+\tt_FmPortDsarArpInfo\t*p_AutoResArpInfo;\n+\tt_FmPortDsarEchoIpv4Info  *p_AutoResEchoIpv4Info;\n+\tt_FmPortDsarNdpInfo\t*p_AutoResNdpInfo;\n+\tt_FmPortDsarEchoIpv6Info  *p_AutoResEchoIpv6Info;\n+\tt_FmPortDsarSnmpInfo\t*p_AutoResSnmpInfo;\n+\tt_FmPortDsarFilteringInfo *p_AutoResFilteringInfo;\n+} t_FmPortDsarParams;\n+\n+/**\n+ @Function\tFM_PORT_EnterDsar\n+\n+ @Description   Enter Deep Sleep Auto Response mode.\n+\t\tThis function write the appropriate values to in the relevant\n+\t\ttables in the MURAM.\n+\n+ @Param[in]\th_FmPortRx - FM PORT module descriptor\n+ @Param[in]\tparams - Auto Response parameters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_EnterDsar(t_Handle h_FmPortRx,\n+\t\t\t\tt_FmPortDsarParams *params);\n+\n+/**\n+ @Function\tFM_PORT_EnterDsarFinal\n+\n+ @Description   Enter Deep Sleep Auto Response mode.\n+\t\tThis function sets the Tx port in independent mode as needed\n+\t\tand redirect the receive flow to go through the\n+\t\tDsar Fman-ctrl code\n+\n+ @Param[in]\th_DsarRxPort - FM Rx PORT module descriptor\n+ @Param[in]\th_DsarTxPort - FM Tx PORT module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_EnterDsarFinal(t_Handle h_DsarRxPort,\n+\t\t\t\t\tt_Handle h_DsarTxPort);\n+\n+/**\n+ @Function\tFM_PORT_ExitDsar\n+\n+ @Description   Exit Deep Sleep Auto Response mode.\n+\t\tThis function reverse the AR mode and put the ports back into\n+\t\ttheir original wake mode\n+\n+ @Param[in]\th_FmPortRx - FM PORT Rx module descriptor\n+ @Param[in]\th_FmPortTx - FM PORT Tx module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_EnterDsar().\n+*/\n+void FM_PORT_ExitDsar(t_Handle h_FmPortRx, t_Handle h_FmPortTx);\n+\n+/**\n+ @Function\tFM_PORT_IsInDsar\n+\n+ @Description   This function returns TRUE if the port was set as Auto Response\n+\t\tand FALSE if not. Once Exit AR mode it will return FALSE as well\n+\t\tuntil re-enabled once more.\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+bool FM_PORT_IsInDsar(t_Handle h_FmPort);\n+\n+typedef struct t_FmPortDsarStats {\n+\tuint32_t arpArCnt;\n+\tuint32_t echoIcmpv4ArCnt;\n+\tuint32_t ndpArCnt;\n+\tuint32_t echoIcmpv6ArCnt;\n+\tuint32_t snmpGetCnt;\n+\tuint32_t snmpGetNextCnt;\n+} t_FmPortDsarStats;\n+\n+/**\n+ @Function\tFM_PORT_GetDsarStats\n+\n+ @Description   Return statistics for Deep Sleep Auto Response\n+\n+ @Param[in]\th_FmPortRx - FM PORT module descriptor\n+ @Param[out]\tstats - structure containing the statistics counters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+*/\n+uint32_t FM_PORT_GetDsarStats(t_Handle h_FmPortRx,\n+\t\t\t\t\tt_FmPortDsarStats *stats);\n+\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+/**\n+ @Function\tFM_PORT_DumpRegs\n+\n+ @Description   Dump all regs.\n+\n+\t\tCalling this routine invalidates the descriptor.\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_DumpRegs(t_Handle h_FmPort);\n+#endif /* (defined(DEBUG_ERRORS) && ... */\n+\n+/**\n+ @Function\tFM_PORT_GetBufferDataOffset\n+\n+ @Description   Relevant for Rx ports.\n+\t\tReturns the data offset from the beginning of the data buffer\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+\n+ @Return\tdata offset.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_GetBufferDataOffset(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_GetBufferICInfo\n+\n+ @Description   Returns the Internal Context offset from the beginning of the data buffer\n+\n+ @Param[in]\th_FmPort - FM PORT module descriptor\n+ @Param[in]\tp_Data   - A pointer to the data buffer.\n+\n+ @Return\tInternal context info pointer on success, NULL if 'allOtherInfo' was not\n+\t\tconfigured for this port.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint8_t *FM_PORT_GetBufferICInfo(t_Handle h_FmPort, char *p_Data);\n+\n+/**\n+ @Function\tFM_PORT_GetBufferPrsResult\n+\n+ @Description   Returns the pointer to the parse result in the data buffer.\n+\t\tIn Rx ports this is relevant after reception, if parse\n+\t\tresult is configured to be part of the data passed to the\n+\t\tapplication. For non Rx ports it may be used to get the pointer\n+\t\tof the area in the buffer where parse result should be\n+\t\tinitialized - if so configured.\n+\t\tSee FM_PORT_ConfigBufferPrefixContent for data buffer prefix\n+\t\tconfiguration.\n+\n+ @Param[in]\th_FmPort\t- FM PORT module descriptor\n+ @Param[in]\tp_Data\t- A pointer to the data buffer.\n+\n+ @Return\tParse result pointer on success, NULL if parse result was not\n+\t\tconfigured for this port.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+t_FmPrsResult *FM_PORT_GetBufferPrsResult(t_Handle h_FmPort,\n+\t\t\t\t\t\tchar *p_Data);\n+\n+/**\n+ @Function\tFM_PORT_GetBufferTimeStamp\n+\n+ @Description   Returns the time stamp in the data buffer.\n+\t\tRelevant for Rx ports for getting the buffer time stamp.\n+\t\tSee FM_PORT_ConfigBufferPrefixContent for data buffer prefix\n+\t\tconfiguration.\n+\n+ @Param[in]\th_FmPort\t- FM PORT module descriptor\n+ @Param[in]\tp_Data\t- A pointer to the data buffer.\n+\n+ @Return\tA pointer to the hash result on success, NULL otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint64_t *FM_PORT_GetBufferTimeStamp(t_Handle h_FmPort, char *p_Data);\n+\n+/**\n+ @Function\tFM_PORT_GetBufferHashResult\n+\n+ @Description   Given a data buffer, on the condition that hash result was defined\n+\t\tas a part of the buffer content(see FM_PORT_ConfigBufferPrefixContent)\n+\t\tthis routine will return the pointer to the hash result location in the\n+\t\tbuffer prefix.\n+\n+ @Param[in]\th_FmPort\t- FM PORT module descriptor\n+ @Param[in]\tp_Data\t- A pointer to the data buffer.\n+\n+ @Return\tA pointer to the hash result on success, NULL otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint8_t *FM_PORT_GetBufferHashResult(t_Handle h_FmPort, char *p_Data);\n+\n+/**\n+ @Function\tFM_PORT_Disable\n+\n+ @Description   Gracefully disable an FM port. The port will not start new tasks after all\n+\t\ttasks associated with the port are terminated.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tThis is a blocking routine, it returns after port is\n+\t\tgracefully stopped, i.e. the port will not except new frames,\n+\t\tbut it will finish all frames or tasks which were already began\n+*/\n+uint32_t FM_PORT_Disable(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_Enable\n+\n+ @Description   A runtime routine provided to allow disable/enable of port.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_Enable(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_SetRateLimit\n+\n+ @Description   Calling this routine enables rate limit algorithm.\n+\t\tBy default, this functionality is disabled.\n+\n+\t\tNote that rate - limit mechanism uses the FM time stamp.\n+\t\tThe selected rate limit specified here would be\n+\t\trounded DOWN to the nearest 16M.\n+\n+\t\tMay be used for Tx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_RateLimit\tA structure of rate limit parameters\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tIf rate limit is set on a port that need to send PFC frames,\n+\t\tit might violate the stop transmit timing.\n+*/\n+uint32_t FM_PORT_SetRateLimit(t_Handle h_FmPort,\n+\t\t\t\tt_FmPortRateLimit *p_RateLimit);\n+\n+/**\n+ @Function\tFM_PORT_DeleteRateLimit\n+\n+ @Description   Calling this routine disables and clears rate limit\n+\t\tinitialization.\n+\n+\t\tMay be used for Tx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_DeleteRateLimit(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_SetPfcPrioritiesMappingToQmanWQ\n+\n+ @Description   Calling this routine maps each PFC received priority to the transmit WQ.\n+\t\tThis WQ will be blocked upon receiving a PFC frame with this priority.\n+\n+\t\tMay be used for Tx ports only.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tprio\t\tPFC priority (0 - 7).\n+ @Param[in]\twq\t\tWork Queue (0 - 7).\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetPfcPrioritiesMappingToQmanWQ(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint8_t prio, uint8_t wq);\n+\n+/**\n+ @Function\tFM_PORT_SetStatisticsCounters\n+\n+ @Description   Calling this routine enables/disables port's statistics counters.\n+\t\tBy default, counters are enabled.\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetStatisticsCounters(t_Handle h_FmPort, bool enable);\n+\n+/**\n+ @Function\tFM_PORT_SetFrameQueueCounters\n+\n+ @Description   Calling this routine enables/disables port's enqueue/dequeue counters.\n+\t\tBy default, counters are enabled.\n+\n+\t\tMay be used for all ports\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetFrameQueueCounters(t_Handle h_FmPort,\n+\t\t\t\t\t\tbool enable);\n+\n+/**\n+ @Function\tFM_PORT_AnalyzePerformanceParams\n+\n+ @Description   User may call this routine to so the driver will analyze if the\n+\t\tbasic performance parameters are correct and also the driver may\n+\t\tsuggest of improvements; The basic parameters are FIFO sizes, number\n+\t\tof DMAs and number of TNUMs for the port.\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_AnalyzePerformanceParams(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_SetAllocBufCounter\n+\n+ @Description   Calling this routine enables/disables BM pool allocate\n+\t\tbuffer counters.\n+\t\tBy default, counters are enabled.\n+\n+\t\tMay be used for Rx ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tpoolId\tBM pool id.\n+ @Param[in]\tenable\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetAllocBufCounter(t_Handle h_FmPort,\n+\t\t\t\t\t\tuint8_t poolId, bool enable);\n+\n+/**\n+ @Function\tFM_PORT_GetBmiCounters\n+\n+ @Description   Read port's BMI stat counters and place them into\n+\t\ta designated structure of counters.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[out]\tp_BmiStats  counters structure\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_GetBmiCounters(t_Handle h_FmPort,\n+\t\t\t\t\tt_FmPortBmiStats *p_BmiStats);\n+\n+/**\n+ @Function\tFM_PORT_GetCounter\n+\n+ @Description   Reads one of the FM PORT counters.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tfmPortCounter\tThe requested counter.\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tNote that it is user's responsibility to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+uint32_t FM_PORT_GetCounter(t_Handle h_FmPort,\n+\t\te_FmPortCounters fmPortCounter);\n+\n+/**\n+ @Function\tFM_PORT_ModifyCounter\n+\n+ @Description   Sets a value to an enabled counter. Use \"0\" to reset the counter.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tfmPortCounter\tThe requested counter.\n+ @Param[in]\tvalue\t\tThe requested value to be written into the counter.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ModifyCounter(t_Handle h_FmPort,\n+\t\te_FmPortCounters fmPortCounter, uint32_t value);\n+\n+/**\n+ @Function\tFM_PORT_GetAllocBufCounter\n+\n+ @Description   Reads one of the FM PORT buffer counters.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tpoolId\t\tThe requested pool.\n+\n+ @Return\tCounter's current value.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tNote that it is user's responsibility to call this routine only\n+\t\tfor enabled counters, and there will be no indication if a\n+\t\tdisabled counter is accessed.\n+*/\n+uint32_t FM_PORT_GetAllocBufCounter(t_Handle h_FmPort,\n+\t\t\tuint8_t poolId);\n+\n+/**\n+ @Function\tFM_PORT_ModifyAllocBufCounter\n+\n+ @Description   Sets a value to an enabled counter. Use \"0\" to reset the counter.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tpoolId\t\tThe requested pool.\n+ @Param[in]\tvalue\t\tThe requested value to be written into the counter.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ModifyAllocBufCounter(t_Handle h_FmPort,\n+\t\t\tuint8_t poolId, uint32_t value);\n+\n+/**\n+ @Function\tFM_PORT_AddCongestionGrps\n+\n+ @Description   This routine effects the corresponding Tx port.\n+\t\tIt should be called in order to enable pause\n+\t\tframe transmission in case of congestion in one or more\n+\t\tof the congestion groups relevant to this port.\n+\t\tEach call to this routine may add one or more congestion\n+\t\tgroups to be considered relevant to this port.\n+\n+\t\tMay be used for Rx, or RX + OP ports only (depending on chip)\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_CongestionGrps\tA pointer to an array of congestion groups\n+\t\t\t\tid's to consider.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_AddCongestionGrps(t_Handle h_FmPort,\n+\t\t\tt_FmPortCongestionGrps *p_CongestionGrps);\n+\n+/**\n+ @Function\tFM_PORT_RemoveCongestionGrps\n+\n+ @Description   This routine effects the corresponding Tx port. It should be\n+\t\tcalled when congestion groups were\n+\t\tdefined for this port and are no longer relevant, or pause\n+\t\tframes transmitting is not required on their behalf.\n+\t\tEach call to this routine may remove one or more congestion\n+\t\tgroups to be considered relevant to this port.\n+\n+\t\tMay be used for Rx, or RX + OP ports only (depending on chip)\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_CongestionGrps\tA pointer to an array of congestion groups\n+\t\t\t\tid's to consider.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_RemoveCongestionGrps(t_Handle h_FmPort,\n+\t\t\tt_FmPortCongestionGrps *p_CongestionGrps);\n+\n+/**\n+ @Function\tFM_PORT_IsStalled\n+\n+ @Description   A routine for checking whether the specified port is stalled.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+\n+ @Return\tTRUE if port is stalled, FALSE otherwize\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+bool FM_PORT_IsStalled(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_ReleaseStalled\n+\n+ @Description   This routine may be called in case the port was stalled and may\n+\t\tnow be released.\n+\t\tNote that this routine is available only on older FMan revisions\n+\t\t(FMan v2, DPAA v1.0 only).\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_ReleaseStalled(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_SetRxL4ChecksumVerify\n+\n+ @Description   This routine is relevant for Rx ports (1G and 10G). The routine\n+\t\tset / clear the L3 / L4 checksum verification (on RX side).\n+\t\tNote that this takes affect only if hw - parser is enabled !\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tl4Checksum\tboolean indicates whether to do L3/L4 checksum\n+\t\t\t\ton frames or not.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetRxL4ChecksumVerify(t_Handle h_FmPort,\n+\t\t\tbool l4Checksum);\n+\n+/**\n+ @Function\tFM_PORT_SetErrorsRoute\n+\n+ @Description   Errors selected for this routine will cause a frame with that error\n+\t\tto be enqueued to error queue.\n+\t\tErrors not selected for this routine will cause a frame with that error\n+\t\tto be enqueued to the one of the other port queues.\n+\t\tBy default all errors are defined to be enqueued to error queue.\n+\t\tErrors that were configured to be discarded(at initialization)\n+\t\tmay not be selected here.\n+\n+\t\tMay be used for Rx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\terrs\tA list of errors to enqueue to error queue\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Config() and before FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetErrorsRoute(t_Handle h_FmPort,\n+\t\t\t\tfmPortFrameErrSelect_t errs);\n+\n+/**\n+ @Function\tFM_PORT_SetIMExceptions\n+\n+ @Description   Calling this routine enables/disables FM PORT interrupts.\n+\n+ @Param[in]\th_FmPort\tFM PORT module descriptor.\n+ @Param[in]\texception\tThe exception to be selected.\n+ @Param[in]\tenable\tTRUE to enable interrupt, FALSE to mask it.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tThis routine should NOT be called from guest-partition\n+\t\t(i.e. guestId != NCSW_MASTER_ID)\n+*/\n+uint32_t FM_PORT_SetIMExceptions(t_Handle h_FmPort,\n+\t\t\t\te_FmPortExceptions exception, bool enable);\n+\n+/*\n+ @Function\tFM_PORT_SetPerformanceCounters\n+\n+ @Description   Calling this routine enables/disables port's performance counters.\n+\t\tBy default, counters are enabled.\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tenable\t\tTRUE to enable, FALSE to disable.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetPerformanceCounters(t_Handle h_FmPort,\n+\t\t\t\t\t\tbool enable);\n+\n+/*\n+ @Function\tFM_PORT_SetPerformanceCountersParams\n+\n+ @Description   Calling this routine defines port's performance\n+\t\tcounters parameters.\n+\n+\t\tMay be used for all port types\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_FmPortPerformanceCnt  A pointer to a structure of performance\n+\t\t\t\tcounters parameters.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetPerformanceCountersParams(t_Handle h_FmPort,\n+\t\t\tt_FmPortPerformanceCnt *p_FmPortPerformanceCnt);\n+\n+/**\n+ @Group\tFM_PORT_pcd_runtime_control_grp FM Port PCD Runtime Control Unit\n+\n+ @Description   FM Port PCD Runtime control unit API functions, definitions and enums.\n+\n+ @Function\tFM_PORT_SetPCD\n+\n+ @Description   Calling this routine defines the port's PCD configuration.\n+\t\tIt changes it from its default configuration which is PCD\n+\t\tdisabled (BMI to BMI) and configures it according to the passed\n+\t\tparameters.\n+\n+\t\tMay be used for Rx and OP ports only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_FmPortPcd\tA Structure of parameters defining the port's PCD\n+\t\t\t\tconfiguration.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_SetPCD(t_Handle h_FmPort,\n+\t\t\tioc_fm_port_pcd_params_t *p_FmPortPcd);\n+\n+/**\n+ @Function\tFM_PORT_DeletePCD\n+\n+ @Description   Calling this routine releases the port's PCD configuration.\n+\t\tThe port returns to its default configuration which is PCD\n+\t\tdisabled (BMI to BMI) and all PCD configuration is removed.\n+\n+\t\tMay be used for Rx and OP ports which are\n+\t\tin PCD mode  only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_DeletePCD(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_AttachPCD\n+\n+ @Description   This routine may be called after FM_PORT_DetachPCD was called,\n+\t\tto return to the originally configured PCD support flow.\n+\t\tThe couple of routines are used to allow PCD configuration changes\n+\t\tthat demand that PCD will not be used while changes take place.\n+\n+\t\tMay be used for Rx and OP ports which are\n+\t\tin PCD mode only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+*/\n+uint32_t FM_PORT_AttachPCD(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_DetachPCD\n+\n+ @Description   Calling this routine detaches the port from its PCD functionality.\n+\t\tThe port returns to its default flow which is BMI to BMI.\n+\n+\t\tMay be used for Rx and OP ports which are\n+\t\tin PCD mode only\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_AttachPCD().\n+*/\n+uint32_t FM_PORT_DetachPCD(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrAllocProfiles\n+\n+ @Description   This routine may be called only for ports that use the Policer in\n+\t\torder to allocate private policer profiles.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tnumOfProfiles\tThe number of required policer profiles\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PCD_Init(),\n+\t\tand before FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdPlcrAllocProfiles(t_Handle h_FmPort,\n+\t\t\tuint16_t numOfProfiles);\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrFreeProfiles\n+\n+ @Description   This routine should be called for freeing private policer profiles.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PCD_Init(),\n+\t\tand before FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdPlcrFreeProfiles(t_Handle h_FmPort);\n+\n+/**\n+ @Function\tFM_PORT_PcdKgModifyInitialScheme\n+\n+ @Description   This routine may be called only for ports that use the keygen in\n+\t\torder to change the initial scheme frame should be routed to.\n+\t\tThe change may be of a scheme id(in case of direct mode),\n+\t\tfrom direct to indirect, or from indirect to direct - specifying the scheme id.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\tp_FmPcdKgScheme\tA structure of parameters for defining whether\n+\t\t\t\ta scheme is direct / indirect, and if direct - scheme id.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdKgModifyInitialScheme(t_Handle h_FmPort,\n+\t\tioc_fm_pcd_kg_scheme_select_t *p_FmPcdKgScheme);\n+\n+/**\n+ @Function\tFM_PORT_PcdPlcrModifyInitialProfile\n+\n+ @Description   This routine may be called for ports with flows\n+\t\te_FM_PORT_PCD_SUPPORT_PLCR_ONLY or e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR\n+\t\tonly, to change the initial Policer profile frame should be\n+\t\trouted to. The change may be of a profile and / or absolute / direct\n+\t\tmode selection.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\th_Profile\t\tPolicer profile handle\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdPlcrModifyInitialProfile(t_Handle h_FmPort,\n+\t\t\t\t\t\tt_Handle h_Profile);\n+\n+/**\n+ @Function\tFM_PORT_PcdCcModifyTree\n+\n+ @Description   This routine may be called for ports that use coarse classification tree\n+if the user wishes to replace the tree. The routine may not be called while port\n+receives packets using the PCD functionalities, therefor port must be first detached\n+from the PCD, only than the routine may be called, and than port be attached to PCD again.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[in]\th_CcTree\t\tA CC tree that was already built. The tree id as returned from\n+\t\t\t\tthe BuildTree routine.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init(), FM_PORT_SetPCD() and FM_PORT_DetachPCD()\n+*/\n+uint32_t FM_PORT_PcdCcModifyTree(t_Handle h_FmPort, t_Handle h_CcTree);\n+\n+/**\n+ @Function\tFM_PORT_PcdKgBindSchemes\n+\n+ @Description   These routines may be called for adding more schemes for the\n+\t\tport to be bound to. The selected schemes are not added,\n+\t\tjust this specific port starts using them.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_PortScheme\tA structure defining the list of schemes to be added.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdKgBindSchemes(t_Handle h_FmPort,\n+\t\t\tioc_fm_pcd_port_schemes_params_t *p_PortScheme);\n+\n+/**\n+ @Function\tFM_PORT_PcdKgUnbindSchemes\n+\n+ @Description   These routines may be called for adding more schemes for the\n+\t\tport to be bound to. The selected schemes are not removed or invalidated,\n+\t\tjust this specific port stops using them.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_PortScheme\tA structure defining the list of schemes to be added.\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init() and FM_PORT_SetPCD().\n+*/\n+uint32_t FM_PORT_PcdKgUnbindSchemes(t_Handle h_FmPort,\n+\t\t\tioc_fm_pcd_port_schemes_params_t *p_PortScheme);\n+\n+/**\n+ @Function\tFM_PORT_GetIPv4OptionsCount\n+\n+ @Description   TODO\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+ @Param[out]\tp_Ipv4OptionsCount  will hold the counter value\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init()\n+*/\n+uint32_t FM_PORT_GetIPv4OptionsCount(t_Handle h_FmPort,\n+\t\t\t\tuint32_t *p_Ipv4OptionsCount);\n+\n+/** @} */ /* end of FM_PORT_pcd_runtime_control_grp group */\n+/** @} */ /* end of FM_PORT_runtime_control_grp group */\n+\n+/**\n+ @Group\tFM_PORT_runtime_data_grp FM Port Runtime Data-path Unit\n+\n+ @Description   FM Port Runtime data unit API functions, definitions and enums.\n+\t\tThis API is valid only if working in Independent-Mode.\n+\n+ @{\n+*/\n+\n+/**\n+ @Function\tFM_PORT_ImTx\n+\n+ @Description   Tx function, called to transmit a data buffer on the port.\n+\n+ @Param[in]\th_FmPort\tA handle to a FM Port module.\n+ @Param[in]\tp_Data\tA pointer to an LCP data buffer.\n+ @Param[in]\tlength\tSize of data for transmission.\n+ @Param[in]\tlastBuffer  Buffer position - TRUE for the last buffer\n+\t\t\t\tof a frame, including a single buffer frame\n+ @Param[in]\th_BufContext  A handle of the user acossiated with this buffer\n+\n+ @Return\tE_OK on success; Error code otherwise.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tNOTE - This routine can be used only when working in\n+\t\tIndependent-Mode mode.\n+*/\n+uint32_t  FM_PORT_ImTx(t_Handle\t\th_FmPort,\n+\t\t\tuint8_t\t\t*p_Data,\n+\t\t\tuint16_t\t\tlength,\n+\t\t\tbool\t\tlastBuffer,\n+\t\t\tt_Handle\t\th_BufContext);\n+\n+/**\n+ @Function\tFM_PORT_ImTxConf\n+\n+ @Description   Tx port confirmation routine, optional, may be called to verify\n+\t\ttransmission of all frames. The procedure performed by this\n+\t\troutine will be performed automatically on next buffer transmission,\n+\t\tbut if desired, calling this routine will invoke this action on\n+\t\tdemand.\n+\n+ @Param[in]\th_FmPort\t\tA handle to a FM Port module.\n+\n+ @Cautions\tAllowed only following FM_PORT_Init().\n+\t\tNOTE - This routine can be used only when working in\n+\t\tIndependent-Mode mode.\n+*/\n+void FM_PORT_ImTxConf(t_Handle h_FmPort);\n+\n+uint32_t  FM_PORT_ImRx(t_Handle h_FmPort);\n+\n+/** @} */ /* end of FM_PORT_runtime_data_grp group */\n+/** @} */ /* end of FM_PORT_grp group */\n+/** @} */ /* end of FM_grp group */\n+#endif /* __FM_PORT_EXT_H */\ndiff --git a/drivers/net/dpaa/fmlib/ncsw_ext.h b/drivers/net/dpaa/fmlib/ncsw_ext.h\nnew file mode 100644\nindex 000000000..319107c53\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/ncsw_ext.h\n@@ -0,0 +1,153 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2020 NXP\n+ */\n+\n+#ifndef __NCSW_EXT_H\n+#define __NCSW_EXT_H\n+\n+#include <stdint.h>\n+\n+#define PTR_TO_UINT(_ptr)\t((uintptr_t)(_ptr))\n+#define UINT_TO_PTR(_val)\t((void *)(uintptr_t)(_val))\n+\n+/* physAddress_t should be uintptr_t */\n+typedef uint64_t physAddress_t;\n+\n+/**\n+ @Description   Possible RxStore callback responses.\n+*/\n+typedef enum e_RxStoreResponse {\n+\te_RX_STORE_RESPONSE_PAUSE\n+\t\t/**< Pause invoking callback with received data;\n+\t\tin polling mode, start again invoking callback\n+\t\tonly next time user invokes the receive routine;\n+\t\tin interrupt mode, start again invoking callback\n+\t\tonly next time a receive event triggers an interrupt;\n+\t\tin all cases, received data that are pending are not\n+\t\tlost, rather, their processing is temporarily deferred;\n+\t\tin all cases, received data are processed in the order\n+\t\tin which they were received. */\n+\t, e_RX_STORE_RESPONSE_CONTINUE\n+\t/**< Continue invoking callback with received data. */\n+} e_RxStoreResponse;\n+\n+\n+/**\n+ @Description   General Handle\n+*/\n+typedef void *t_Handle;   /**< handle, used as object's descriptor */\n+\n+/* @} */\n+\n+/**\n+ @Function\tt_GetBufFunction\n+\n+ @Description   User callback function called by driver to get data buffer.\n+\n+\t\tUser provides this function. Driver invokes it.\n+\n+ @Param[in]\th_BufferPool\t- A handle to buffer pool manager\n+ @Param[out]\tp_BufContextHandle  - Returns the user's private context that\n+\t\t\t\tshould be associated with the buffer\n+\n+ @Return\tPointer to data buffer, NULL if error\n+ */\n+typedef uint8_t * (t_GetBufFunction)(t_Handle   h_BufferPool,\n+\t\t\t\t\tt_Handle *p_BufContextHandle);\n+\n+/**\n+ @Function\tt_PutBufFunction\n+\n+ @Description   User callback function called by driver to return data buffer.\n+\n+\t\tUser provides this function. Driver invokes it.\n+\n+ @Param[in]\th_BufferPool\t- A handle to buffer pool manager\n+ @Param[in]\tp_Buffer\t- A pointer to buffer to return\n+ @Param[in]\th_BufContext\t- The user's private context associated with\n+\t\t\t\tthe returned buffer\n+\n+ @Return\tE_OK on success; Error code otherwise\n+ */\n+typedef uint32_t (t_PutBufFunction)(t_Handle h_BufferPool,\n+\t\t\t\tuint8_t  *p_Buffer,\n+\t\t\t\tt_Handle h_BufContext);\n+\n+/**\n+ @Function\tt_PhysToVirt\n+\n+ @Description   Translates a physical address to the matching virtual address.\n+\n+ @Param[in]\taddr - The physical address to translate.\n+\n+ @Return\tVirtual address.\n+*/\n+typedef void *t_PhysToVirt(physAddress_t addr);\n+\n+/**\n+ @Function\tt_VirtToPhys\n+\n+ @Description   Translates a virtual address to the matching physical address.\n+\n+ @Param[in]\taddr - The virtual address to translate.\n+\n+ @Return\tPhysical address.\n+*/\n+typedef physAddress_t t_VirtToPhys(void *addr);\n+\n+/**\n+ @Description   Buffer Pool Information Structure.\n+*/\n+typedef struct t_BufferPoolInfo {\n+\tt_Handle\t\th_BufferPool; /**< A handle to the buffer pool mgr */\n+\tt_GetBufFunction\t*f_GetBuf; /**< User callback to get a free buffer */\n+\tt_PutBufFunction\t*f_PutBuf; /**< User callback to return a buffer */\n+\tuint16_t\t\tbufferSize; /**< Buffer size (in bytes) */\n+\n+\tt_PhysToVirt\t*f_PhysToVirt;  /**< User callback to translate pool buffers\n+\t\t\t\t\tphysical addresses to virtual addresses  */\n+\tt_VirtToPhys\t*f_VirtToPhys;  /**< User callback to translate pool buffers\n+\t\t\t\t\tvirtual addresses to physical addresses */\n+} t_BufferPoolInfo;\n+\n+/**\n+ @Description   User callback function called by driver with receive data.\n+\n+\t\tUser provides this function. Driver invokes it.\n+\n+ @Param[in]\th_App\t- Application's handle, as was provided to the\n+\t\t\t\tdriver by the user\n+ @Param[in]\tqueueId\t- Receive queue ID\n+ @Param[in]\tp_Data\t- Pointer to the buffer with received data\n+ @Param[in]\th_BufContext\t- The user's private context associated with\n+\t\t\t\tthe given data buffer\n+ @Param[in]\tlength\t- Length of received data\n+ @Param[in]\tstatus\t- Receive status and errors\n+ @Param[in]\tposition\t- Position of buffer in frame\n+ @Param[in]\tflags\t- Driver-dependent information\n+\n+ @Retval\te_RX_STORE_RESPONSE_CONTINUE - order the driver to continue Rx\n+\t\t\t\t\t\toperation for all ready data.\n+ @Retval\te_RX_STORE_RESPONSE_PAUSE- order the driver to stop Rx ops.\n+ */\n+typedef e_RxStoreResponse(t_RxStoreFunction)(t_Handle  h_App,\n+\t\t\t\t\t\tuint32_t  queueId,\n+\t\t\t\t\t\tuint8_t   *p_Data,\n+\t\t\t\t\t\tt_Handle  h_BufContext,\n+\t\t\t\t\t\tuint32_t  length,\n+\t\t\t\t\t\tuint16_t  status,\n+\t\t\t\t\t\tuint8_t   position,\n+\t\t\t\t\t\tuint32_t  flags);\n+\n+typedef struct t_Device {\n+\tuintptr_t   id;\t/**< the device id */\n+\tint\tfd;\t/**< the device file descriptor */\n+\tt_Handle\th_UserPriv;\n+\tuint32_t\towners;\n+} t_Device;\n+\n+t_Handle CreateDevice(t_Handle h_UserPriv, t_Handle h_DevId);\n+t_Handle GetDeviceId(t_Handle h_Dev);\n+\n+#endif /* __NCSW_EXT_H */\ndiff --git a/drivers/net/dpaa/fmlib/net_ext.h b/drivers/net/dpaa/fmlib/net_ext.h\nnew file mode 100644\nindex 000000000..00e6cecef\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/net_ext.h\n@@ -0,0 +1,383 @@\n+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n+ * Copyright 2008-2012 Freescale Semiconductor Inc.\n+ * Copyright 2017-2019 NXP\n+ */\n+\n+#ifndef __NET_EXT_H\n+#define __NET_EXT_H\n+\n+#include \"ncsw_ext.h\"\n+\n+/**\n+ @Description   This file contains common and general netcomm headers definitions.\n+*/\n+\n+typedef uint8_t ioc_header_field_ppp_t;\n+\n+#define IOC_NET_HF_PPP_PID\t\t(1)\n+#define IOC_NET_HF_PPP_COMPRESSED\t(IOC_NET_HF_PPP_PID << 1)\n+#define IOC_NET_HF_PPP_ALL_FIELDS\t((IOC_NET_HF_PPP_PID << 2) - 1)\n+\n+typedef uint8_t ioc_header_field_pppoe_t;\n+\n+#define IOC_NET_HF_PPPoE_VER\t\t(1)\n+#define IOC_NET_HF_PPPoE_TYPE\t\t(IOC_NET_HF_PPPoE_VER << 1)\n+#define IOC_NET_HF_PPPoE_CODE\t\t(IOC_NET_HF_PPPoE_VER << 2)\n+#define IOC_NET_HF_PPPoE_SID\t\t(IOC_NET_HF_PPPoE_VER << 3)\n+#define IOC_NET_HF_PPPoE_LEN\t\t(IOC_NET_HF_PPPoE_VER << 4)\n+#define IOC_NET_HF_PPPoE_SESSION\t(IOC_NET_HF_PPPoE_VER << 5)\n+#define IOC_NET_HF_PPPoE_PID\t\t(IOC_NET_HF_PPPoE_VER << 6)\n+#define IOC_NET_HF_PPPoE_ALL_FIELDS\t((IOC_NET_HF_PPPoE_VER << 7) - 1)\n+\n+#define IOC_NET_HF_PPPMUX_PID\t\t(1)\n+#define IOC_NET_HF_PPPMUX_CKSUM\t\t(IOC_NET_HF_PPPMUX_PID << 1)\n+#define IOC_NET_HF_PPPMUX_COMPRESSED\t(IOC_NET_HF_PPPMUX_PID << 2)\n+#define IOC_NET_HF_PPPMUX_ALL_FIELDS\t((IOC_NET_HF_PPPMUX_PID << 3) - 1)\n+\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_PFF\t(1)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_LXT\t(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 1)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_LEN\t(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 2)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_PID\t(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 3)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_USE_PID\t(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 4)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_ALL_FIELDS\t((IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 5) - 1)\n+\n+typedef uint8_t ioc_header_field_eth_t;\n+\n+#define IOC_NET_HF_ETH_DA\t\t(1)\n+#define IOC_NET_HF_ETH_SA\t\t(IOC_NET_HF_ETH_DA << 1)\n+#define IOC_NET_HF_ETH_LENGTH\t\t(IOC_NET_HF_ETH_DA << 2)\n+#define IOC_NET_HF_ETH_TYPE\t\t(IOC_NET_HF_ETH_DA << 3)\n+#define IOC_NET_HF_ETH_FINAL_CKSUM\t(IOC_NET_HF_ETH_DA << 4)\n+#define IOC_NET_HF_ETH_PADDING\t\t(IOC_NET_HF_ETH_DA << 5)\n+#define IOC_NET_HF_ETH_ALL_FIELDS\t((IOC_NET_HF_ETH_DA << 6) - 1)\n+\n+#define IOC_NET_HF_ETH_ADDR_SIZE\t6\n+\n+typedef uint16_t ioc_header_field_ip_t;\n+\n+#define IOC_NET_HF_IP_VER\t\t(1)\n+#define IOC_NET_HF_IP_DSCP\t\t(IOC_NET_HF_IP_VER << 2)\n+#define IOC_NET_HF_IP_ECN\t\t(IOC_NET_HF_IP_VER << 3)\n+#define IOC_NET_HF_IP_PROTO\t\t(IOC_NET_HF_IP_VER << 4)\n+\n+#define IOC_NET_HF_IP_PROTO_SIZE\t1\n+\n+typedef uint16_t ioc_header_field_ipv4_t;\n+\n+#define IOC_NET_HF_IPv4_VER\t\t(1)\n+#define IOC_NET_HF_IPv4_HDR_LEN\t\t(IOC_NET_HF_IPv4_VER << 1)\n+#define IOC_NET_HF_IPv4_TOS\t\t(IOC_NET_HF_IPv4_VER << 2)\n+#define IOC_NET_HF_IPv4_TOTAL_LEN\t(IOC_NET_HF_IPv4_VER << 3)\n+#define IOC_NET_HF_IPv4_ID\t\t(IOC_NET_HF_IPv4_VER << 4)\n+#define IOC_NET_HF_IPv4_FLAG_D\t\t(IOC_NET_HF_IPv4_VER << 5)\n+#define IOC_NET_HF_IPv4_FLAG_M\t\t(IOC_NET_HF_IPv4_VER << 6)\n+#define IOC_NET_HF_IPv4_OFFSET\t\t(IOC_NET_HF_IPv4_VER << 7)\n+#define IOC_NET_HF_IPv4_TTL\t\t(IOC_NET_HF_IPv4_VER << 8)\n+#define IOC_NET_HF_IPv4_PROTO\t\t(IOC_NET_HF_IPv4_VER << 9)\n+#define IOC_NET_HF_IPv4_CKSUM\t\t(IOC_NET_HF_IPv4_VER << 10)\n+#define IOC_NET_HF_IPv4_SRC_IP\t\t(IOC_NET_HF_IPv4_VER << 11)\n+#define IOC_NET_HF_IPv4_DST_IP\t\t(IOC_NET_HF_IPv4_VER << 12)\n+#define IOC_NET_HF_IPv4_OPTS\t\t(IOC_NET_HF_IPv4_VER << 13)\n+#define IOC_NET_HF_IPv4_OPTS_COUNT\t(IOC_NET_HF_IPv4_VER << 14)\n+#define IOC_NET_HF_IPv4_ALL_FIELDS\t((IOC_NET_HF_IPv4_VER << 15) - 1)\n+\n+#define IOC_NET_HF_IPv4_ADDR_SIZE\t4\n+#define IOC_NET_HF_IPv4_PROTO_SIZE\t1\n+\n+typedef uint8_t ioc_header_field_ipv6_t;\n+\n+#define IOC_NET_HF_IPv6_VER\t\t(1)\n+#define IOC_NET_HF_IPv6_TC\t\t(IOC_NET_HF_IPv6_VER << 1)\n+#define IOC_NET_HF_IPv6_SRC_IP\t\t(IOC_NET_HF_IPv6_VER << 2)\n+#define IOC_NET_HF_IPv6_DST_IP\t\t(IOC_NET_HF_IPv6_VER << 3)\n+#define IOC_NET_HF_IPv6_NEXT_HDR\t(IOC_NET_HF_IPv6_VER << 4)\n+#define IOC_NET_HF_IPv6_FL\t\t(IOC_NET_HF_IPv6_VER << 5)\n+#define IOC_NET_HF_IPv6_HOP_LIMIT\t(IOC_NET_HF_IPv6_VER << 6)\n+#define IOC_NET_HF_IPv6_ALL_FIELDS\t((IOC_NET_HF_IPv6_VER << 7) - 1)\n+\n+#define IOC_NET_HF_IPv6_ADDR_SIZE\t16\n+#define IOC_NET_HF_IPv6_NEXT_HDR_SIZE\t1\n+\n+#define IOC_NET_HF_ICMP_TYPE\t\t(1)\n+#define IOC_NET_HF_ICMP_CODE\t\t(IOC_NET_HF_ICMP_TYPE << 1)\n+#define IOC_NET_HF_ICMP_CKSUM\t\t(IOC_NET_HF_ICMP_TYPE << 2)\n+#define IOC_NET_HF_ICMP_ID\t\t(IOC_NET_HF_ICMP_TYPE << 3)\n+#define IOC_NET_HF_ICMP_SQ_NUM\t\t(IOC_NET_HF_ICMP_TYPE << 4)\n+#define IOC_NET_HF_ICMP_ALL_FIELDS\t((IOC_NET_HF_ICMP_TYPE << 5) - 1)\n+\n+#define IOC_NET_HF_ICMP_CODE_SIZE\t1\n+#define IOC_NET_HF_ICMP_TYPE_SIZE\t1\n+\n+#define IOC_NET_HF_IGMP_VERSION\t\t(1)\n+#define IOC_NET_HF_IGMP_TYPE\t\t(IOC_NET_HF_IGMP_VERSION << 1)\n+#define IOC_NET_HF_IGMP_CKSUM\t\t(IOC_NET_HF_IGMP_VERSION << 2)\n+#define IOC_NET_HF_IGMP_DATA\t\t(IOC_NET_HF_IGMP_VERSION << 3)\n+#define IOC_NET_HF_IGMP_ALL_FIELDS\t((IOC_NET_HF_IGMP_VERSION << 4) - 1)\n+\n+typedef uint16_t ioc_header_field_tcp_t;\n+\n+#define IOC_NET_HF_TCP_PORT_SRC\t\t(1)\n+#define IOC_NET_HF_TCP_PORT_DST\t\t(IOC_NET_HF_TCP_PORT_SRC << 1)\n+#define IOC_NET_HF_TCP_SEQ\t\t(IOC_NET_HF_TCP_PORT_SRC << 2)\n+#define IOC_NET_HF_TCP_ACK\t\t(IOC_NET_HF_TCP_PORT_SRC << 3)\n+#define IOC_NET_HF_TCP_OFFSET\t\t(IOC_NET_HF_TCP_PORT_SRC << 4)\n+#define IOC_NET_HF_TCP_FLAGS\t\t(IOC_NET_HF_TCP_PORT_SRC << 5)\n+#define IOC_NET_HF_TCP_WINDOW\t\t(IOC_NET_HF_TCP_PORT_SRC << 6)\n+#define IOC_NET_HF_TCP_CKSUM\t\t(IOC_NET_HF_TCP_PORT_SRC << 7)\n+#define IOC_NET_HF_TCP_URGPTR\t\t(IOC_NET_HF_TCP_PORT_SRC << 8)\n+#define IOC_NET_HF_TCP_OPTS\t\t(IOC_NET_HF_TCP_PORT_SRC << 9)\n+#define IOC_NET_HF_TCP_OPTS_COUNT\t(IOC_NET_HF_TCP_PORT_SRC << 10)\n+#define IOC_NET_HF_TCP_ALL_FIELDS\t((IOC_NET_HF_TCP_PORT_SRC << 11) - 1)\n+\n+#define IOC_NET_HF_TCP_PORT_SIZE\t2\n+\n+typedef uint8_t ioc_header_field_sctp_t;\n+\n+#define IOC_NET_HF_SCTP_PORT_SRC\t(1)\n+#define IOC_NET_HF_SCTP_PORT_DST\t(IOC_NET_HF_SCTP_PORT_SRC << 1)\n+#define IOC_NET_HF_SCTP_VER_TAG\t\t(IOC_NET_HF_SCTP_PORT_SRC << 2)\n+#define IOC_NET_HF_SCTP_CKSUM\t\t(IOC_NET_HF_SCTP_PORT_SRC << 3)\n+#define IOC_NET_HF_SCTP_ALL_FIELDS\t((IOC_NET_HF_SCTP_PORT_SRC << 4) - 1)\n+\n+#define IOC_NET_HF_SCTP_PORT_SIZE\t2\n+\n+typedef uint8_t ioc_header_field_dccp_t;\n+\n+#define IOC_NET_HF_DCCP_PORT_SRC\t(1)\n+#define IOC_NET_HF_DCCP_PORT_DST\t(IOC_NET_HF_DCCP_PORT_SRC << 1)\n+#define IOC_NET_HF_DCCP_ALL_FIELDS\t((IOC_NET_HF_DCCP_PORT_SRC << 2) - 1)\n+\n+#define IOC_NET_HF_DCCP_PORT_SIZE\t2\n+\n+typedef uint8_t ioc_header_field_udp_t;\n+\n+#define IOC_NET_HF_UDP_PORT_SRC\t\t(1)\n+#define IOC_NET_HF_UDP_PORT_DST\t\t(IOC_NET_HF_UDP_PORT_SRC << 1)\n+#define IOC_NET_HF_UDP_LEN\t\t(IOC_NET_HF_UDP_PORT_SRC << 2)\n+#define IOC_NET_HF_UDP_CKSUM\t\t(IOC_NET_HF_UDP_PORT_SRC << 3)\n+#define IOC_NET_HF_UDP_ALL_FIELDS\t((IOC_NET_HF_UDP_PORT_SRC << 4) - 1)\n+\n+#define IOC_NET_HF_UDP_PORT_SIZE\t2\n+\n+typedef uint8_t ioc_header_field_udp_lite_t;\n+\n+#define IOC_NET_HF_UDP_LITE_PORT_SRC\t(1)\n+#define IOC_NET_HF_UDP_LITE_PORT_DST\t(IOC_NET_HF_UDP_LITE_PORT_SRC << 1)\n+#define IOC_NET_HF_UDP_LITE_ALL_FIELDS\t((IOC_NET_HF_UDP_LITE_PORT_SRC << 2) - 1)\n+\n+#define IOC_NET_HF_UDP_LITE_PORT_SIZE\t\t2\n+\n+typedef uint8_t ioc_header_field_udp_encap_esp_t;\n+\n+#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC\t(1)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_DST\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 1)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_LEN\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 2)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_CKSUM\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 3)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_SPI\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 4)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_SEQUENCE_NUM\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 5)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_ALL_FIELDS\t((IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 6) - 1)\n+\n+#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_SIZE\t2\n+#define IOC_NET_HF_UDP_ENCAP_ESP_SPI_SIZE\t4\n+\n+#define IOC_NET_HF_IPHC_CID\t\t(1)\n+#define IOC_NET_HF_IPHC_CID_TYPE\t(IOC_NET_HF_IPHC_CID << 1)\n+#define IOC_NET_HF_IPHC_HCINDEX\t\t(IOC_NET_HF_IPHC_CID << 2)\n+#define IOC_NET_HF_IPHC_GEN\t\t(IOC_NET_HF_IPHC_CID << 3)\n+#define IOC_NET_HF_IPHC_D_BIT\t\t(IOC_NET_HF_IPHC_CID << 4)\n+#define IOC_NET_HF_IPHC_ALL_FIELDS\t((IOC_NET_HF_IPHC_CID << 5) - 1)\n+\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_TYPE\t\t(1)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_FLAGS\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 1)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_LENGTH\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 2)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_TSN\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 3)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_ID\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 4)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_SQN\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 5)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_PAYLOAD_PID\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 6)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_UNORDERED\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 7)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_BEGGINING\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 8)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_END\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 9)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_ALL_FIELDS\t((IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 10) - 1)\n+\n+#define IOC_NET_HF_L2TPv2_TYPE_BIT\t(1)\n+#define IOC_NET_HF_L2TPv2_LENGTH_BIT\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 1)\n+#define IOC_NET_HF_L2TPv2_SEQUENCE_BIT\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 2)\n+#define IOC_NET_HF_L2TPv2_OFFSET_BIT\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 3)\n+#define IOC_NET_HF_L2TPv2_PRIORITY_BIT\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 4)\n+#define IOC_NET_HF_L2TPv2_VERSION\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 5)\n+#define IOC_NET_HF_L2TPv2_LEN\t\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 6)\n+#define IOC_NET_HF_L2TPv2_TUNNEL_ID\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 7)\n+#define IOC_NET_HF_L2TPv2_SESSION_ID\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 8)\n+#define IOC_NET_HF_L2TPv2_NS\t\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 9)\n+#define IOC_NET_HF_L2TPv2_NR\t\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 10)\n+#define IOC_NET_HF_L2TPv2_OFFSET_SIZE\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 11)\n+#define IOC_NET_HF_L2TPv2_FIRST_BYTE\t(IOC_NET_HF_L2TPv2_TYPE_BIT << 12)\n+#define IOC_NET_HF_L2TPv2_ALL_FIELDS\t((IOC_NET_HF_L2TPv2_TYPE_BIT << 13) - 1)\n+\n+#define IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT\t(1)\n+#define IOC_NET_HF_L2TPv3_CTRL_LENGTH_BIT (IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 1)\n+#define IOC_NET_HF_L2TPv3_CTRL_SEQUENCE_BIT (IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 2)\n+#define IOC_NET_HF_L2TPv3_CTRL_VERSION\t(IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 3)\n+#define IOC_NET_HF_L2TPv3_CTRL_LENGTH\t(IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 4)\n+#define IOC_NET_HF_L2TPv3_CTRL_CONTROL\t(IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 5)\n+#define IOC_NET_HF_L2TPv3_CTRL_SENT\t(IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 6)\n+#define IOC_NET_HF_L2TPv3_CTRL_RECV\t(IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 7)\n+#define IOC_NET_HF_L2TPv3_CTRL_FIRST_BYTE (IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 8)\n+#define IOC_NET_HF_L2TPv3_CTRL_ALL_FIELDS ((IOC_NET_HF_L2TPv3_CTRL_TYPE_BIT << 9) - 1)\n+\n+#define IOC_NET_HF_L2TPv3_SESS_TYPE_BIT\t(1)\n+#define IOC_NET_HF_L2TPv3_SESS_VERSION\t(IOC_NET_HF_L2TPv3_SESS_TYPE_BIT << 1)\n+#define IOC_NET_HF_L2TPv3_SESS_ID\t(IOC_NET_HF_L2TPv3_SESS_TYPE_BIT << 2)\n+#define IOC_NET_HF_L2TPv3_SESS_COOKIE\t(IOC_NET_HF_L2TPv3_SESS_TYPE_BIT << 3)\n+#define IOC_NET_HF_L2TPv3_SESS_ALL_FIELDS\t((IOC_NET_HF_L2TPv3_SESS_TYPE_BIT << 4) - 1)\n+\n+typedef uint8_t ioc_header_field_vlan_t;\n+\n+#define IOC_NET_HF_VLAN_VPRI\t\t(1)\n+#define IOC_NET_HF_VLAN_CFI\t\t(IOC_NET_HF_VLAN_VPRI << 1)\n+#define IOC_NET_HF_VLAN_VID\t\t(IOC_NET_HF_VLAN_VPRI << 2)\n+#define IOC_NET_HF_VLAN_LENGTH\t\t(IOC_NET_HF_VLAN_VPRI << 3)\n+#define IOC_NET_HF_VLAN_TYPE\t\t(IOC_NET_HF_VLAN_VPRI << 4)\n+#define IOC_NET_HF_VLAN_ALL_FIELDS\t((IOC_NET_HF_VLAN_VPRI << 5) - 1)\n+\n+#define IOC_NET_HF_VLAN_TCI\t\t(IOC_NET_HF_VLAN_VPRI | \\\n+\t\t\t\tIOC_NET_HF_VLAN_CFI | \\\n+\t\t\t\tIOC_NET_HF_VLAN_VID)\n+\n+typedef uint8_t ioc_header_field_llc_t;\n+\n+#define IOC_NET_HF_LLC_DSAP\t\t(1)\n+#define IOC_NET_HF_LLC_SSAP\t\t(IOC_NET_HF_LLC_DSAP << 1)\n+#define IOC_NET_HF_LLC_CTRL\t\t(IOC_NET_HF_LLC_DSAP << 2)\n+#define IOC_NET_HF_LLC_ALL_FIELDS\t((IOC_NET_HF_LLC_DSAP << 3) - 1)\n+\n+#define IOC_NET_HF_NLPID_NLPID\t(1)\n+#define IOC_NET_HF_NLPID_ALL_FIELDS\t((IOC_NET_HF_NLPID_NLPID << 1) - 1)\n+\n+typedef uint8_t ioc_header_field_snap_t;\n+\n+#define IOC_NET_HF_SNAP_OUI\t\t(1)\n+#define IOC_NET_HF_SNAP_PID\t\t(IOC_NET_HF_SNAP_OUI << 1)\n+#define IOC_NET_HF_SNAP_ALL_FIELDS\t((IOC_NET_HF_SNAP_OUI << 2) - 1)\n+\n+typedef uint8_t ioc_header_field_llc_snap_t;\n+\n+#define IOC_NET_HF_LLC_SNAP_TYPE\t(1)\n+#define IOC_NET_HF_LLC_SNAP_ALL_FIELDS\t((IOC_NET_HF_LLC_SNAP_TYPE << 1) - 1)\n+\n+#define IOC_NET_HF_ARP_HTYPE\t\t(1)\n+#define IOC_NET_HF_ARP_PTYPE\t\t(IOC_NET_HF_ARP_HTYPE << 1)\n+#define IOC_NET_HF_ARP_HLEN\t\t(IOC_NET_HF_ARP_HTYPE << 2)\n+#define IOC_NET_HF_ARP_PLEN\t\t(IOC_NET_HF_ARP_HTYPE << 3)\n+#define IOC_NET_HF_ARP_OPER\t\t(IOC_NET_HF_ARP_HTYPE << 4)\n+#define IOC_NET_HF_ARP_SHA\t\t(IOC_NET_HF_ARP_HTYPE << 5)\n+#define IOC_NET_HF_ARP_SPA\t\t(IOC_NET_HF_ARP_HTYPE << 6)\n+#define IOC_NET_HF_ARP_THA\t\t(IOC_NET_HF_ARP_HTYPE << 7)\n+#define IOC_NET_HF_ARP_TPA\t\t(IOC_NET_HF_ARP_HTYPE << 8)\n+#define IOC_NET_HF_ARP_ALL_FIELDS\t((IOC_NET_HF_ARP_HTYPE << 9) - 1)\n+\n+#define IOC_NET_HF_RFC2684_LLC\t\t(1)\n+#define IOC_NET_HF_RFC2684_NLPID\t(IOC_NET_HF_RFC2684_LLC << 1)\n+#define IOC_NET_HF_RFC2684_OUI\t\t(IOC_NET_HF_RFC2684_LLC << 2)\n+#define IOC_NET_HF_RFC2684_PID\t\t(IOC_NET_HF_RFC2684_LLC << 3)\n+#define IOC_NET_HF_RFC2684_VPN_OUI\t(IOC_NET_HF_RFC2684_LLC << 4)\n+#define IOC_NET_HF_RFC2684_VPN_IDX\t(IOC_NET_HF_RFC2684_LLC << 5)\n+#define IOC_NET_HF_RFC2684_ALL_FIELDS\t((IOC_NET_HF_RFC2684_LLC << 6) - 1)\n+\n+#define IOC_NET_HF_USER_DEFINED_SRCPORT\t(1)\n+#define IOC_NET_HF_USER_DEFINED_PCDID\t(IOC_NET_HF_USER_DEFINED_SRCPORT << 1)\n+#define IOC_NET_HF_USER_DEFINED_ALL_FIELDS\t((IOC_NET_HF_USER_DEFINED_SRCPORT << 2) - 1)\n+\n+#define IOC_NET_HF_PAYLOAD_BUFFER\t(1)\n+#define IOC_NET_HF_PAYLOAD_SIZE\t\t(IOC_NET_HF_PAYLOAD_BUFFER << 1)\n+#define IOC_NET_HF_MAX_FRM_SIZE\t\t(IOC_NET_HF_PAYLOAD_BUFFER << 2)\n+#define IOC_NET_HF_MIN_FRM_SIZE\t\t(IOC_NET_HF_PAYLOAD_BUFFER << 3)\n+#define IOC_NET_HF_PAYLOAD_TYPE\t\t(IOC_NET_HF_PAYLOAD_BUFFER << 4)\n+#define IOC_NET_HF_FRAME_SIZE\t\t(IOC_NET_HF_PAYLOAD_BUFFER << 5)\n+#define IOC_NET_HF_PAYLOAD_ALL_FIELDS\t((IOC_NET_HF_PAYLOAD_BUFFER << 6) - 1)\n+\n+typedef uint8_t ioc_header_field_gre_t;\n+\n+#define IOC_NET_HF_GRE_TYPE\t\t(1)\n+#define IOC_NET_HF_GRE_ALL_FIELDS\t((IOC_NET_HF_GRE_TYPE << 1) - 1)\n+\n+typedef uint8_t ioc_header_field_minencap_t;\n+\n+#define IOC_NET_HF_MINENCAP_SRC_IP\t(1)\n+#define IOC_NET_HF_MINENCAP_DST_IP\t(IOC_NET_HF_MINENCAP_SRC_IP << 1)\n+#define IOC_NET_HF_MINENCAP_TYPE\t(IOC_NET_HF_MINENCAP_SRC_IP << 2)\n+#define IOC_NET_HF_MINENCAP_ALL_FIELDS\t((IOC_NET_HF_MINENCAP_SRC_IP << 3) - 1)\n+\n+typedef uint8_t ioc_header_field_ipsec_ah_t;\n+\n+#define IOC_NET_HF_IPSEC_AH_SPI\t(1)\n+#define IOC_NET_HF_IPSEC_AH_NH\t\t(IOC_NET_HF_IPSEC_AH_SPI << 1)\n+#define IOC_NET_HF_IPSEC_AH_ALL_FIELDS\t((IOC_NET_HF_IPSEC_AH_SPI << 2) - 1)\n+\n+typedef uint8_t ioc_header_field_ipsec_esp_t;\n+\n+#define IOC_NET_HF_IPSEC_ESP_SPI\t(1)\n+#define IOC_NET_HF_IPSEC_ESP_SEQUENCE_NUM\t(IOC_NET_HF_IPSEC_ESP_SPI << 1)\n+#define IOC_NET_HF_IPSEC_ESP_ALL_FIELDS\t((IOC_NET_HF_IPSEC_ESP_SPI << 2) - 1)\n+\n+#define IOC_NET_HF_IPSEC_ESP_SPI_SIZE\t\t4\n+\n+\n+typedef uint8_t ioc_header_field_mpls_t;\n+\n+#define IOC_NET_HF_MPLS_LABEL_STACK\t\t(1)\n+#define IOC_NET_HF_MPLS_LABEL_STACK_ALL_FIELDS\t((IOC_NET_HF_MPLS_LABEL_STACK << 1) - 1)\n+\n+typedef uint8_t ioc_header_field_macsec_t;\n+\n+#define IOC_NET_HF_MACSEC_SECTAG\t(1)\n+#define IOC_NET_HF_MACSEC_ALL_FIELDS\t((IOC_NET_HF_MACSEC_SECTAG << 1) - 1)\n+\n+typedef enum {\n+\tHEADER_TYPE_NONE = 0,\n+\tHEADER_TYPE_PAYLOAD,\n+\tHEADER_TYPE_ETH,\n+\tHEADER_TYPE_VLAN,\n+\tHEADER_TYPE_IPv4,\n+\tHEADER_TYPE_IPv6,\n+\tHEADER_TYPE_IP,\n+\tHEADER_TYPE_TCP,\n+\tHEADER_TYPE_UDP,\n+\tHEADER_TYPE_UDP_LITE,\n+\tHEADER_TYPE_IPHC,\n+\tHEADER_TYPE_SCTP,\n+\tHEADER_TYPE_SCTP_CHUNK_DATA,\n+\tHEADER_TYPE_PPPoE,\n+\tHEADER_TYPE_PPP,\n+\tHEADER_TYPE_PPPMUX,\n+\tHEADER_TYPE_PPPMUX_SUBFRAME,\n+\tHEADER_TYPE_L2TPv2,\n+\tHEADER_TYPE_L2TPv3_CTRL,\n+\tHEADER_TYPE_L2TPv3_SESS,\n+\tHEADER_TYPE_LLC,\n+\tHEADER_TYPE_LLC_SNAP,\n+\tHEADER_TYPE_NLPID,\n+\tHEADER_TYPE_SNAP,\n+\tHEADER_TYPE_MPLS,\n+\tHEADER_TYPE_IPSEC_AH,\n+\tHEADER_TYPE_IPSEC_ESP,\n+\tHEADER_TYPE_UDP_ENCAP_ESP, /* RFC 3948 */\n+\tHEADER_TYPE_MACSEC,\n+\tHEADER_TYPE_GRE,\n+\tHEADER_TYPE_MINENCAP,\n+\tHEADER_TYPE_DCCP,\n+\tHEADER_TYPE_ICMP,\n+\tHEADER_TYPE_IGMP,\n+\tHEADER_TYPE_ARP,\n+\tHEADER_TYPE_CAPWAP,\n+\tHEADER_TYPE_CAPWAP_DTLS,\n+\tHEADER_TYPE_RFC2684,\n+\tHEADER_TYPE_USER_DEFINED_L2,\n+\tHEADER_TYPE_USER_DEFINED_L3,\n+\tHEADER_TYPE_USER_DEFINED_L4,\n+\tHEADER_TYPE_USER_DEFINED_SHIM1,\n+\tHEADER_TYPE_USER_DEFINED_SHIM2,\n+\tMAX_HEADER_TYPE_COUNT\n+} ioc_net_header_type;\n+\n+#endif /* __NET_EXT_H */\ndiff --git a/drivers/net/dpaa/meson.build b/drivers/net/dpaa/meson.build\nindex 271416f08..67803cd34 100644\n--- a/drivers/net/dpaa/meson.build\n+++ b/drivers/net/dpaa/meson.build\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright 2018 NXP\n+# Copyright 2018-2019 NXP\n \n if not is_linux\n \tbuild = false\n@@ -8,6 +8,7 @@ endif\n deps += ['mempool_dpaa']\n \n sources = files('dpaa_ethdev.c',\n+\t\t'fmlib/fm_lib.c',\n \t\t'dpaa_rxtx.c')\n \n if cc.has_argument('-Wno-pointer-arith')\n",
    "prefixes": [
        "v2",
        "2/9"
    ]
}