get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 76552,
    "url": "https://patches.dpdk.org/api/patches/76552/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200904083930.17608-1-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200904083930.17608-1-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200904083930.17608-1-hemant.agrawal@nxp.com",
    "date": "2020-09-04T08:39:23",
    "name": "[v8,1/8] net/dpaa: add support for fmlib in dpdk",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "cb562eab6806277843466e20e4f98f7c0f7aaba9",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200904083930.17608-1-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 11951,
            "url": "https://patches.dpdk.org/api/series/11951/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11951",
            "date": "2020-09-04T08:39:24",
            "name": "[v8,1/8] net/dpaa: add support for fmlib in dpdk",
            "version": 8,
            "mbox": "https://patches.dpdk.org/series/11951/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/76552/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/76552/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 C4EC8A04BE;\n\tFri,  4 Sep 2020 10:46:52 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 111AD1C134;\n\tFri,  4 Sep 2020 10:45:57 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id 665311C0D0\n for <dev@dpdk.org>; Fri,  4 Sep 2020 10:45:47 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2201C1A0502;\n Fri,  4 Sep 2020 10:45:47 +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 8937C1A04E8;\n Fri,  4 Sep 2020 10:45:42 +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 6D0D4402CF;\n Fri,  4 Sep 2020 10:45:39 +0200 (CEST)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Fri,  4 Sep 2020 14:09:23 +0530",
        "Message-Id": "<20200904083930.17608-1-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200904082921.17400-1-hemant.agrawal@nxp.com>",
        "References": "<20200904082921.17400-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v8 1/8] 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\nSigned-off-by: Sachin Saxena <sachin.saxena@nxp.com>\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\nv8: add missing patch from v7\nv7: fix spelling mistakes and add FMD link\nv6: add documentation\nv5: align to dpdk coding style\n\n doc/guides/nics/dpaa.rst                  |   56 +-\n doc/guides/platform/dpaa.rst              |   21 +-\n drivers/net/dpaa/fmlib/dpaa_integration.h |   50 +\n drivers/net/dpaa/fmlib/fm_ext.h           |  463 ++\n drivers/net/dpaa/fmlib/fm_lib.c           |  561 ++\n drivers/net/dpaa/fmlib/fm_pcd_ext.h       | 5787 +++++++++++++++++++++\n drivers/net/dpaa/fmlib/fm_port_ext.h      | 3350 ++++++++++++\n drivers/net/dpaa/fmlib/ncsw_ext.h         |  158 +\n drivers/net/dpaa/fmlib/net_ext.h          |  411 ++\n drivers/net/dpaa/meson.build              |    3 +-\n 10 files changed, 10853 insertions(+), 7 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/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst\nindex 17839a920..0a8cfc6d5 100644\n--- a/doc/guides/nics/dpaa.rst\n+++ b/doc/guides/nics/dpaa.rst\n@@ -1,5 +1,5 @@\n ..  SPDX-License-Identifier: BSD-3-Clause\n-    Copyright 2017 NXP\n+    Copyright 2017,2020 NXP\n \n \n DPAA Poll Mode Driver\n@@ -21,6 +21,7 @@ Contents summary\n \n - DPAA overview\n - DPAA driver architecture overview\n+- FMAN configuration tools and library\n \n .. _dpaa_overview:\n \n@@ -285,6 +286,59 @@ for details.\n       Done\n       testpmd>\n \n+FMAN Config\n+-----------\n+\n+Frame Manager is also responsible for parser, classify and distribute\n+functionality in the DPAA.\n+\n+   FMAN supports:\n+   Packet parsing at wire speed. It supports standard protocols parsing and\n+   identification by HW (VLAN/IP/UDP/TCP/SCTP/PPPoE/PPP/MPLS/GRE/IPSec).\n+   It supports non-standard UDF header parsing for custom protocols.\n+   Classification / Distribution: Coarse classification based on Key generation\n+   Hash and exact match lookup\n+\n+FMC - FMAN Configuration Tool\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+   This tool is available in User Space. The tool is used to configure FMAN\n+   Physical (MAC) or Ephemeral (OH)ports for Parse/Classify/distribute.\n+   The PCDs can be hash based where a set of fields are key input for hash\n+   generation within FMAN keygen. The hash value is used to generate a FQID for\n+   frame. There is a provision to setup exact match lookup too where field\n+   values within a packet drives corresponding FQID.\n+   Currently it works on XML file inputs.\n+\n+   Limitations:\n+   1.For Dynamic Configuration change, currently no support is available.\n+   E.g. enable/disable a port, a operator (set of VLANs and associate rules).\n+\n+   2.During FMC configuration, port for which policy is being configured is\n+   brought down and the policy is flushed on port before new policy is updated\n+   for the port. Support is required to add/append/delete etc.\n+\n+   3.FMC, being a separate user-space application, needs to be invoked from\n+   Shell.\n+\n+\n+   The details can be found in FMC Doc at:\n+   `Frame Mnager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.\n+\n+FMLIB\n+~~~~~\n+   The Frame Manager library provides an API on top of the Frame Manager driver\n+   ioctl calls, that provides a user space application with a simple way to\n+   configure driver parameters and PCD (parse - classify - distribute) rules.\n+\n+   This is an alternate to the FMC based configuration. This library provides\n+   direct ioctl based interfaces for FMAN configuration as used by the FMC tool\n+   as well. This helps in overcoming the main limitaiton of FMC - i.e. lack\n+   of dynamic configuration.\n+\n+   The location for the fmd driver as used by FMLIB and FMC is as follows:\n+   `Kernel FMD Driver\n+   <https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/drivers/net/ethernet/freescale/sdk_fman?h=linux-4.19-rt>`_.\n+\n Limitations\n -----------\n \ndiff --git a/doc/guides/platform/dpaa.rst b/doc/guides/platform/dpaa.rst\nindex 6005f2221..20a0e3932 100644\n--- a/doc/guides/platform/dpaa.rst\n+++ b/doc/guides/platform/dpaa.rst\n@@ -58,17 +58,28 @@ compatible board:\n \n 4. **FMC Tool**\n \n-   Before any DPDK application can be executed, the Frame Manager Configuration\n-   Tool (FMC) need to be executed to set the configurations of the queues. This\n+   If one is planning to use more than 1 Recv queue and hardware capability to\n+   parse, classify and distribute the packets, the Frame Manager Configuration\n+   Tool (FMC) need to be executed to set the configurations of the queues before\n+   running the DPAA based DPDK application. This setting is persistent, the\n+   configuration will remain in the hardware till it is re-configured. This\n    includes the queue state, RSS and other policies.\n    This tool can be obtained from `NXP (Freescale) Public Git Repository <https://source.codeaurora.org/external/qoriq/qoriq-components/fmc>`_.\n \n    This tool needs configuration files which are available in the\n    :ref:`DPDK Extra Scripts <extra_scripts>`, described below for DPDK usages.\n \n-As an alternative method, DPAA PMD can also be executed using images provided\n-as part of SDK from NXP. The SDK includes all the above prerequisites necessary\n-to bring up a DPAA board.\n+   Note that DPAA PMD can also be executed using images provided\n+   as part of SDK from NXP. The SDK includes all the above prerequisites\n+   necessary (i.e. fmc tool) to bring up a DPAA board.\n+\n+   As an alternate method, DPAA PMDs starting from DPDK 20.11 also support the\n+   fmlib library integration. The driver will detect about any existing FMC\n+   based config (if /tmp/fmc.bin is present). DPAA FMD will be used only if no\n+   previous fmc config is existing.\n+\n+   Note that fmlib based integratin rely on underlying fmd driver in kernel,\n+   which is available as part of NXP kernel or NXP SDK.\n \n The following dependencies are not part of DPDK and must be installed\n separately:\ndiff --git a/drivers/net/dpaa/fmlib/dpaa_integration.h b/drivers/net/dpaa/fmlib/dpaa_integration.h\nnew file mode 100644\nindex 000000000..33b9619f9\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_NUM_CONG_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_PFC_PRIO\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..27c9fb471\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_ext.h\n@@ -0,0 +1,463 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\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__\t\tMODULE_FM\n+\n+/* #define FM_LIB_DBG */\n+\n+#if defined(FM_LIB_DBG)\n+\t#define _fml_dbg(fmt, args...) \\\n+\trte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, \"fmlib:%s(): \" fmt \"\\n\", \\\n+\t\t\t__func__, ##args)\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(fmt, args...) \\\n+\trte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, \"fmioc:%s(): \" fmt \"\\n\", \\\n+\t\t\t\t__func__, ##args)\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\t  lnx_usr_FM_grp Frame Manager API\n+ *\n+ * @Description   FM API functions, definitions and enums.\n+ *\n+ *\t  The FM module is the main driver module and is a mandatory\n+ *\t  module for FM driver users. This module must be initialized\n+ *\t  first prior to any other drivers modules.\n+ *\t  The FM is a \"singleton\" module. It is responsible of the\n+ *\t  common HW modules: FPM, DMA, common QMI and common BMI\n+ *\t  initializations and run-time control routines. This module\n+ *\t  must be initialized always when working with any of the FM modules.\n+ *\t  NOTE - We assume that the FM library will be initialized only\n+ *\t  by core No. 0!\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Description   Enum for defining port types\n+ */\n+typedef enum e_fm_port_type {\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_fm_port_type;\n+\n+/*\n+ * @Description   Parse results memory layout\n+ */\n+typedef struct t_fm_prs_result {\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+\t\t\t */\n+\tvolatile uint8_t\troute_type;\n+\t\t\t/**< Routing type field of a IPv6 routing extension\n+\t\t\t * header\n+\t\t\t */\n+\tvolatile uint8_t\trhp_ip_valid;\n+\t\t\t/**< Routing Extension Header Present; last bit is IP\n+\t\t\t * valid\n+\t\t\t */\n+\tvolatile uint8_t\tshim_off[2];\t/**< Shim offset */\n+\tvolatile uint8_t\tip_pid_off;\n+\t\t\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_fm_prs_result;\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+\t\t\t\t\t */\n+#define FM_FD_ERR_LENGTH\t0x02000000\n+\t\t\t\t\t/**< 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\n+\t\t\t * disparity error (SGMII and TBI modes), FIFO parity\n+\t\t\t * error. PHY Sequence error, PHY error control\n+\t\t\t * character detected.\n+\t\t\t */\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\n+\t\t\t\t/**< 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\n+\t\t\t\t\t/**< 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\n+\t\t\t\t\t/**< non Frame-Manager error */\n+/* @} */\n+\n+/*\n+ * @Description   FM Exceptions\n+ */\n+typedef enum e_fm_exceptions {\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\n+\t\t * (Valid for FM rev < 6)\n+\t\t */\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,\n+\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,\n+\t\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_fm_exceptions;\n+\n+/*\n+ * @Description   Enum for defining port DMA cache attributes\n+ */\n+typedef enum e_fm_dma_cache_option {\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_fm_dma_cache_option;\n+/*\n+ * @Group\tlnx_usr_FM_init_grp FM Initialization Unit\n+ *\n+ * @Description   FM Initialization Unit\n+ *\n+ *\t\t  Initialization Flow\n+ *\t\t  Initialization of the FM Module will be carried out by the\n+ *\t\t  application according to the following sequence:\n+ *\t\t  -  Calling the configuration routine with basic parameters.\n+ *\t\t  -  Calling the advance initialization routines to change\n+ *\t\t     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_fm_buffer_prefix_content {\n+\tuint16_t\tpriv_data_size;\n+\t\t/**< Number of bytes to be left at the beginning of the external\n+\t\t * buffer Note that the private-area will start from the base of\n+\t\t * the buffer address.\n+\t\t */\n+\tbool\tpass_prs_result;\n+\t\t/**< TRUE to pass the parse result to/from the FM; User may use\n+\t\t * fm_port_get_buffer_prs_result() in order to get the\n+\t\t * parser-result from a buffer.\n+\t\t */\n+\tbool\tpass_time_stamp;\n+\t\t/**< TRUE to pass the timeStamp to/from the FM User may use\n+\t\t * fm_port_get_buffer_time_stamp() in order to get the\n+\t\t * parser-result from a buffer.\n+\t\t */\n+\tbool\tpass_hash_result;\n+\t\t/**< TRUE to pass the KG hash result to/from the FM User may use\n+\t\t * fm_port_get_buffer_hash_result() in order to get the\n+\t\t * parser-result from a buffer.\n+\t\t */\n+\tbool\tpass_all_other_pcdinfo;\n+\t\t/**< Add all other Internal-Context information: AD,\n+\t\t * hash-result, key, etc.\n+\t\t */\n+\tuint16_t\tdata_align;\n+\t\t/**< 0 to use driver's default alignment [64], other value for\n+\t\t * selecting a data alignment (must be a power of 2); if write\n+\t\t * optimization is used, must be >= 16.\n+\t\t */\n+\tuint8_t\tmanip_ext_space;\n+\t\t/**< Maximum extra size needed (insertion-size minus\n+\t\t * removal-size);\n+\t\t * Note that this field impacts the size of the buffer-prefix\n+\t\t * (i.e. it pushes the data offset);\n+\t\t */\n+} t_fm_buffer_prefix_content;\n+\n+/*\n+ * @Description   A structure of information about each of the external\n+ *\t\t  buffer pools used by a port or storage-profile.\n+ */\n+typedef struct t_fm_ext_pool_params {\n+\tuint8_t\t\tid;\t/**< External buffer pool id */\n+\tuint16_t\tsize;\t/**< External buffer pool buffer size */\n+} t_fm_ext_pool_params;\n+\n+/*\n+ * @Description   A structure for informing the driver about the external\n+ *\t\t  buffer pools allocated in the BM and used by a port or a\n+ *\t\t  storage-profile.\n+ */\n+typedef struct t_fm_ext_pools {\n+\tuint8_t\t\tnum_of_pools_used;\n+\t\t\t/**< Number of pools use by this port*/\n+\tt_fm_ext_pool_params\text_buf_pool[FM_PORT_MAX_NUM_OF_EXT_POOLS];\n+\t\t\t/**< Parameters for each port */\n+} t_fm_ext_pools;\n+\n+/*\n+ * @Description   A structure for defining backup BM Pools.\n+ */\n+typedef struct t_fm_backup_bm_pools {\n+\tuint8_t\tnum_bkup_pools;\n+\t\t\t/**< Number of BM backup pools - must be smaller than\n+\t\t\t * the total number of pools defined for the specified\n+\t\t\t * port.\n+\t\t\t */\n+\tuint8_t\tpool_ids[FM_PORT_MAX_NUM_OF_EXT_POOLS];\n+\t\t\t/**< num_bkup_pools pool id's, specifying which pools\n+\t\t\t * should be used only as backup. Pool id's specified\n+\t\t\t * here must be a subset of the pools used by the\n+\t\t\t * specified port.\n+\t\t\t */\n+} t_fm_backup_bm_pools;\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+ *\n+ *\t\t  The FM driver provides a set of control routines.\n+ *\t\t  These routines may only be called after the module was fully\n+ *\t\t  initialized (both configuration and initialization routines\n+ *\t\t  were called). They are typically used to get information from\n+ *\t\t  hardware (status, counters/statistics, revision etc.), to\n+ *\t\t  modify a current state or to force/enable a required action.\n+ *\t\t  Run-time control may be called whenever necessary and as many\n+ *\t\t  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+/** @} */ /* 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 \\\n+\t(DEV_FM_OH_PORTS_MINOR_BASE + FM_MAX_NUM_OF_OH_PORTS)\n+\t\t\t\t/*/dev/fmx-port-rxy */\n+#define DEV_FM_TX_PORTS_MINOR_BASE \\\n+\t(DEV_FM_RX_PORTS_MINOR_BASE + FM_MAX_NUM_OF_RX_PORTS)\n+\t\t\t\t/*/dev/fmx-port-txy */\n+#define DEV_FM_MAX_MINORS \\\n+\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_fm_port_type 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+typedef struct ioc_fm_obj_t {\n+\tvoid\t*obj;\n+} ioc_fm_obj_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+/*\n+ * @Function\t  FM_IOC_GET_API_VERSION\n+ *\n+ * @Description   Reads the FMD IOCTL API version.\n+ *\n+ * @Param[in,out] ioc_fm_api_version_t\t\tThe requested counter parameters\n+ *\n+ * @Return\t  Version'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+#define FMD_API_VERSION_MAJOR 21\n+#define FMD_API_VERSION_MINOR 1\n+#define FMD_API_VERSION_RESPIN 0\n+\n+uint32_t fm_get_api_version(t_handle h_fm, ioc_fm_api_version_t *p_version);\n+\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..0d1ca1237\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_lib.c\n@@ -0,0 +1,561 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2008-2016 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+\t\tt_device *p_dev = (t_device *)p; \\\n+\t\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+t_handle\n+fm_open(uint8_t id)\n+{\n+\tt_device *p_dev;\n+\tint fd;\n+\tchar dev_name[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 == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(dev_name, 0, 20);\n+\tsprintf(dev_name, \"%s%s%d\", \"/dev/\", DEV_FM_NAME, id);\n+\tfd = open(dev_name, 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_get_api_version((t_handle)p_dev, &ver);\n+\n+\t\tif (ver.version.major != FMD_API_VERSION_MAJOR ||\n+\t\t    ver.version.minor != FMD_API_VERSION_MINOR ||\n+\t\t\tver.version.respin != FMD_API_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 *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\n+fm_get_api_version(t_handle h_fm, ioc_fm_api_version_t *p_version)\n+{\n+\tt_device *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\n+fm_pcd_open(t_fm_pcd_params *p_fm_pcd_params)\n+{\n+\tt_device *p_dev;\n+\tint fd;\n+\tchar dev_name[20];\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_dev = (t_device *)malloc(sizeof(t_device));\n+\tif (p_dev == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(dev_name, 0, 20);\n+\tsprintf(dev_name, \"%s%s%u-pcd\", \"/dev/\", DEV_FM_NAME,\n+\t\t(uint32_t)((t_device *)p_fm_pcd_params->h_fm)->id);\n+\tfd = open(dev_name, 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_fm_pcd_params->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\n+fm_pcd_close(t_handle h_fm_pcd)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_pcd;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tclose(p_dev->fd);\n+\n+\tif (p_dev->owners) {\n+\t\tprintf(\"\\nTry delete a prev created pcd handler(owners:%u)!\\n\",\n+\t\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\n+fm_pcd_enable(t_handle h_fm_pcd)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_pcd;\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\n+fm_pcd_disable(t_handle h_fm_pcd)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_pcd;\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\n+fm_pcd_net_env_characteristics_set(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_net_env_params_t *params)\n+{\n+\tt_device *p_pcd_dev = (t_device *)h_fm_pcd;\n+\tt_device *p_dev = NULL;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tparams->id = NULL;\n+\n+\tif (ioctl(p_pcd_dev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET,\n+\t\t  params))\n+\t\treturn NULL;\n+\n+\tp_dev = (t_device *)malloc(sizeof(t_device));\n+\tif (p_dev == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(p_dev, 0, sizeof(t_device));\n+\tp_dev->h_user_priv = (t_handle)p_pcd_dev;\n+\tp_pcd_dev->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\n+fm_pcd_net_env_characteristics_delete(t_handle h_net_env)\n+{\n+\tt_device *p_dev = (t_device *)h_net_env;\n+\tt_device *p_pcd_dev = NULL;\n+\tioc_fm_obj_t id;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_pcd_dev = (t_device *)p_dev->h_user_priv;\n+\tid.obj = UINT_TO_PTR(p_dev->id);\n+\n+\tif (ioctl(p_pcd_dev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE,\n+\t\t  &id))\n+\t\tRETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);\n+\n+\tp_pcd_dev->owners--;\n+\tfree(p_dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+t_handle\n+fm_pcd_kg_scheme_set(t_handle h_fm_pcd,\n+\t\t     ioc_fm_pcd_kg_scheme_params_t *params)\n+{\n+\tt_device *p_pcd_dev = (t_device *)h_fm_pcd;\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_net_env 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_pcd_dev->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 == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(p_dev, 0, sizeof(t_device));\n+\tp_dev->h_user_priv = (t_handle)p_pcd_dev;\n+\t/* increase owners only if a new scheme is created */\n+\tif (!params->param.modify)\n+\t\tp_pcd_dev->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\n+fm_pcd_kg_scheme_delete(t_handle h_scheme)\n+{\n+\tt_device *p_dev = (t_device *)h_scheme;\n+\tt_device *p_pcd_dev = NULL;\n+\tioc_fm_obj_t id;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_pcd_dev =  (t_device *)p_dev->h_user_priv;\n+\tid.obj = UINT_TO_PTR(p_dev->id);\n+\n+\tif (ioctl(p_pcd_dev->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_pcd_dev->owners--;\n+\tfree(p_dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn E_OK;\n+}\n+\n+typedef struct {\n+\te_fm_port_type\tport_type;\t/**< Port type */\n+\tuint8_t\t\tport_id;\t/**< Port Id - relative to type */\n+} t_fm_port;\n+\n+t_handle\n+fm_port_open(t_fm_port_params *p_fm_port_params)\n+{\n+\tt_device *p_dev;\n+\tint fd;\n+\tchar dev_name[30];\n+\tt_fm_port *p_fm_port;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tp_dev = (t_device *)malloc(sizeof(t_device));\n+\tif (p_dev == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(p_dev, 0, sizeof(t_device));\n+\n+\tp_fm_port = (t_fm_port *)malloc(sizeof(t_fm_port));\n+\tif (!p_fm_port) {\n+\t\tfree(p_dev);\n+\t\treturn NULL;\n+\t}\n+\tmemset(p_fm_port, 0, sizeof(t_fm_port));\n+\tmemset(dev_name, 0, sizeof(dev_name));\n+\tswitch (p_fm_port_params->port_type) {\n+\tcase e_FM_PORT_TYPE_OH_OFFLINE_PARSING:\n+\t\tsprintf(dev_name, \"%s%s%u-port-oh%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,\n+\t\t\tp_fm_port_params->port_id);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_RX:\n+\t\tsprintf(dev_name, \"%s%s%u-port-rx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,\n+\t\t\tp_fm_port_params->port_id);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_RX_10G:\n+\t\tsprintf(dev_name, \"%s%s%u-port-rx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,\n+\t\t\tFM_MAX_NUM_OF_1G_RX_PORTS + p_fm_port_params->port_id);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_TX:\n+\t\tsprintf(dev_name, \"%s%s%u-port-tx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,\n+\t\t\tp_fm_port_params->port_id);\n+\t\tbreak;\n+\tcase e_FM_PORT_TYPE_TX_10G:\n+\t\tsprintf(dev_name, \"%s%s%u-port-tx%d\", \"/dev/\", DEV_FM_NAME,\n+\t\t\t(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,\n+\t\t\tFM_MAX_NUM_OF_1G_TX_PORTS + p_fm_port_params->port_id);\n+\t\tbreak;\n+\tdefault:\n+\t\tfree(p_fm_port);\n+\t\tfree(p_dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tfd = open(dev_name, O_RDWR);\n+\tif (fd < 0) {\n+\t\tfree(p_fm_port);\n+\t\tfree(p_dev);\n+\t\treturn NULL;\n+\t}\n+\n+\tp_fm_port->port_type = p_fm_port_params->port_type;\n+\tp_fm_port->port_id = p_fm_port_params->port_id;\n+\tp_dev->id = p_fm_port_params->port_id;\n+\tp_dev->fd = fd;\n+\tp_dev->h_user_priv = (t_handle)p_fm_port;\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_handle)p_dev;\n+}\n+\n+void\n+fm_port_close(t_handle h_fm_port)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_port;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\tclose(p_dev->fd);\n+\tif (p_dev->h_user_priv)\n+\t\tfree(p_dev->h_user_priv);\n+\tfree(p_dev);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+}\n+\n+uint32_t\n+fm_port_disable(t_handle h_fm_port)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_port;\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\n+fm_port_enable(t_handle h_fm_port)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_port;\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\n+fm_port_set_pcd(t_handle h_fm_port,\n+\t\tioc_fm_port_pcd_params_t *p)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_port;\n+\n+\t_fml_dbg(\"Calling...\\n\");\n+\n+\t/* correct h_net_env param from t_fm_portPcdParams */\n+\tDEV_TO_ID(p->net_env_id);\n+\n+\t/* correct pcd structures according to what support was set */\n+\tif (p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_CC) {\n+\t\tif (p->p_cc_params && p->p_cc_params->cc_tree_id)\n+\t\t\tDEV_TO_ID(p->p_cc_params->cc_tree_id);\n+\t\telse\n+\t\t\tDPAA_PMD_WARN(\"Coarse Classification not set !\");\n+\t}\n+\n+\tif (p->pcd_support == e_IOC_FM_PCD_PRS_KG ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_PLCR){\n+\t\tif (p->p_kg_params) {\n+\t\t\tuint32_t i;\n+\t\t\tioc_fm_port_pcd_kg_params_t *kg_params;\n+\n+\t\t\tkg_params = p->p_kg_params;\n+\n+\t\t\tfor (i = 0; i < kg_params->num_schemes; i++)\n+\t\t\t\tif (kg_params->scheme_ids[i])\n+\t\t\t\t\tDEV_TO_ID(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 (kg_params->direct_scheme)\n+\t\t\t\tDEV_TO_ID(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 (p->pcd_support == e_IOC_FM_PCD_PLCR_ONLY ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_PLCR ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||\n+\t\tp->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_PLCR) {\n+\t\tif (p->p_plcr_params) {\n+\t\t\tif (p->p_plcr_params->plcr_profile_id)\n+\t\t\t\tDEV_TO_ID(p->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 (p->p_ip_reassembly_manip)\n+\t\tDEV_TO_ID(p->p_ip_reassembly_manip);\n+\n+\tif (p->p_capwap_reassembly_manip)\n+\t\tDEV_TO_ID(p->p_capwap_reassembly_manip);\n+\n+\tif (ioctl(p_dev->fd, FM_PORT_IOC_SET_PCD, p))\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\n+fm_port_delete_pcd(t_handle h_fm_port)\n+{\n+\tt_device *p_dev = (t_device *)h_fm_port;\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\n+create_device(t_handle h_user_priv, t_handle h_dev_id)\n+{\n+\tt_device *p_user_priv_dev = (t_device *)h_user_priv;\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 == NULL)\n+\t\treturn NULL;\n+\n+\tmemset(p_dev, 0, sizeof(t_device));\n+\tp_dev->h_user_priv = h_user_priv;\n+\tp_user_priv_dev->owners++;\n+\tp_dev->id = PTR_TO_UINT(h_dev_id);\n+\n+\t_fml_dbg(\"Finishing.\\n\");\n+\n+\treturn (t_handle)p_dev;\n+}\n+\n+t_handle\n+get_device_id(t_handle h_dev)\n+{\n+\tt_device *p_dev = (t_device *)h_dev;\n+\n+\treturn (t_handle)p_dev->id;\n+}\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..8be3885fb\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_pcd_ext.h\n@@ -0,0 +1,5787 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\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\t  FM PCD ...\n+ * @Group\t  lnx_ioctl_FM_grp Frame Manager Linux IOCTL API\n+ * @Description\t  Frame Manager Linux ioctls definitions and enums\n+ * @{\n+ */\n+\n+/*\n+ * @Group\t  lnx_ioctl_FM_PCD_grp FM PCD\n+ * @Description\t  Frame Manager PCD API functions, definitions and enums\n+ *\n+ *\t\t  The FM PCD module is responsible for the initialization of all\n+ *\t\t  global classifying FM modules. This includes the parser\n+ *\t\t  general and common registers, the key generator global and\n+ *\t\t  common registers, and the policer global and common registers.\n+ *\t\t  In addition, the FM PCD SW module will initialize all required\n+ *\t\t  key generator schemes, coarse classification flows, and\n+ *\t\t  policer profiles. When an FM module is configured to work with\n+ *\t\t  one of these entities, it will register to it using the FM\n+ *\t\t  PORT API. The PCD module will manage the PCD resources - i.e.\n+ *\t\t  resource management of KeyGen 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 \\\n+\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+ */\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_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+ */\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+/*\n+ * @Group\t  lnx_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\n+\t * the Policer.\n+\t */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_YELLOW,\n+\t/**< Policer counter - counts the total number of YELLOW packets that\n+\t * exit the Policer.\n+\t */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED,\n+\t/**< Policer counter - counts the number of packets that changed color\n+\t * to RED by the Policer; This is a subset of\n+\t * e_IOC_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color\n+\t * changes.\n+\t */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW,\n+\t/**< Policer counter - counts the number of packets that changed color\n+\t * to YELLOW by the Policer; This is a subset of\n+\t * e_IOC_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active\n+\t * color changes.\n+\t */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_TOTAL,\n+\t/**< Policer counter - counts the total number of packets passed in the\n+\t * Policer.\n+\t */\n+\te_IOC_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH,\n+\t/**< Policer counter - counts the number of packets with length\n+\t * mismatch.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH,\n+\t/**< Parser counter - counts the number of times the parser block is\n+\t * dispatched.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L2 parse result is\n+\t * returned (including errors).\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L3 parse result is\n+\t * returned (including errors).\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times L4 parse result is\n+\t * returned (including errors).\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED,\n+\t/**< Parser counter - counts the number of times SHIM parse result is\n+\t * returned (including errors).\n+\t */\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\n+\t * returned with errors.\n+\t */\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\n+\t * returned with errors.\n+\t */\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\n+\t * returned with errors.\n+\t */\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\n+\t * returned with errors.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES,\n+\t/**< Parser counter - counts the number of cycles spent executing soft\n+\t * parser instruction (including stall cycles).\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_STALL_CYCLES,\n+\t/**< Parser counter - counts the number of cycles stalled waiting for\n+\t * parser internal memory reads while executing soft parser instruction.\n+\t */\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\n+\t * parser (including stall cycles).\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles while performing FMan\n+\t * Memory read.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles stalled while\n+\t * performing FMan Memory read.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles while performing FMan\n+\t * Memory write.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES,\n+\t/**< MURAM counter - counts the number of cycles stalled while\n+\t * performing FMan Memory write.\n+\t */\n+\te_IOC_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES\n+\t/**< FPM counter - counts the number of cycles stalled while performing\n+\t * a FPM Command.\n+\t */\n+} ioc_fm_pcd_counters;\n+\n+/*\n+ * @Description   PCD interrupts\n+ *\t\t  (must match enum ioc_fm_pcd_exceptions defined in\n+ *\t\t  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\n+\t * access.\n+\t */\n+\te_IOC_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW,\n+\t/**< KeyGen scheme configuration error indicating a key size larger than\n+\t * 56 bytes.\n+\t */\n+\te_IOC_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC,\n+\t/**< Policer double-bit ECC error has been detected on PRAM read access.\n+\t */\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\t  lnx_ioctl_FM_PCD_Runtime_grp FM PCD Runtime Unit\n+ *\n+ * @Description   Frame Manager PCD Runtime Unit\n+ *\n+ *\t\t  The runtime control allows creation of PCD infrastructure\n+ *\t\t  modules such as Network Environment Characteristics,\n+ *\t\t  Classification Plan Groups and Coarse Classification Trees.\n+ *\t\t  It also allows on-the-fly initialization, modification and\n+ *\t\t  removal of PCD modules such as KeyGen schemes, coarse\n+ *\t\t  classification nodes and Policer profiles.\n+ *\n+ *\t\t  In order to explain the programming model of the PCD driver\n+ *\t\t  interface a few terms should be explained, and will be used\n+ *\t\t  below.\n+ *\t\t  - Distinction Header - One of the 16 protocols supported by\n+ *\t\t    the FM parser, or one of the SHIM headers (1 or 2). May be a\n+ *\t\t    header with a special option (see below).\n+ *\t\t  - Interchangeable Headers Group - This is a group of Headers\n+ *\t\t    recognized by either one of them. For example, if in a\n+ *\t\t    specific context the user chooses to treat IPv4 and IPV6 in\n+ *\t\t    the same way, they may create an interchangeable Headers\n+ *\t\t    Unit consisting of these 2 headers.\n+ *\t\t  - A Distinction Unit - a Distinction Header or an\n+ *\t\t    Interchangeable Headers Group.\n+ *\t\t  - Header with special option - applies to Ethernet, MPLS,\n+ *\t\t    VLAN, IPv4 and IPv6, includes multicast, broadcast and other\n+ *\t\t    protocol specific options. In terms of hardware it relates\n+ *\t\t    to the options available in the classification plan.\n+ *\t\t  - Network Environment Characteristics - a set of Distinction\n+ *\t\t    Units that define the total recognizable header selection\n+ *\t\t    for a certain environment. This is NOT the list of all\n+ *\t\t    headers that will ever appear in a flow, but rather\n+ *\t\t    everything that needs distinction in a flow, where\n+ *\t\t    distinction is made by KeyGen schemes and coarse\n+ *\t\t    classification action descriptors.\n+ *\n+ *\t\t  The PCD runtime modules initialization is done in stages. The\n+ *\t\t  first stage after initializing the PCD module itself is to\n+ *\t\t  establish a Network Flows Environment Definition. The\n+ *\t\t  application may choose to establish one or more such\n+ *\t\t  environments. Later, when needed, the application will have to\n+ *\t\t  state, for some of its modules, to which single environment it\n+ *\t\t  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;\n+\t\t\t/**< The requested value to get/set from/into the\n+\t\t\t * counter\n+\t\t\t */\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;\n+\t\t\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 (must be identical to struct\n+ *\t\t  t_fm_pcd_prs_label_params defined in fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_prs_label_params_t {\n+\tuint32_t instruction_offset;\n+\t\t/**< SW parser label instruction offset (2 bytes resolution),\n+\t\t * relative to Parser RAM\n+\t\t */\n+\tioc_net_header_type\thdr;\n+\t\t/**< The existence of this header will invoke the SW parser\n+\t\t * code.\n+\t\t */\n+\tuint8_t\tindex_per_hdr;\n+\t\t/**< Normally 0, if more than one SW parser attachments for the\n+\t\t * same header, use this index to distinguish between them.\n+\t\t */\n+} ioc_fm_pcd_prs_label_params_t;\n+\n+/*\n+ * @Description   A structure for SW parser (Must match struct\n+ *\t\t  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;\n+\t\t\t/**< FALSE to invoke a check that nothing else was\n+\t\t\t * loaded to this address, including internal patches.\n+\t\t\t * TRUE to override any existing code.\n+\t\t\t */\n+\tuint32_t\tsize;\t\t/**< SW parser code size */\n+\tuint16_t\tbase;\n+\t\t\t/**< SW parser base (in instruction counts! must be\n+\t\t\t * larger than 0x20)\n+\t\t\t */\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\n+\t\t\tlabels_table[IOC_FM_PCD_PRS_NUM_OF_LABELS];\n+\t\t\t/**< SW parser labels table, containing num_of_labels\n+\t\t\t * entries\n+\t\t\t */\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\tvalue_id;/**< 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\t  fm_pcd_enable\n+ *\n+ * @Description   This routine should be called after PCD is initialized for\n+ *\t\t  enabling all PCD engines according to their existing\n+ *\t\t  configuration.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed 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\t  fm_pcd_disable\n+ *\n+ * @Description   This routine may be called when PCD is enabled in order to\n+ *\t\t  disable all PCD engines. It may be called only when none of\n+ *\t\t  the ports in the system are using the PCD.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed 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\t  fm_pcd_prs_load_sw\n+ *\n+ * @Description   This routine may be called only when all ports in the\n+ *\t\t  system are actively using the classification plan scheme.\n+ *\t\t  In such cases it is recommended in order to save resources.\n+ *\t\t  The driver automatically saves 8 classification plans for\n+ *\t\t  ports that do NOT use the classification plan mechanism, to\n+ *\t\t  avoid this (in order to save those entries) this routine may\n+ *\t\t  be called.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_prs_sw_params_t\n+ *\t\t  A pointer to the image of the software parser code.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only when PCD is disabled.\n+ */\n+#define FM_PCD_IOC_PRS_LOAD_SW \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_fm_pcd_prs_sw_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_kg_set_dflt_value\n+ *\n+ * @Description   Calling this routine sets a global default value to be used\n+ *\t\t  by the KeyGen when parser does not recognize a required\n+ *\t\t  field/header.\n+ *\t\t  default value is 0.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_kg_dflt_value_params_t\tA pointer to a structure\n+ *\t\t\t\t\t\t\twith the relevant\n+ *\t\t\t\t\t\t\tparameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only when PCD is disabled.\n+ */\n+#define FM_PCD_IOC_KG_SET_DFLT_VALUE \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(6), \\\n+\t     ioc_fm_pcd_kg_dflt_value_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_kg_set_additional_data_after_parsing\n+ *\n+ * @Description   Calling this routine allows the keygen to access data past\n+ *\t\t  the parser finishing point.\n+ *\n+ * @Param[in]\t  uint8_t\tpayload-offset; the number of bytes beyond the\n+ *\t\t\t\tparser location.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only when PCD is disabled.\n+ */\n+#define FM_PCD_IOC_KG_SET_ADDITIONAL_DATA_AFTER_PARSING \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(7), uint8_t)\n+\n+/*\n+ * @Function\t  fm_pcd_set_exception\n+ *\n+ * @Description   Calling this routine enables/disables PCD interrupts.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_exception_params_t\n+ *\t\t  Arguments struct with exception to be enabled/disabled.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_SET_EXCEPTION \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(8), ioc_fm_pcd_exception_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_get_counter\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\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  It is user's responsibility to call this routine only\n+ *\t\t  for enabled counters, and there will be no indication if a\n+ *\t\t  disabled counter is accessed.\n+ */\n+#define FM_PCD_IOC_GET_COUNTER \\\n+\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(9), ioc_fm_pcd_counters_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_get_counter\n+ *\n+ * @Description   Reads scheme packet counter.\n+ *\n+ * @Param[in]\t  h_scheme\tscheme handle as returned by\n+ *\t\t\t\tfm_pcd_kg_scheme_set().\n+ *\n+ * @Return\t  Counter's current value.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().\n+ */\n+#define FM_PCD_IOC_KG_SCHEME_GET_CNTR \\\n+\t_IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_fm_pcd_kg_scheme_spc_t)\n+\n+/*\n+ * @Function\t  FM_PCD_ForceIntr\n+ *\n+ * @Description   Causes an interrupt event on the requested source.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_exceptions - An exception to be forced.\n+ *\n+ * @Return\t  0 on success; error code if the exception is not enabled,\n+ *\t\t  or is not able to create interrupt.\n+ */\n+#define FM_PCD_IOC_FORCE_INTR \\\n+\t_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\n+ *\t\tKeyGen (when coarse classification is the next engine after this\n+ *\t\tscheme).\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_CC_ENTRY_IN_GRP\t\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\n+\t\t\t\t\t/**< Tunneled IPv4 - Unicast.\n+\t\t\t\t\t */\n+#define IOC_IPV4_MULTICAST_BROADCAST_2  0x01000000\n+\t\t\t\t\t/**< Tunneled IPv4 -\n+\t\t\t\t\t * Broadcast/Multicast.\n+\t\t\t\t\t */\n+\n+#define IOC_IPV4_FRAG_1\t\t0x00000008\n+\t\t\t\t/**< IPV4 reassembly option. IPV4\n+\t\t\t\t * Reassembly manipulation requires network\n+\t\t\t\t * environment with IPV4 header and IPV4_FRAG_1\n+\t\t\t\t * option\n+\t\t\t\t */\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\n+\t\t\t\t/**< IPV6 reassembly option. IPV6 Reassembly\n+\t\t\t\t * manipulation requires network environment\n+\t\t\t\t * with IPV6 header and IPV6_FRAG_1 option\n+\t\t\t\t */\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\n+\t\t\t\t/**< CAPWAP reassembly option. CAPWAP Reassembly\n+\t\t\t\t * manipulation requires network environment\n+\t\t\t\t * with CAPWAP header and CAPWAP_FRAG_1 option;\n+\t\t\t\t * in case where fragment found, the\n+\t\t\t\t * fragment-extension offset may be found at\n+\t\t\t\t * 'shim2' (in parser-result).\n+\t\t\t\t */\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 of\n+\t\t\t * ioc_fm_pcd_manip_hdr_field_update_ipv4_t)\n+\t\t\t */\n+#define IOC_HDR_MANIP_IPV4_ID\t0x40000000\n+\t\t\t/**< update IP ID with the given value ('id' field of\n+\t\t\t * ioc_fm_pcd_manip_hdr_field_update_ipv4_t)\n+\t\t\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 ('src' field\n+\t\t * of ioc_fm_pcd_manip_hdr_field_update_ipv4_t)\n+\t\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+\t\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 ('traffic_class'\n+\t * field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)\n+\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 ('src' field\n+\t\t * of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)\n+\t\t */\n+#define IOC_HDR_MANIP_IPV6_DST\t0x10000000\n+\t\t/**< update IP destination address with the given value ('dst'\n+\t\t * field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)\n+\t\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+\t\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+\t\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\t  each value in this array represents the index of the\n+ *\t\t  extraction command as defined by the user in the\n+ *\t\t  initialization extraction array. The valid size of this array\n+ *\t\t  is the user define number of extractions required (also\n+ *\t\t  marked by the second '0' in this array).\n+ */\n+typedef\tuint8_t\n+\tioc_fm_pcd_kg_key_order_t [IOC_FM_PCD_KG_MAX_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+\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+\te_IOC_FM_PCD_FR,\t/**< Frame Replicator */\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\n+ *\t\t  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\n+ *\t\t  header) (Must match enum e_FmPcdExtractFrom defined in\n+ *\t\t  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\t\t/**< KG only: Extract from the point where parsing had\n+\t\t\t * finished\n+\t\t\t */\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,\n+\t\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,\n+\t\t/**< Default selection is KG register 0 */\n+\te_IOC_FM_PCD_KG_DFLT_GBL_1,\n+\t\t/**< Default selection is KG register 1 */\n+\te_IOC_FM_PCD_KG_DFLT_PRIVATE_0,\n+\t\t/**< Default selection is a per scheme register 0 */\n+\te_IOC_FM_PCD_KG_DFLT_PRIVATE_1,\n+\t\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\n+ *\t\t  shares a 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\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\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,\n+\t\t/**< grouping implemented by SW, any data extraction that is not\n+\t\t * the full field described above\n+\t\t */\n+\te_IOC_FM_PCD_KG_GENERIC_FROM_DATA_NO_V,\n+\t\t/**< grouping implemented by SW, any data extraction without\n+\t\t * validation\n+\t\t */\n+\te_IOC_FM_PCD_KG_GENERIC_NOT_FROM_DATA\n+\t\t/**< grouping implemented by SW, extraction from parser result\n+\t\t * or direct use of default value\n+\t\t */\n+} ioc_fm_pcd_kg_known_fields_dflt_types;\n+\n+/*\n+ * @Description   Enumeration type for defining header index for scenarios with\n+ *\t\t  multiple (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 * to specify regular IP (not tunneled).\n+\t\t\t\t */\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\n+ *\t\t  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\n+\t\t\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,\t/**< Yellow */\n+\te_IOC_FM_PCD_PLCR_RED,\t\t/**< Red */\n+\te_IOC_FM_PCD_PLCR_OVERRIDE\t/**< Color override */\n+} ioc_fm_pcd_plcr_color;\n+\n+/*\n+ * @Description   Enumeration type for selecting the policer profile packet\n+ *\t\t  frame length selector\n+ */\n+typedef enum ioc_fm_pcd_plcr_frame_length_select {\n+\te_IOC_FM_PCD_PLCR_L2_FRM_LEN,\t/**< L2 frame length */\n+\te_IOC_FM_PCD_PLCR_L3_FRM_LEN,\t/**< L3 frame length */\n+\te_IOC_FM_PCD_PLCR_L4_FRM_LEN,\t/**< L4 frame length */\n+\te_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+\te_IOC_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN,\t/**< Rollback L2 frame length */\n+\te_IOC_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN\n+\t\t\t\t/**< 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\n+ *\t\t  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,\n+\t\t\t\t\t/**< Green packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER,\n+\t\t\t\t\t/**< Yellow packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER,\n+\t\t\t\t\t/**< Red packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER,\n+\t\t\t\t\t/**< Recolored yellow packets counter */\n+\te_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER\n+\t\t\t\t\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,\n+\t\t/**< Exact match on the selected extraction */\n+\te_IOC_FM_PCD_ACTION_INDEXED_LOOKUP\n+\t\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,\n+\t\t/**< Insert according to offset & size */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR,\n+\t\t/**< Insert according to protocol */\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,\n+\t\t/**< Remove according to offset & size */\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR\n+\t\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/**< 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/**< MPLS and Ethernet/802.3 MAC header unitl the header\n+\t\t\t * which follows the MPLS header\n+\t\t\t */\n+\te_IOC_FM_PCD_MANIP_HDR_RMV_MPLS\n+\t\t\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,\n+\t\t\t\t/**< Replace VPri of outer most VLAN tag. */\n+\te_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN\n+\t\t\t\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\n+\t\t/**< Insert MPLS header (Unlimited MPLS labels) */\n+} ioc_fm_pcd_manip_hdr_insrt_specific_l2;\n+\n+/*\n+ * @Description   Enumeration type for selecting QoS mapping mode\n+ *\n+ *\t\t  Note: In all cases except\n+ *\t\t  'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE' User should instruct the\n+ *\t\t  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,\n+\t\t\t/**< No mapping, QoS field will not be changed */\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS,\n+\t\t\t/**< QoS field will be overwritten by the last byte in\n+\t\t\t * the parser-result.\n+\t\t\t */\n+} ioc_fm_pcd_manip_hdr_qos_mapping_mode;\n+\n+/*\n+ * @Description   Enumeration type for selecting QoS source\n+ *\n+ *\t\t  Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'\n+ *\t\t  User should left room for the parser-result on input/output\n+ *\t\t  buffer and instruct the port to read/write the parser-result\n+ *\t\t  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,\n+\t\t\t/**< TODO */\n+\te_IOC_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED,\n+\t\t\t/**< QoS will be taken from the last byte in the\n+\t\t\t * parser-result.\n+\t\t\t */\n+} ioc_fm_pcd_manip_hdr_qos_src;\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,\n+\t\t\t/**< Specific L2 fields insertion */\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,\n+\t\t\t/**< UDP lite insertion */\n+\te_IOC_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP\t\t/**< CAPWAP insertion */\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,\n+\t\t\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,\n+\t\t\t\t\t/**< Replace IPv4 by IPv6 */\n+\te_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4\n+\t\t\t\t\t/**< 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,\n+\t\t\t/**< Specific L2 fields removal */\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP,\t/**< CAPWAP removal */\n+\te_IOC_FM_PCD_MANIP_RMV_BY_HDR_FROM_START,\n+\t\t\t\t/**< Locate from data that is not the header */\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\n+\t\t\t\t\t * process from the first fragment to\n+\t\t\t\t\t * the last\n+\t\t\t\t\t */\n+\te_IOC_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG\n+\t\t\t\t\t/**< Limits the time of receiving the\n+\t\t\t\t\t * fragment\n+\t\t\t\t\t */\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    */\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+/*\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,\n+\t\t\t/**< Byte and frame count statistics */\n+\te_IOC_FM_PCD_CC_STATS_MODE_RMON,\n+\t\t\t/**< Byte and frame length range count statistics */\n+} ioc_fm_pcd_cc_stats_mode;\n+\n+/*\n+ * @Description   Enumeration type for determining the action in case an IP\n+ *\t\t  packet is larger than MTU but its DF (Don't Fragment) bit is\n+ *\t\t  set.\n+ */\n+typedef enum ioc_fm_pcd_manip_donot_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 =\n+\t\t\te_IOC_FM_PCD_MANIP_DISCARD_PACKET,\n+\t\t\t\t/**< Obsolete, cannot enqueue to error queue; In\n+\t\t\t\t * practice, selects to discard packets; Will be\n+\t\t\t\t * removed in the future\n+\t\t\t\t */\n+\te_IOC_FM_PCD_MANIP_FRAGMENT_PACKECT,\n+\t\t\t\t/**< Fragment packet and continue normal\n+\t\t\t\t * processing\n+\t\t\t\t */\n+\te_IOC_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG\n+\t\t\t\t/**< Continue normal processing without\n+\t\t\t\t * fragmenting the packet\n+\t\t\t\t */\n+} ioc_fm_pcd_manip_donot_frag_action;\n+\n+/*\n+ * @Description   Enumeration type for selecting type of special offload\n+ *\t\t  manipulation\n+ */\n+typedef enum ioc_fm_pcd_manip_special_offload_type {\n+\te_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC,\n+\t\t\t\t\t/**< IPSec offload manipulation */\n+\te_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP\n+\t\t\t\t\t/**< CAPWAP offload manipulation */\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\n+ *\t\t  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+\tioc_capwap_protocol_opt_t capwap_opt;  /**< CAPWAP options */\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\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\t/**< MPLS*/\n+\tioc_header_field_ip_t\t\tip;\t\t/**< IP\t*/\n+\tioc_header_field_ipv4_t\t\tipv4;\t\t/**< IPv4*/\n+\tioc_header_field_ipv6_t\t\tipv6;\t\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\t/**< SCTP*/\n+\tioc_header_field_dccp_t\t\tdccp;\t\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\t  A distinction unit should be defined if it will later be used\n+ *\t\t  by one or more PCD engines to distinguish between flows.\n+ *\t\t  (Must match struct t_FmPcdDistinctionUnit defined in\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_distinction_unit_t {\n+\tstruct {\n+\tioc_net_header_type\thdr;\n+\t\t\t\t/**< 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\n+ *\t\t  supported by a specific PCD Network Environment\n+ *\t\t  Characteristics module.\n+ *\n+ *\t\t  Each unit represent a protocol or a group of protocols that\n+ *\t\t  may be used later by the different PCD engines to distinguish\n+ *\t\t  between flows.\n+ *\t\t  (Must match struct t_FmPcdNetEnvParams defined in\n+ *\t\t  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 different units to be\n+\t * identified\n+\t */\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\t  creating 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/**< Ignore protocol validation */\n+\t\tioc_fm_pcd_hdr_index\thdr_index;\n+\t\t\t\t\t/**< Relevant only for MPLS, VLAN and\n+\t\t\t\t\t * tunneled IP. Otherwise should be\n+\t\t\t\t\t * cleared.\n+\t\t\t\t\t */\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\n+\t\t\t\t\t * parameters\n+\t\t\t\t\t */\n+\t\tioc_fm_pcd_from_field_t\tfrom_field;\n+\t\t\t\t\t/**< Extract bytes from field parameters\n+\t\t\t\t\t */\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;\n+\t\t\t\t\t/**< Non-header extraction source */\n+\t\tioc_fm_pcd_action\taction;\t/**< Relevant for CC Only */\n+\t\tuint16_t\tic_indx_mask;\n+\t\t\t\t/**< Relevant only for CC whenaction =\n+\t\t\t\t * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP; Note that\n+\t\t\t\t * the number of bits that are set within this\n+\t\t\t\t * mask must be log2 of the CC-node\n+\t\t\t\t * 'num_of_keys'. Note that the mask cannot be\n+\t\t\t\t * set on the lower bits.\n+\t\t\t\t */\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\t  field in the key.\n+ */\n+typedef struct ioc_fm_pcd_kg_extract_mask_t {\n+\tuint8_t\t\textract_array_index;\n+\t\t\t\t/**< Index in the extraction array, as\n+\t\t\t\t * initialized by user\n+\t\t\t\t */\n+\tuint8_t\t\toffset;\t/**< Byte offset */\n+\tuint8_t\t\tmask;\n+\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 of\n+ *\t\t  fields\n+ */\n+typedef struct ioc_fm_pcd_kg_extract_dflt_t {\n+\tioc_fm_pcd_kg_known_fields_dflt_types\ttype;\n+\t\t\t\t\t\t/**< Default type select */\n+\tioc_fm_pcd_kg_extract_dflt_select\tdflt_select;\n+\t\t\t\t\t\t/**< 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\t  generation 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\tprivate_dflt0;\n+\t\t\t\t\t/**< Scheme default register 0 */\n+\tuint32_t\t\t\tprivate_dflt1;\n+\t\t\t\t\t/**< Scheme default register 1 */\n+\tuint8_t\t\t\t\tnum_of_used_extracts;\n+\t\t\t\t\t/**< defines the valid size of the\n+\t\t\t\t\t * following array\n+\t\t\t\t\t */\n+\tioc_fm_pcd_extract_entry_t\n+\t\t\textract_array[IOC_FM_PCD_KG_MAX_EXTRACTS_PER_KEY];\n+\t\t\t\t\t/**< An array of extraction definitions.\n+\t\t\t\t\t */\n+\tuint8_t\t\t\t\tnum_of_used_dflts;\n+\t\t\t\t\t/**< defines the valid size of the\n+\t\t\t\t\t * following array\n+\t\t\t\t\t */\n+\tioc_fm_pcd_kg_extract_dflt_t\n+\t\t\t\tdflts[IOC_FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];\n+\t\t\t\t\t/**< For each extraction used in this\n+\t\t\t\t\t * scheme, specify the required default\n+\t\t\t\t\t * register to be used when header is\n+\t\t\t\t\t * not found. types not specified in\n+\t\t\t\t\t * this array will get undefined value.\n+\t\t\t\t\t */\n+\tuint8_t\t\t\t\tnum_of_used_masks;\n+\t\t\t\t\t/**< Defines the valid size of the\n+\t\t\t\t\t * following array\n+\t\t\t\t\t */\n+\tioc_fm_pcd_kg_extract_mask_t\n+\t\t\t\tmasks[IOC_FM_PCD_KG_NUM_OF_EXTRACT_MASKS];\n+\tuint8_t\t\t\t\thash_shift;\n+\t\t\t\t\t/**< Hash result right shift. Selects\n+\t\t\t\t\t * the 24 bits out of the 64 hash\n+\t\t\t\t\t * result. 0 means using the 24 LSB's,\n+\t\t\t\t\t * otherwise use the 24 LSB's after\n+\t\t\t\t\t * shifting right.\n+\t\t\t\t\t */\n+\tuint32_t\t\t\thash_dist_num_of_fqids;\n+\t\t\t\t\t/**< must be > 1 and a power of 2.\n+\t\t\t\t\t * Represents the range of queues for\n+\t\t\t\t\t * the key and hash functionality\n+\t\t\t\t\t */\n+\tuint8_t\t\t\t\thash_distribution_fqids_shift;\n+\t\t\t\t\t/**< selects the FQID bits that will be\n+\t\t\t\t\t * effected by the hash\n+\t\t\t\t\t */\n+\tbool\t\t\t\tsymmetric_hash;\n+\t\t\t\t\t/**< TRUE to generate the same hash for\n+\t\t\t\t\t * frames with swapped source and\n+\t\t\t\t\t * destination fields on all layers; If\n+\t\t\t\t\t * TRUE, driver will check that for all\n+\t\t\t\t\t * layers, if SRC extraction is\n+\t\t\t\t\t * selected, DST extraction must also be\n+\t\t\t\t\t * selected, and vice versa.\n+\t\t\t\t\t */\n+} ioc_fm_pcd_kg_key_extract_and_hash_params_t;\n+\n+/*\n+ * @Description   A structure of parameters for defining a single Qid mask\n+ *\t\t  (extracted OR).\n+ */\n+typedef struct ioc_fm_pcd_kg_extracted_or_params_t {\n+\tioc_fm_pcd_extract_type\t\ttype;\n+\t\t\t\t\t/**< Extraction type select */\n+\tunion {\n+\tstruct {\n+\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;\n+\t\t\t\t\t\t/**< Relevant only for MPLS,\n+\t\t\t\t\t\t * VLAN and tunneled IP.\n+\t\t\t\t\t\t * Otherwise should be cleared.\n+\t\t\t\t\t\t */\n+\t\tbool\t\t\t\tignore_protocol_validation;\n+\n+\t} extract_by_hdr;\n+\tioc_fm_pcd_extract_from\t\tsrc;\n+\t\t\t\t\t/**< used when type =\n+\t\t\t\t\t * e_IOC_FM_PCD_KG_EXTRACT_NON_HDR\n+\t\t\t\t\t */\n+\t} extract_params;\n+\tuint8_t\t\t\t\textraction_offset;\n+\t\t\t\t\t/**< Offset for extraction */\n+\tioc_fm_pcd_kg_extract_dflt_select\tdflt_value;\n+\t\t\t\t\t/**< Select register from which\n+\t\t\t\t\t * extraction is taken if field not\n+\t\t\t\t\t * found\n+\t\t\t\t\t */\n+\tuint8_t\t\t\t\tmask;\n+\t\t\t\t\t/**< Mask LSB byte of extraction\n+\t\t\t\t\t * (specified bits are ignored)\n+\t\t\t\t\t */\n+\n+\tuint8_t\t\t\tbit_offset_in_fqid;\n+\t\t/**< 0-31, Selects which bits of the 24 FQID bits to effect\n+\t\t * using the extracted byte; Assume byte is placed as the 8\n+\t\t * MSB's in a 32 bit word where the lower bits are the FQID; i.e\n+\t\t * if bitOffsetInFqid=1 than its LSB will effect the FQID MSB,\n+\t\t * if bitOffsetInFqid=24 than the extracted byte will effect the\n+\t\t * 8 LSB's of the FQID, if bitOffsetInFqid=31 than the byte's\n+\t\t * MSB will effect the FQID's LSB; 0 means - no effect on FQID;\n+\t\t * Note that one, and only one of bitOffsetInFqid or\n+\t\t * bitOffsetInPlcrProfile must be set (i.e, extracted byte must\n+\t\t * effect either FQID or Policer profile).\n+\t\t */\n+\tuint8_t\t\t\tbit_offset_in_plcr_profile;\n+\t\t/**< 0-15, Selects which bits of the 8 policer profile id bits\n+\t\t * to effect using the extracted byte; Assume byte is placed as\n+\t\t * the 8 MSB's in a 16 bit word where the lower bits are the\n+\t\t * policer profile id; i.e if bitOffsetInPlcrProfile=1 than its\n+\t\t * LSB will effect the profile MSB, if bitOffsetInFqid=8 than\n+\t\t * the extracted byte will effect the whole policer profile id,\n+\t\t * if bitOffsetInFqid=15 than the byte's MSB will effect the\n+\t\t * Policer Profile id's LSB; 0 means - no effect on policer\n+\t\t * profile; Note that one, and only one of bitOffsetInFqid or\n+\t\t * bitOffsetInPlcrProfile must be set (i.e, extracted byte must\n+\t\t * effect either FQID or Policer profile).\n+\t\t */\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\t\tupdate;\n+\t\t\t/**< FALSE to keep the current counter state and\n+\t\t\t * continue from that point, TRUE to update/reset the\n+\t\t\t * counter when the scheme is written.\n+\t\t\t */\n+\tuint32_t\tvalue;\n+\t\t\t/**< If update=TRUE, this value will be written into the\n+\t\t\t * counter; clear this field to reset the counter.\n+\t\t\t */\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\t/**< scheme handle */\n+} ioc_fm_pcd_kg_scheme_spc_t;\n+\n+/*\n+ * @Description   A structure for defining policer profile parameters as\n+ *\t\t  required by keygen (when policer is the next engine after this\n+ *\t\t  scheme).\n+ *\t\t  (Must match struct t_FmPcdKgPlcrProfile defined in\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_kg_plcr_profile_t {\n+\tbool\t\tshared_profile;\n+\t\t\t/**< TRUE if this profile is shared between ports (i.e.\n+\t\t\t * managed by primary partition) May not be TRUE if\n+\t\t\t * profile is after Coarse Classification\n+\t\t\t */\n+\tbool\t\tdirect;\n+\t\t\t/**< If TRUE, direct_relative_profile_id only selects\n+\t\t\t * the profile id, if FALSE\n+\t\t\t * fqid_offset_relative_profile_id_base is used together\n+\t\t\t * with fqid_offset_shift and num_of_profiles\n+\t\t\t * parameters, to define a range of profiles from which\n+\t\t\t * the KeyGen result will determine the destination\n+\t\t\t * policer profile.\n+\t\t\t */\n+\tunion {\n+\tuint16_t\tdirect_relative_profile_id;\n+\t\t\t/**< Used if 'direct' is TRUE, to select policer\n+\t\t\t * profile. This parameter should indicate the policer\n+\t\t\t * profile offset within the port's policer profiles or\n+\t\t\t * SHARED window.\n+\t\t\t */\n+\tstruct {\n+\t\tuint8_t\tfqid_offset_shift;\n+\t\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 This\n+\t\t\t * parameter should indicate the policer profile offset\n+\t\t\t * within the port's policer profiles window or SHARED\n+\t\t\t * window depends on shared_profile\n+\t\t\t */\n+\t\tuint8_t\tnum_of_profiles;\n+\t\t\t/**< Range of profiles starting at base */\n+\t} indirect_profile;\t\t/**< Indirect profile parameters */\n+\t} profile_select;\n+\t\t\t/**< Direct/indirect profile selection and parameters */\n+} ioc_fm_pcd_kg_plcr_profile_t;\n+\n+/*\n+ * @Description   Parameters for configuring a storage profile for a KeyGen\n+ *\t\t  scheme.\n+ */\n+typedef struct ioc_fm_pcd_kg_storage_profile_t {\n+\tbool\tdirect;\n+\t\t/**< If TRUE, directRelativeProfileId only selects the profile\n+\t\t * id; If FALSE, fqidOffsetRelativeProfileIdBase is used\n+\t\t * together with fqidOffsetShift and num_of_profiles parameters\n+\t\t * to define a range of profiles from which the KeyGen result\n+\t\t * will determine the destination storage profile.\n+\t\t */\n+\tunion {\n+\t\tuint16_t\tdirect_relative_profile_id;\n+\t\t/**< Used when 'direct' is TRUE, to select a storage profile;\n+\t\t * should indicate the storage profile offset within the port's\n+\t\t * storage profiles window.\n+\t\t */\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; should\n+\t\t\t * indicate the policer profile offset within the port's\n+\t\t\t * storage profiles window.\n+\t\t\t */\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+\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;\n+\t\t\t\t\t/**< CC Tree id */\n+\tuint8_t\t\t\t\tgrp_id;\n+\t\t\t\t\t/**< CC group id within the CC tree */\n+\tbool\t\t\t\tplcr_next;\n+\t\t\t\t\t/**< TRUE if after CC, in case of data\n+\t\t\t\t\t * frame, policing is required.\n+\t\t\t\t\t */\n+\tbool\t\t\t\tbypass_plcr_profile_generation;\n+\t\t\t\t\t/**< TRUE to bypass KeyGen policer\n+\t\t\t\t\t * profile generation; selected profile\n+\t\t\t\t\t * is the one set at port initialization\n+\t\t\t\t\t */\n+\tioc_fm_pcd_kg_plcr_profile_t\tplcr_profile;\n+\t\t\t\t\t/**< Valid only if plcr_next = TRUE and\n+\t\t\t\t\t * bypass_plcr_profile_generation =\n+\t\t\t\t\t * FALSE\n+\t\t\t\t\t */\n+} ioc_fm_pcd_kg_cc_t;\n+\n+/*\n+ * @Description   Parameters for defining initializing a KeyGen scheme (Must\n+ *\t\t  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;\n+\t\t/**< This scheme is reached only directly, i.e. no need for\n+\t\t * match vector; KeyGen will ignore it when matching\n+\t\t */\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 * by fm_pcd_net_env_characteristics_set()\n+\t\t */\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\t/**< use the KG Hash functionality */\n+\tioc_fm_pcd_kg_key_extract_and_hash_params_t key_ext_and_hash;\n+\t\t/**< used only if useHash = TRUE */\n+\tbool bypass_fqid_generation;\n+\t\t/**< Normally - FALSE, TRUE to avoid FQID update in the IC; In\n+\t\t * such a case FQID after KG will be the default FQID defined\n+\t\t * for the relevant port, or the FQID defined by CC in cases\n+\t\t * where CC was the previous engine.\n+\t\t */\n+\tuint32_t base_fqid;\n+\t\t/**< Base FQID; Relevant only if bypass_fqid_generation = FALSE;\n+\t\t * If hash is used and an even distribution is expected\n+\t\t * according to hash_dist_num_of_fqids, base_fqid must\n+\t\t * be aligned to hash_dist_num_of_fqids.\n+\t\t */\n+\tuint8_t num_of_used_extracted_ors;\n+\t\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\t/**< IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS registers are shared\n+\t\t * between qid_masks functionality and some of the extraction\n+\t\t * actions; Normally only some will be used for qid_mask. Driver\n+\t\t * will return error if resource is full at initialization time.\n+\t\t */\n+\tbool override_storage_profile;\n+\t\t/**< TRUE if KeyGen override previously decided storage profile\n+\t\t */\n+\tioc_fm_pcd_kg_storage_profile_t storage_profile;\n+\t\t/**< Used when override_storage_profile=TRUE */\n+\tioc_fm_pcd_engine next_engine;\n+\t\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\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;\t\t/**< Returns the scheme Id to be used */\n+} ioc_fm_pcd_kg_scheme_params_t;\n+\n+/*\n+ * @Collection\n+ */\n+#define IOC_FM_PCD_CC_STATS_MAX_FLR\t10\n+\t\t\t/* Maximal supported number of frame length ranges */\n+#define IOC_FM_PCD_CC_STATS_FLR_SIZE\t\t2\n+\t\t\t/* Size in bytes of a frame length range limit */\n+#define IOC_FM_PCD_CC_STATS_FLR_COUNT_SIZE\t4\n+\t\t\t/* 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\n+ *\t\t  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/**< Id of the next CC node */\n+} ioc_fm_pcd_cc_next_cc_params_t;\n+\n+/*\n+ * @Description   A structure for defining Frame Replicator as the next engine\n+ *\t\t  after a CC node. (Must match struct t_FmPcdCcNextFrParams\n+ *\t\t  defined in fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_cc_next_fr_params_t {\n+\tvoid *frm_replic_id;\n+\t\t\t/**< The id of the next frame replicator group */\n+} ioc_fm_pcd_cc_next_fr_params_t;\n+\n+/*\n+ * @Description   A structure for defining PLCR params when PLCR is the\n+ *\t\t  next engine after a CC node\n+ *\t\t  (Must match struct t_FmPcdCcNextPlcrParams defined in\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_cc_next_plcr_params_t {\n+\tbool\toverride_params;\n+\t\t/**< TRUE if CC override previously decided parameters*/\n+\tbool\tshared_profile;\n+\t\t/**< Relevant only if overrideParams=TRUE: TRUE if this profile\n+\t\t * is shared between ports\n+\t\t */\n+\tuint16_t\tnew_relative_profile_id;\n+\t\t/**< Relevant only if overrideParams=TRUE: (otherwise profile id\n+\t\t * is taken from keygen); This parameter should indicate the\n+\t\t * policer profile offset within the port's policer profiles or\n+\t\t * from SHARED window.\n+\t\t */\n+\tuint32_t\tnew_fqid;\n+\t\t/**< Relevant only if overrideParams=TRUE: FQID for enquing the\n+\t\t * frame; In earlier chips  if policer next engine is KEYGEN,\n+\t\t * this parameter can be 0, because the KEYGEN always decides\n+\t\t * the enqueue FQID.\n+\t\t */\n+\tuint8_t\tnew_relative_storage_profile_id;\n+\t\t/**< Indicates the relative storage profile offset within the\n+\t\t * port's storage profiles window; Relevant only if the port was\n+\t\t * configured with VSP.\n+\t\t */\n+} ioc_fm_pcd_cc_next_plcr_params_t;\n+\n+/*\n+ * @Description   A structure for defining enqueue params when BMI is the next\n+ *\t\t  engine after a CC node (Must match struct\n+ *\t\t  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;\n+\t\t\t\t/**< Action - when next engine is BMI (done) */\n+\tbool\t\t\toverride_fqid;\n+\t\t\t\t/**< TRUE if CC override previously decided fqid\n+\t\t\t\t * and vspid, relevant if action =\n+\t\t\t\t * e_IOC_FM_PCD_ENQ_FRAME\n+\t\t\t\t */\n+\tuint32_t\t\tnew_fqid;\n+\t\t\t\t/**< Valid if overrideFqid=TRUE, FQID for\n+\t\t\t\t * enqueuing the frame (otherwise FQID is taken\n+\t\t\t\t * from KeyGen), relevant if action =\n+\t\t\t\t * e_IOC_FM_PCD_ENQ_FRAME\n+\t\t\t\t */\n+\tuint8_t\t\tnew_relative_storage_profile_id;\n+\t\t\t/**< Valid if override_fqid=TRUE, Indicates the relative\n+\t\t\t * virtual storage profile offset within the port's\n+\t\t\t * storage profiles window; Relevant only if the port\n+\t\t\t * was configured with VSP.\n+\t\t\t */\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\n+ *\t\t  after a CC node (Must match struct t_FmPcdCcNextKgParams\n+ *\t\t  defined in fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_cc_next_kg_params_t {\n+\tbool\toverride_fqid;\n+\t\t/**< TRUE if CC override previously decided fqid and vspid,\n+\t\t * Note - this parameters are irrelevant for earlier chips\n+\t\t */\n+\tuint32_t   new_fqid;\n+\t\t/**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame\n+\t\t * (otherwise FQID is taken from KeyGen),\n+\t\t * Note - this parameters are irrelevant for earlier chips\n+\t\t */\n+\tuint8_t   new_relative_storage_profile_id;\n+\t\t/**< Valid if override_fqid=TRUE, Indicates the relative virtual\n+\t\t * storage profile offset within the port's storage profiles\n+\t\t * window; Relevant only if the port was configured with VSP.\n+\t\t */\n+\tvoid\t*p_direct_scheme;\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\n+ *\t\t  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;\n+\t\t\t\t/**< User has to initialize parameters according\n+\t\t\t\t * to nextEngine definition\n+\t\t\t\t */\n+\tunion {\n+\t\tioc_fm_pcd_cc_next_cc_params_t\tcc_params;\n+\t\t\t\t/**< Parameters in case next engine is CC */\n+\t\tioc_fm_pcd_cc_next_plcr_params_t\tplcr_params;\n+\t\t\t\t/**< Parameters in case next engine is PLCR */\n+\t\tioc_fm_pcd_cc_next_enqueue_params_t enqueue_params;\n+\t\t\t\t/**< Parameters in case next engine is BMI */\n+\t\tioc_fm_pcd_cc_next_kg_params_t\tkg_params;\n+\t\t\t\t/**< Parameters in case next engine is KG */\n+\t\tioc_fm_pcd_cc_next_fr_params_t\tfr_params;\n+\t\t\t\t/**< Parameters in case next engine is FR */\n+\t} params;\n+\t\t/**< Union used for all the next-engine parameters options */\n+\tvoid\t\t\t\t\t*manip_id;\n+\t\t\t\t/**< Handle to Manipulation object. Relevant if\n+\t\t\t\t * next engine is of type result\n+\t\t\t\t * (e_IOC_FM_PCD_PLCR, e_IOC_FM_PCD_KG,\n+\t\t\t\t * e_IOC_FM_PCD_DONE)\n+\t\t\t\t */\n+\tbool\t\t\t\t\tstatistics_en;\n+\t\t\t\t/**< If TRUE, statistics counters are\n+\t\t\t\t * incremented for each frame passing through\n+\t\t\t\t * this Coarse Classification entry.\n+\t\t\t\t */\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;\n+\t\t\t/**< pointer to the key of the size defined in key_size\n+\t\t\t */\n+\tuint8_t\t\t*p_mask;\n+\t\t\t/**< pointer to the Mask per key of the size defined in\n+\t\t\t * key_size. p_key and p_mask (if defined) has to be of\n+\t\t\t * the same size defined in the key_size\n+\t\t\t */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;\n+\t\t\t/**< parameters for the next for the defined Key in\n+\t\t\t * p_key\n+\t\t\t */\n+\n+} ioc_fm_pcd_cc_key_params_t;\n+\n+/*\n+ * @Description   Parameters for defining CC keys parameters\n+ *\t\t  The driver supports two methods for CC node allocation:\n+ *\t\t  dynamic and static. Static mode was created in order to\n+ *\t\t  prevent runtime alloc/free of FMan memory (MURAM), which may\n+ *\t\t  cause fragmentation; in this mode, the driver automatically\n+ *\t\t  allocates the memory according to 'max_num_of_keys' parameter.\n+ *\t\t  The driver calculates the maximal memory size that may be used\n+ *\t\t  for this CC-Node taking into consideration 'mask_support' and\n+ *\t\t  'statistics_mode' parameters. When 'action' =\n+ *\t\t  e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction\n+ *\t\t  parameters of this node, 'max_num_of_keys' must be equal to\n+ *\t\t  'num_of_keys'. In dynamic mode, 'max_num_of_keys' must be\n+ *\t\t  zero. At initialization, all required structures are allocated\n+ *\t\t  according to 'num_of_keys' parameter. During runtime\n+ *\t\t  modification, these structures are re-allocated according to\n+ *\t\t  the updated number of keys.\n+ *\t\t  Please note that 'action' and 'ic_indx_mask' mentioned in the\n+ *\t\t  specific parameter explanations are passed in the extraction\n+ *\t\t  parameters of the node (fields of\n+ *\t\t  extractccparams.extractnonhdr).\n+ */\n+typedef struct ioc_keys_params_t {\n+\tuint16_t\t\tmax_num_of_keys;\n+\t\t\t/**< Maximum number of keys that will (ever) be used in\n+\t\t\t * this CC-Node; A value of zero may be used for dynamic\n+\t\t\t * memory allocation.\n+\t\t\t */\n+\tbool\t\t\tmask_support;\n+\t\t\t/**< This parameter is relevant only if a node is\n+\t\t\t * initialized with action =\n+\t\t\t * e_IOC_FM_PCD_ACTION_EXACT_MATCH and max_num_of_keys >\n+\t\t\t * 0; Should be TRUE to reserve table memory for key\n+\t\t\t * masks, even if initial keys do not contain masks, or\n+\t\t\t * if the node was initialized as 'empty' (without\n+\t\t\t * keys); this will allow user to add keys with masks at\n+\t\t\t * runtime.\n+\t\t\t */\n+\tioc_fm_pcd_cc_stats_mode\tstatistics_mode;\n+\t\t\t/**< Determines the supported statistics mode for all\n+\t\t\t * node's keys. To enable statistics gathering,\n+\t\t\t * statistics should be enabled per every key, using\n+\t\t\t * 'statistics_en' in next engine parameters structure\n+\t\t\t * of that key; If 'max_num_of_keys' is set, all\n+\t\t\t * required structures will be preallocated for all keys\n+\t\t\t */\n+\tuint16_t\tframe_length_ranges[IOC_FM_PCD_CC_STATS_MAX_FLR];\n+\t\t/**< Relevant only for 'RMON' statistics mode (this feature is\n+\t\t * supported only on B4860 device); Holds a list of programmable\n+\t\t * thresholds. For each received frame, its length in bytes is\n+\t\t * examined against these range thresholds and the appropriate\n+\t\t * counter is incremented by 1. For example, to belong to range\n+\t\t * i, the following should hold: range i-1 threshold < frame\n+\t\t * length <= range i threshold Each range threshold must be\n+\t\t * larger then its preceding range threshold. Last range\n+\t\t * threshold must be 0xFFFF.\n+\t\t */\n+\tuint16_t\t\t\tnum_of_keys;\n+\t\t/**< Number of initial keys; Note that in case of 'action' =\n+\t\t * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP, this field should be\n+\t\t * power-of-2 of the number of bits that are set in\n+\t\t * 'ic_indx_mask'.\n+\t\t */\n+\tuint8_t\t\t\tkey_size;\n+\t\t/**< Size of key - for extraction of type FULL_FIELD, 'key_size'\n+\t\t * has to be the standard size of the selected key; For other\n+\t\t * extraction types, 'key_size' has to be as size of extraction;\n+\t\t * When 'action' = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP,\n+\t\t * 'key_size' must be 2.\n+\t\t */\n+\tioc_fm_pcd_cc_key_params_t  key_params[IOC_FM_PCD_MAX_NUM_OF_KEYS];\n+\t\t/**< An array with 'num_of_keys' entries, each entry specifies\n+\t\t * the corresponding key parameters; When 'action' =\n+\t\t * e_IOC_FM_PCD_ACTION_EXACT_MATCH, this value must not exceed\n+\t\t * 255 (IOC_FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved\n+\t\t * for the 'miss' entry.\n+\t\t */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params_for_miss;\n+\t\t/**< Parameters for defining the next engine when a key is not\n+\t\t * matched; Not relevant if action =\n+\t\t * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP.\n+\t\t */\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\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+struct fm_pcd_hash_table_params_t {\n+\tuint16_t max_num_of_keys;\n+\t\t/**< Maximum Number Of Keys that will (ever) be used in this\n+\t\t * Hash-table\n+\t\t */\n+\tioc_fm_pcd_cc_stats_mode statistics_mode;\n+\t\t/**< If not e_IOC_FM_PCD_CC_STATS_MODE_NONE, the required\n+\t\t * structures for the requested statistics mode will be\n+\t\t * allocated according to max_num_of_keys.\n+\t\t */\n+\tuint8_t kg_hash_shift;\n+\t\t/**< KG-Hash-shift as it was configured in the KG-scheme that\n+\t\t * leads to this hash-table.\n+\t\t */\n+\tuint16_t hash_res_mask;\n+\t\t/**< Mask that will be used on the hash-result; The\n+\t\t * number-of-sets for this hash will be calculated as (2^(number\n+\t\t * of bits set in 'hash_res_mask')); The 4 lower bits must be\n+\t\t * cleared.\n+\t\t */\n+\tuint8_t hash_shift;\n+\t\t/**< Byte offset from the beginning of the KeyGen hash result to\n+\t\t * the 2-bytes to be used as hash index.\n+\t\t */\n+\tuint8_t match_key_size;\n+\t\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\t/**< Parameters for defining the next engine when a key is not\n+\t\t * matched\n+\t\t */\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\n+ *\t\t  fm_pcd_hash_table_add_key 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+ *\t\t  This structure defines a CC group in terms of NetEnv units and\n+ *\t\t  the action to be taken in each case. The unit_ids list must be\n+ *\t\t  given in order from low to high indices.\n+ *\t\t  ioc_fm_pcd_cc_next_engine_params_t is a list of\n+ *\t\t  2^num_of_distinction_units structures where each defines the\n+ *\t\t  next action to be taken for each units combination. for\n+ *\t\t  example: num_of_distinction_units = 2 unit_ids = {1,3}\n+ *\t\t  next_engine_per_entries_in_grp[0] =\n+ *\t\t  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -\n+ *\t\t  not found; unit 3 - not found;\n+ *\t\t  next_engine_per_entries_in_grp[1] =\n+ *\t\t  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -\n+ *\t\t  not found; unit 3 - found;\n+ *\t\t  next_engine_per_entries_in_grp[2] =\n+ *\t\t  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -\n+ *\t\t  found; unit 3 - not found;\n+ *\t\t  next_engine_per_entries_in_grp[3] =\n+ *\t\t  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -\n+ *\t\t  found; unit 3 - found;\n+ */\n+typedef struct ioc_fm_pcd_cc_grp_params_t {\n+\tuint8_t\t\tnum_of_distinction_units;   /**< Up to 4 */\n+\tuint8_t\t\tunit_ids[IOC_FM_PCD_MAX_NUM_OF_CC_UNITS];\n+\t\t/**< Indexes of the units as defined in\n+\t\t * fm_pcd_net_env_characteristics_set()\n+\t\t */\n+\tioc_fm_pcd_cc_next_engine_params_t\n+\t\tnext_engine_per_entries_in_grp[IOC_FM_PCD_MAX_CC_ENTRY_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\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_cc_tree_params_t {\n+\tvoid\t\t*net_env_id;\n+\t\t\t/**< Id of the Network Environment as returned\n+\t\t\t * by fm_pcd_net_env_characteristics_set()\n+\t\t\t */\n+\tuint8_t\t\tnum_of_groups;\n+\t\t\t/**< Number of CC groups within the CC tree */\n+\tioc_fm_pcd_cc_grp_params_t\n+\t\t\tfm_pcd_cc_group_params[IOC_FM_PCD_MAX_NUM_OF_CC_GROUPS];\n+\t\t\t/**< Parameters for each group. */\n+\tvoid\t\t*id;\n+\t\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;\n+\t\t\t/**< Frame length selection */\n+\tioc_fm_pcd_plcr_roll_back_frame_select  roll_back_frame_selection;\n+\t\t\t/**< relevant option only e_IOC_FM_PCD_PLCR_L2_FRM_LEN,\n+\t\t\t * e_IOC_FM_PCD_PLCR_FULL_FRM_LEN\n+\t\t\t */\n+} ioc_fm_pcd_plcr_byte_rate_mode_param_t;\n+\n+/*\n+ * @Description   Parameters for defining the policer profile (based on\n+ *\t\t  RFC-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;\n+\t\t\t/**< Byte / Packet */\n+\tioc_fm_pcd_plcr_byte_rate_mode_param_t  byte_mode_param;\n+\t\t\t/**< Valid for Byte NULL for Packet */\n+\tuint32_t\t\t\t\tcommitted_info_rate;\n+\t\t\t/**< KBits/Sec or Packets/Sec */\n+\tuint32_t\t\t\t\tcommitted_burst_size;\n+\t\t\t/**< KBits or Packets */\n+\tuint32_t\t\t\t\tpeak_or_excess_info_rate;\n+\t\t\t/**< KBits/Sec or Packets/Sec */\n+\tuint32_t\t\t\t\tpeak_or_excess_burst_size;\n+\t\t\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;\n+\t\t\t\t/**< Action - when next engine is BMI (done) */\n+\tvoid\t\t\t*p_profile;\n+\t\t\t\t/**< Policer profile handle -  used when next\n+\t\t\t\t * engine is PLCR, must be a SHARED profile\n+\t\t\t\t */\n+\tvoid\t\t\t*p_direct_scheme;\n+\t\t\t\t/**< Direct scheme select - when next engine is\n+\t\t\t\t * Keygen\n+\t\t\t\t */\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;\n+\t\t\t\t/**< Type of port for this profile */\n+\tuint8_t\t\t\t\tport_id;\n+\t\t\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\n+ *\t\t  fm_pcd_ext.h)\n+ */\n+struct fm_pcd_plcr_profile_params_t {\n+\tbool modify;\n+\t\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\t/**< Type of policer profile */\n+\t\t\tioc_fm_pcd_port_params_t *p_fm_port;\n+\t\t\t\t/**< Relevant for per-port profiles only */\n+\t\t\tuint16_t relative_profile_id;\n+\t\t\t\t/**< Profile id - relative to shared group or to\n+\t\t\t\t * port\n+\t\t\t\t */\n+\t\t} new_params;\n+\t\t\t/**< Use it when modify = FALSE */\n+\t\tvoid *p_profile;\n+\t\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; the policer will\n+\t\t * re-color any incoming packet with the default value.\n+\t\t */\n+\t\tioc_fm_pcd_plcr_color override;\n+\t\t/**< For Color-Aware modes; the profile response to a pre-color\n+\t\t * value of 2'b11.\n+\t\t */\n+\t} color;\n+\n+\tioc_fm_pcd_plcr_non_passthrough_alg_param_t\n+\t\tnon_passthrough_alg_param;\n+\t\t/**< RFC2698 or RFC4115 parameters */\n+\n+\tioc_fm_pcd_engine next_engine_on_green;\n+\t\t/**< Next engine for green-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_green;\n+\t\t/**< Next engine parameters for green-colored frames */\n+\n+\tioc_fm_pcd_engine next_engine_on_yellow;\n+\t\t/**< Next engine for yellow-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_yellow;\n+\t\t/**< Next engine parameters for yellow-colored frames */\n+\n+\tioc_fm_pcd_engine next_engine_on_red;\n+\t\t/**< Next engine for red-colored frames */\n+\tioc_fm_pcd_plcr_next_engine_params_u params_on_red;\n+\t\t/**< Next engine parameters for red-colored frames */\n+\n+\tbool trap_profile_on_flow_A;\n+\t\t/**< Obsolete - do not use */\n+\tbool trap_profile_on_flow_B;\n+\t\t/**< Obsolete - do not use */\n+\tbool trap_profile_on_flow_C;\n+\t\t/**< 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\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;\n+\t\t\t/**< CC tree Id to be used */\n+\tuint8_t\t\t\t\tgrp_indx;\n+\t\t\t/**< A Group index in the tree */\n+\tuint8_t\t\t\t\tindx;\n+\t\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/**< Parameters for the next for the defined Key in the\n+\t\t\t * p_key\n+\t\t\t */\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;\n+\t\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\n+\t\t\t/**< Key index for Next Engine Params modifications;\n+\t\t\t * NOTE: This parameter is IGNORED for miss-key!\n+\t\t\t */\n+\tuint8_t\t\t\t\tkey_size;\n+\t\t\t/**< Key size of added key */\n+\tioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;\n+\t\t\t/**< parameters for the next for the defined Key in the\n+\t\t\t * p_key\n+\t\t\t */\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;\n+\t\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\n+\t\t\t/**< Key index for Next Engine Params modifications;\n+\t\t\t * NOTE: This parameter is IGNORED for miss-key!\n+\t\t\t */\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;\n+\t\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\n+\t\t\t/**< Key index for Next Engine Params modifications;\n+\t\t\t * NOTE: This parameter is IGNORED for miss-key!\n+\t\t\t */\n+\tuint8_t\t\t\t\tkey_size;\n+\t\t\t/**< Key size of added key */\n+\tioc_fm_pcd_cc_key_params_t\tkey_params;\n+\t\t\t/**< it's array with num_of_keys entries each entry in\n+\t\t\t * the array of the type ioc_fm_pcd_cc_key_params_t\n+\t\t\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;\n+\t\t\t/**< CC node Id to be used */\n+\tuint16_t\t\t\t\tkey_indx;\n+\t\t\t/**< Key index for Next Engine Params modifications;\n+\t\t\t * NOTE: This parameter is IGNORED for miss-key!\n+\t\t\t */\n+\tuint8_t\t\t\t\tkey_size;\n+\t\t\t/**< Key size of added key */\n+\tuint8_t\t\t\t\t*p_key;\n+\t\t\t/**< Pointer to the key of the size defined in key_size\n+\t\t\t */\n+\tuint8_t\t\t\t\t*p_mask;\n+\t\t\t/**< Pointer to the Mask per key of the size defined in\n+\t\t\t * key_size. p_key and p_mask (if defined) have to be of\n+\t\t\t * the same size as defined in the key_size\n+\t\t\t */\n+} ioc_fm_pcd_cc_node_modify_key_params_t;\n+\n+/*\n+ * @Description   A structure with the arguments for the\n+ *\t\t  fm_pcd_hash_table_remove_key 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\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;\n+\t\t\t/**< Relevant only for MPLS, VLAN and tunneled IP.\n+\t\t\t * Otherwise should be cleared.\n+\t\t\t */\n+\tbool\t\t\t\tby_field;\n+\t\t\t/**< TRUE if the location of manipulation is according\n+\t\t\t * to some field in the specific header\n+\t\t\t */\n+\tioc_fm_pcd_fields_u\t\tfull_field;\n+\t\t\t/**< Relevant only when by_field = TRUE: Extract field\n+\t\t\t */\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;\n+\t\t\t/**< Selection of header removal location */\n+\tunion {\n+\tioc_fm_manip_hdr_info_t\t\thdr_info;\n+\t\t/**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START\n+\t\t */\n+\tioc_fm_pcd_manip_hdr_rmv_specific_l2\tspecific_l2;\n+\t\t/**< Relevant when type = e_IOC_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;\n+\t\t * Defines which L2 headers to remove.\n+\t\t */\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;\n+\t\t/**< If length of the frame is greater than this value, IP\n+\t\t * fragmentation will be executed.\n+\t\t */\n+\tbool\t\t\tsg_bpid_en;\n+\t\t/**< Enable a dedicated buffer pool id for the Scatter/Gather\n+\t\t * buffer allocation; If disabled, the Scatter/Gather buffer\n+\t\t * will be allocated from the same pool as the received frame's\n+\t\t * buffer.\n+\t\t */\n+\tuint8_t\t\t\tsg_bpid;\n+\t\t/**< Scatter/Gather buffer pool id; This parameter is relevant\n+\t\t * when 'sg_bpid_en=TRUE'; Same LIODN number is used for these\n+\t\t * buffers as for the received frames buffers, so buffers of\n+\t\t * this pool need to be allocated in the same memory area as the\n+\t\t * received buffers. If the received buffers arrive from\n+\t\t * different sources, the Scatter/Gather BP id should be mutual\n+\t\t * to all these sources.\n+\t\t */\n+\tioc_fm_pcd_manip_donot_frag_action  donot_frag_action;\n+\t\t/**< Don't Fragment Action - If an IP packet is larger than MTU\n+\t\t * and its DF bit is set, then this field will determine the\n+\t\t * action to be taken.\n+\t\t */\n+} ioc_fm_pcd_manip_frag_ip_params_t;\n+\n+/*\n+ * @Description   Parameters for configuring IP reassembly manipulation.\n+ *\n+ *\t\t  This is a common structure for both IPv4 and IPv6 reassembly\n+ *\t\t  manipulation. For reassembly of both IPv4 and IPv6, make sure\n+ *\t\t  to set the 'hdr' field in ioc_fm_pcd_manip_reassem_params_t to\n+ *\t\t  IOC_header_type_ipv_6.\n+ */\n+typedef struct ioc_fm_pcd_manip_reassem_ip_params_t {\n+\tuint8_t\t\t\trelative_scheme_id[2];\n+\t\t\t/**< Partition relative scheme id: relativeSchemeId[0] -\n+\t\t\t * Relative scheme ID for IPV4 Reassembly manipulation;\n+\t\t\t * relativeSchemeId[1] -  Relative scheme ID for IPV6\n+\t\t\t * Reassembly manipulation; NOTE: The following comment\n+\t\t\t * is relevant only for FMAN v2 devices: Relative scheme\n+\t\t\t * ID for IPv4/IPv6 Reassembly manipulation must be\n+\t\t\t * smaller than the user schemes id to ensure that the\n+\t\t\t * reassembly's schemes will be first match. The\n+\t\t\t * remaining schemes, if defined, should have higher\n+\t\t\t * relative scheme ID.\n+\t\t\t */\n+\tuint32_t\t\t\tnon_consistent_sp_fqid;\n+\t\t\t/**< In case that other fragments of the frame\n+\t\t\t * corresponds to different storage profile than the\n+\t\t\t * opening fragment (Non-Consistent-SP state) then one\n+\t\t\t * of two possible scenarios occurs: if\n+\t\t\t * 'nonConsistentSpFqid != 0', the reassembled frame\n+\t\t\t * will be enqueued to this fqid, otherwise a 'Non\n+\t\t\t * Consistent SP' bit will be set in the FD[status].\n+\t\t\t */\n+\tuint8_t\t\t\t\tdata_mem_id;\n+\t\t\t/**< Memory partition ID for the IPR's external tables\n+\t\t\t * structure\n+\t\t\t */\n+\tuint16_t\t\t\tdata_liodn_offset;\n+\t\t\t/**< LIODN offset for access the IPR's external tables\n+\t\t\t * structure.\n+\t\t\t */\n+\tuint16_t\t\t\tmin_frag_size[2];\n+\t\t\t/**< Minimum fragment size: minFragSize[0] - for ipv4,\n+\t\t\t * minFragSize[1] - for ipv6\n+\t\t\t */\n+\tioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry[2];\n+\t\t\t/**< Number of frames per hash entry needed for\n+\t\t\t * reassembly process: num_of_frames_per_hash_entry[0] -\n+\t\t\t * for ipv4 (max value is\n+\t\t\t * e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH);\n+\t\t\t * num_of_frames_per_hash_entry[1] - for ipv6 (max value\n+\t\t\t * is e_IOC_FM_PCD_MANIP_SIX_WAYS_HASH).\n+\t\t\t */\n+\tuint16_t\t\t\tmax_num_frames_in_process;\n+\t\t\t/**< Number of frames which can be processed by\n+\t\t\t * Reassembly in the same time; Must be power of 2; In\n+\t\t\t * the case num_of_frames_per_hash_entry ==\n+\t\t\t * e_IOC_FM_PCD_MANIP_FOUR_WAYS_HASH,\n+\t\t\t * max_num_frames_in_process has to be in the range of\n+\t\t\t * 4 - 512; In the case num_of_frames_per_hash_entry ==\n+\t\t\t * e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH,\n+\t\t\t * max_num_frames_in_process has to be in the range of\n+\t\t\t * 8 - 2048.\n+\t\t\t */\n+\tioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;\n+\t\t\t/**< Expiration delay initialized by Reassembly process\n+\t\t\t */\n+\tuint32_t\t\t\tfqid_for_time_out_frames;\n+\t\t\t/**< FQID in which time out frames will enqueue during\n+\t\t\t * Time Out Process\n+\t\t\t */\n+\tuint32_t\t\t\ttimeout_threshold_for_reassm_process;\n+\t\t\t/**< Represents the time interval in microseconds which\n+\t\t\t * defines if opened frame (at least one fragment was\n+\t\t\t * processed but not all the fragments)is found as too\n+\t\t\t * old\n+\t\t\t */\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;\n+\t\t\t/**< TRUE if being used in decryption direction;\n+\t\t\t * FALSE if being used in encryption direction.\n+\t\t\t */\n+\tbool\tecn_copy;\n+\t\t\t/**< TRUE to copy the ECN bits from inner/outer to\n+\t\t\t * outer/inner (direction depends on the 'decryption'\n+\t\t\t * field).\n+\t\t\t */\n+\tbool\tdscp_copy;\n+\t\t\t/**< TRUE to copy the DSCP bits from inner/outer to\n+\t\t\t * outer/inner (direction depends on the 'decryption'\n+\t\t\t * field).\n+\t\t\t */\n+\tbool\tvariable_ip_hdr_len;\n+\t\t\t/**< TRUE for supporting variable IP header length in\n+\t\t\t * decryption.\n+\t\t\t */\n+\tbool\tvariable_ip_version;\n+\t\t\t/**< TRUE for supporting both IP version on the same SA\n+\t\t\t * in encryption\n+\t\t\t */\n+\tuint8_t outer_ip_hdr_len;\n+\t\t\t/**< If 'variable_ip_version == TRUE' than this field\n+\t\t\t * must be set to non-zero value; It is specifies the\n+\t\t\t * length of the outer IP header that was configured in\n+\t\t\t * the corresponding SA.\n+\t\t\t */\n+\tuint16_t\tarw_size;\n+\t\t\t/**< if <> '0' then will perform ARW check for this SA;\n+\t\t\t * The value must be a multiplication of 16\n+\t\t\t */\n+\tvoid\t*arw_addr;\n+\t\t\t/**< if arwSize <> '0' then this field must be set to\n+\t\t\t * non-zero value; MUST be allocated from FMAN's MURAM\n+\t\t\t * that the post-sec op-port belong Must be 4B aligned.\n+\t\t\t * Required MURAM size is\n+\t\t\t * '(NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes\n+\t\t\t */\n+} ioc_fm_pcd_manip_special_offload_ipsec_params_t;\n+\n+/*\n+ * @Description   Parameters for configuring CAPWAP fragmentation manipulation\n+ *\n+ *\t\t  Restrictions:\n+ *\t\t  - Maximum number of fragments per frame is 16.\n+ *\t\t  - Transmit confirmation is not supported.\n+ *\t\t  - Fragmentation nodes must be set as the last PCD action (i.e.\n+ *\t\t    the corresponding CC node key must have next engine set to\n+ *\t\t    e_FM_PCD_DONE).\n+ *\t\t  - Only BMan buffers shall be used for frames to be fragmented.\n+ *\t\t  - NOTE: The following comment is relevant only for FMAN v3\n+ *\t\t    devices: IPF does not support VSP. Therefore, on the same\n+ *\t\t    port where we have IPF we cannot support VSP.\n+ */\n+typedef struct ioc_fm_pcd_manip_frag_capwap_params_t {\n+\tuint16_t\tsize_for_fragmentation;\n+\t\t\t/**< If length of the frame is greater than this value,\n+\t\t\t * CAPWAP fragmentation will be executed.\n+\t\t\t */\n+\tbool\t\tsg_bpid_en;\n+\t\t\t/**< Enable a dedicated buffer pool id for the\n+\t\t\t * Scatter/Gather buffer allocation; If disabled, the\n+\t\t\t * Scatter/Gather buffer will be allocated from the same\n+\t\t\t * pool as the received frame's buffer.\n+\t\t\t */\n+\tuint8_t\t\tsg_bpid;\n+\t\t\t/**< Scatter/Gather buffer pool id; This parameters is\n+\t\t\t * relevant when 'sg_bpidEn=TRUE'; Same LIODN number is\n+\t\t\t * used for these buffers as for the received frames\n+\t\t\t * buffers, so buffers of this pool need to be allocated\n+\t\t\t * in the same memory area as the received buffers. If\n+\t\t\t * the received buffers arrive from different sources,\n+\t\t\t * the Scatter/Gather BP id should be mutual to all\n+\t\t\t * these sources.\n+\t\t\t */\n+\tbool\tcompress_mode_en;\n+\t\t\t/**< CAPWAP Header Options Compress Enable mode; When\n+\t\t\t * this mode is enabled then only the first fragment\n+\t\t\t * include the CAPWAP header options field (if user\n+\t\t\t * provides it in the input frame) and all other\n+\t\t\t * fragments exclude the CAPWAP options field (CAPWAP\n+\t\t\t * header is updated accordingly).\n+\t\t\t */\n+} ioc_fm_pcd_manip_frag_capwap_params_t;\n+\n+/*\n+ * @Description   Parameters for configuring CAPWAP reassembly manipulation.\n+ *\n+ *\t\t  Restrictions:\n+ *\t\t  - Application must define one scheme to catch the reassembled\n+ *\t\t    frames.\n+ *\t\t  - Maximum number of fragments per frame is 16.\n+ */\n+typedef struct ioc_fm_pcd_manip_reassem_capwap_params_t {\n+\tuint8_t\t\trelative_scheme_id;\n+\t\t\t/**< Partition relative scheme id; NOTE: this id must be\n+\t\t\t * smaller than the user schemes id to ensure that the\n+\t\t\t * reassembly scheme will be first match; Rest schemes,\n+\t\t\t * if defined, should have higher relative scheme ID.\n+\t\t\t */\n+\tuint8_t\t\tdata_mem_id;\n+\t\t\t/**< Memory partition ID for the IPR's external tables\n+\t\t\t * structure\n+\t\t\t */\n+\tuint16_t\tdata_liodn_offset;\n+\t\t\t/**< LIODN offset for access the IPR's external tables\n+\t\t\t * structure.\n+\t\t\t */\n+\tuint16_t\tmax_reassembled_frame_length;\n+\t\t\t/**< The maximum CAPWAP reassembled frame length in\n+\t\t\t * bytes; If maxReassembledFrameLength == 0, any\n+\t\t\t * successful reassembled frame length is considered as\n+\t\t\t * a valid length; if maxReassembledFrameLength > 0, a\n+\t\t\t * successful reassembled frame which its length exceeds\n+\t\t\t * this value is considered as an error frame (FD\n+\t\t\t * status[CRE] bit is set).\n+\t\t\t */\n+\tioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry;\n+\t\t\t/**< Number of frames per hash entry needed for\n+\t\t\t * reassembly process\n+\t\t\t */\n+\tuint16_t\tmax_num_frames_in_process;\n+\t\t\t/**< Number of frames which can be processed by\n+\t\t\t * reassembly in the same time; Must be power of 2; In\n+\t\t\t * the case num_of_frames_per_hash_entry ==\n+\t\t\t * e_FM_PCD_MANIP_FOUR_WAYS_HASH,\n+\t\t\t * max_num_frames_in_process has to be in the range of\n+\t\t\t * 4 - 512; In the case num_of_frames_per_hash_entry ==\n+\t\t\t * e_FM_PCD_MANIP_EIGHT_WAYS_HASH,\n+\t\t\t * max_num_frames_in_process has to be in the range of\n+\t\t\t * 8 - 2048.\n+\t\t\t */\n+\tioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;\n+\t\t\t/**< Expiration delay initialized by Reassembly process\n+\t\t\t */\n+\tuint32_t\tfqid_for_time_out_frames;\n+\t\t\t/**< FQID in which time out frames will enqueue during\n+\t\t\t * Time Out Process; Recommended value for this field is\n+\t\t\t * 0; in this way timed-out frames will be discarded\n+\t\t\t */\n+\tuint32_t\ttimeout_threshold_for_reassm_process;\n+\t\t\t/**< Represents the time interval in microseconds which\n+\t\t\t * defines if opened frame (at least one fragment was\n+\t\t\t * processed but not all the fragments)is found as too\n+\t\t\t * old\n+\t\t\t */\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;\n+\t\t\t/**< TRUE if continue to SEC DTLS encryption */\n+\tioc_fm_pcd_manip_hdr_qos_src   qos_src;\n+\t\t\t/**< TODO */\n+} ioc_fm_pcd_manip_special_offload_capwap_params_t;\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\t/**< Parameters for IPSec; Relevant when type =\n+\t\t * e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC\n+\t\t */\n+\n+\tioc_fm_pcd_manip_special_offload_capwap_params_t capwap;\n+\t\t/**< Parameters for CAPWAP; Relevant when type =\n+\t\t * e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP\n+\t\t */\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\n+\t\t * the removal\n+\t\t */\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\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;\n+\t\t\t/**< Offset from beginning of header to the start\n+\t\t\t * location of the insertion\n+\t\t\t */\n+\tuint8_t\t\t\tsize;\t/**< Size of inserted section */\n+\tbool\t\t\treplace;\n+\t\t\t/**< TRUE to override (replace) existing data at\n+\t\t\t * 'offset', FALSE to insert\n+\t\t\t */\n+\tuint8_t\t\t\t*p_data;\n+\t\t\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\n+ *\t\t  translation\n+ */\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t {\n+\tuint8_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; The index is\n+\t\t * the D_SCP value (0-0x3F) and the value is the corresponding\n+\t\t * VPRI (0-15).\n+\t\t */\n+\tuint8_t\t\tvpri_def_val;\n+\t\t/**< 0-7, Relevant only if update_type =\n+\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN, this field\n+\t\t * is the Q Tag default value if the IP header is not found.\n+\t\t */\n+} ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t;\n+\n+/*\n+ * @Description   Parameters for defining header manipulation VLAN fields\n+ *\t\t  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;\n+\t\t/**< Selects VLAN update type */\n+\tunion {\n+\tuint8_t\t\t\t\t\tvpri;\n+\t\t/**< 0-7, Relevant only if If update_type =\n+\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this is the new\n+\t\t * VLAN pri.\n+\t\t */\n+\tioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t\tdscp_to_vpri;\n+\t\t/**<  Parameters structure, Relevant only if update_type =\n+\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN.\n+\t\t */\n+\t} u;\n+} ioc_fm_pcd_manip_hdr_field_update_vlan_t;\n+\n+/*\n+ * @Description   Parameters for defining header manipulation IPV4 fields\n+ *\t\t  updates\n+ */\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv4_t {\n+\tioc_ipv4_hdr_manip_update_flags_t\tvalid_updates;\n+\t\t\t/**< ORed flag, selecting the required updates */\n+\tuint8_t\t\ttos;\n+\t\t\t/**< 8 bit New TOS; Relevant if valid_updates contains\n+\t\t\t * IOC_HDR_MANIP_IPV4_TOS\n+\t\t\t */\n+\tuint16_t\tid;\n+\t\t\t/**< 16 bit New IP ID; Relevant only if\n+\t\t\t * valid_updates contains IOC_HDR_MANIP_IPV4_ID\n+\t\t\t */\n+\tuint32_t\tsrc;\n+\t\t\t/**< 32 bit New IP SRC; Relevant only if\n+\t\t\t * valid_updates contains IOC_HDR_MANIP_IPV4_SRC\n+\t\t\t */\n+\tuint32_t\tdst;\n+\t\t\t/**< 32 bit New IP DST; Relevant only if\n+\t\t\t * valid_updates contains IOC_HDR_MANIP_IPV4_DST\n+\t\t\t */\n+} ioc_fm_pcd_manip_hdr_field_update_ipv4_t;\n+\n+/*\n+ * @Description   Parameters for defining header manipulation IPV6 fields\n+ *\t\t  updates\n+ */\n+typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv6_t {\n+\tioc_ipv6_hdr_manip_update_flags_t\tvalid_updates;\n+\t\t\t/**< ORed flag, selecting the required updates */\n+\tuint8_t\t\ttraffic_class;\n+\t\t\t/**< 8 bit New Traffic Class; Relevant if valid_updates\n+\t\t\t * contains IOC_HDR_MANIP_IPV6_TC\n+\t\t\t */\n+\tuint8_t\t\tsrc[ioc_net_hf_ipv6_addr_size];\n+\t\t\t/**< 16 byte new IP SRC; Relevant only if valid_updates\n+\t\t\t * contains IOC_HDR_MANIP_IPV6_SRC\n+\t\t\t */\n+\tuint8_t\t\tdst[ioc_net_hf_ipv6_addr_size];\n+\t\t\t/**< 16 byte new IP DST; Relevant only if valid_updates\n+\t\t\t * contains IOC_HDR_MANIP_IPV6_DST\n+\t\t\t */\n+} ioc_fm_pcd_manip_hdr_field_update_ipv6_t;\n+\n+/*\n+ * @Description   Parameters for defining header manipulation TCP/UDP fields\n+ *\t\t  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;\n+\t\t\t/**< ORed flag, selecting the required updates */\n+\tuint16_t\tsrc;\n+\t\t\t/**< 16 bit New TCP/UDP SRC; Relevant only if\n+\t\t\t * valid_updates contains IOC_HDR_MANIP_TCP_UDP_SRC\n+\t\t\t */\n+\tuint16_t\tdst;\n+\t\t\t/**< 16 bit New TCP/UDP DST; Relevant only if\n+\t\t\t * valid_updates contains IOC_HDR_MANIP_TCP_UDP_DST\n+\t\t\t */\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;\n+\t\t\t/**< Type of header field update manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_field_update_vlan_t\tvlan;\n+\t\t\t/**< Parameters for VLAN update. Relevant when type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_field_update_ipv4_t\tipv4;\n+\t\t\t/**< Parameters for IPv4 update. Relevant when type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_field_update_ipv6_t\tipv6;\n+\t\t\t/**< Parameters for IPv6 update. Relevant when type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_field_update_tcp_udp_t tcp_udp;\n+\t\t\t/**< Parameters for TCP/UDP update. Relevant when type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP\n+\t\t\t */\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\n+ *\t\t  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;\n+\t\t\t/**< Selects replace update type */\n+\tbool\tdec_ttl_hl;\n+\t\t\t/**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1 */\n+\tbool\tupdate_ipv4_id;\n+\t\t\t/**< Relevant when replace_type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4\n+\t\t\t */\n+\tuint16_t id;\n+\t\t/**< 16 bit New IP ID; Relevant only if update_ipv4_id = TRUE */\n+\tuint8_t\thdr_size;\n+\t\t\t/**< The size of the new IP header */\n+\tuint8_t\thdr[IOC_FM_PCD_MANIP_MAX_HDR_SIZE];\n+\t\t\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/**< 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/**< 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;\n+\t\t\t/**< Selects which L2 headers to insert */\n+\tbool\t\t\t\t\tupdate;\n+\t\t\t/**< TRUE to update MPLS header */\n+\tuint8_t\t\t\t\tsize;\n+\t\t\t/**< size of inserted section */\n+\tuint8_t\t\t\t\t*p_data;\n+\t\t\t/**< data to be inserted */\n+} ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t;\n+\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;\n+\t\t\t/**< Calculate L4 checksum. */\n+\tioc_fm_pcd_manip_hdr_qos_mapping_mode   mapping_mode;\n+\t\t\t/**< TODO */\n+\tuint8_t last_pid_offset;\n+\t\t\t/**< the offset of the last Protocol within the inserted\n+\t\t\t * header\n+\t\t\t */\n+\tuint16_t  id;\t/**< 16 bit New IP ID */\n+\tbool\tdonot_frag_overwrite;\n+\t\t\t/**< IPv4 only. DF is overwritten with the hash-result\n+\t\t\t * next-to-last byte. This byte is configured to be\n+\t\t\t * overwritten when RPD is set.\n+\t\t\t */\n+\tuint8_t\tlast_dst_offset;\n+\t\t\t/**< IPv6 only. if routing extension exist, user should\n+\t\t\t * set the offset of the destination address in order\n+\t\t\t * to calculate UDP checksum pseudo header; Otherwise\n+\t\t\t * set it to '0'.\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_insrt_t insrt;\n+\t\t\t/**< size and data to be inserted. */\n+} ioc_fm_pcd_manip_hdr_insrt_ip_params_t;\n+\n+/*\n+ * @Description   Parameters for defining header insertion manipulation by\n+ *\t\t  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;\n+\t\t\t/**< Selects manipulation type */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t  specific_l2_params;\n+\t\t\t/**< Used when type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2: Selects\n+\t\t\t * which L2 headers to remove\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_insrt_ip_params_t\tip_params;\n+\t\t\t/**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */\n+\tioc_fm_pcd_manip_hdr_insrt_t\t\tinsrt;\n+\t\t\t/**< Used when type is one of\n+\t\t\t * e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,\n+\t\t\t * e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or\n+\t\t\t * e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP\n+\t\t\t */\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;\n+\t\t\t/**< Type of insertion manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t\tby_hdr;\n+\t\t\t/**< Parameters for defining header insertion\n+\t\t\t * manipulation by header type, relevant if 'type' =\n+\t\t\t * e_IOC_FM_PCD_MANIP_INSRT_BY_HDR\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_insrt_generic_params_t\tgeneric;\n+\t\t\t/**< Parameters for defining generic header insertion\n+\t\t\t * manipulation, relevant if type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_INSRT_GENERIC\n+\t\t\t */\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;\n+\t\t\t/**< Type of header removal manipulation */\n+\tunion {\n+\tioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t   by_hdr;\n+\t\t\t/**< Parameters for defining header removal manipulation\n+\t\t\t * by header type, relevant if type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_RMV_BY_HDR\n+\t\t\t */\n+\tioc_fm_pcd_manip_hdr_rmv_generic_params_t  generic;\n+\t\t\t/**< Parameters for defining generic header removal\n+\t\t\t * manipulation, relevant if type =\n+\t\t\t * e_IOC_FM_PCD_MANIP_RMV_GENERIC\n+\t\t\t */\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;\n+\t\t\t/**< TRUE, to define removal manipulation */\n+\tioc_fm_pcd_manip_hdr_rmv_params_t\trmv_params;\n+\t\t\t/**< Parameters for removal manipulation, relevant if\n+\t\t\t * 'rmv' = TRUE\n+\t\t\t */\n+\n+\tbool\t\t\t\t\tinsrt;\n+\t\t\t/**< TRUE, to define insertion manipulation */\n+\tioc_fm_pcd_manip_hdr_insrt_params_t\tinsrt_params;\n+\t\t\t/**< Parameters for insertion manipulation, relevant if\n+\t\t\t * 'insrt' = TRUE\n+\t\t\t */\n+\n+\tbool\t\t\t\t\tfield_update;\n+\t\t\t/**< TRUE, to define field update manipulation */\n+\tioc_fm_pcd_manip_hdr_field_update_params_t  field_update_params;\n+\t\t\t/**< Parameters for field update manipulation, relevant\n+\t\t\t * if 'fieldUpdate' = TRUE\n+\t\t\t */\n+\n+\tbool\t\t\t\t\tcustom;\n+\t\t\t/**< TRUE, to define custom manipulation */\n+\tioc_fm_pcd_manip_hdr_custom_params_t\tcustom_params;\n+\t\t\t/**< Parameters for custom manipulation, relevant if\n+\t\t\t * 'custom' = TRUE\n+\t\t\t */\n+\n+\tbool\t\t\t\tdonot_parse_after_manip;\n+\t\t\t/**< FALSE to activate the parser a second time after\n+\t\t\t * completing the manipulation on the frame\n+\t\t\t */\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;\n+\t\t\t/**< Header selection */\n+\tunion {\n+\tioc_fm_pcd_manip_frag_capwap_params_t\tcapwap_frag;\n+\t\t\t/**< Parameters for defining CAPWAP fragmentation,\n+\t\t\t * relevant if 'hdr' = HEADER_TYPE_CAPWAP\n+\t\t\t */\n+\tioc_fm_pcd_manip_frag_ip_params_t   ip_frag;\n+\t\t\t/**< Parameters for defining IP fragmentation, relevant\n+\t\t\t * if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6\n+\t\t\t */\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;\n+\t\t\t/**< Header selection */\n+\tunion {\n+\tioc_fm_pcd_manip_reassem_capwap_params_t capwap_reassem;\n+\t\t\t/**< Parameters for defining CAPWAP reassembly, relevant\n+\t\t\t * if 'hdr' = HEADER_TYPE_CAPWAP\n+\t\t\t */\n+\tioc_fm_pcd_manip_reassem_ip_params_t\tip_reassem;\n+\t\t\t/**< Parameters for defining IP reassembly, relevant if\n+\t\t\t * 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6\n+\t\t\t */\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\t/**< Selects type of manipulation node */\n+\tunion {\n+\t\tioc_fm_pcd_manip_hdr_params_t hdr;\n+\t\t\t/**< Parameters for defining header manipulation node */\n+\t\tioc_fm_pcd_manip_reassem_params_t reassem;\n+\t\t\t/**< Parameters for defining reassembly manipulation\n+\t\t\t * node\n+\t\t\t */\n+\t\tioc_fm_pcd_manip_frag_params_t frag;\n+\t\t\t/**< Parameters for defining fragmentation manipulation\n+\t\t\t * node\n+\t\t\t */\n+\t\tioc_fm_pcd_manip_special_offload_params_t special_offload;\n+\t\t\t/**< Parameters for defining special offload\n+\t\t\t * manipulation node\n+\t\t\t */\n+\t} u;\n+\tvoid *p_next_manip;\n+\t\t/**< Handle to another (previously defined) manipulation node;\n+\t\t * Allows concatenation of manipulation actions. This parameter\n+\t\t * is optional and may be NULL.\n+\t\t */\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;\n+\t\t/**< Counts the number of TimeOut occurrences */\n+\tuint32_t\trfd_pool_busy;\n+\t\t/**< Counts the number of failed attempts to allocate a\n+\t\t * Reassembly Frame Descriptor\n+\t\t */\n+\tuint32_t\tinternal_buffer_busy;\n+\t\t/**< Counts the number of times an internal buffer busy occurred\n+\t\t */\n+\tuint32_t\texternal_buffer_busy;\n+\t\t/**< Counts the number of times external buffer busy occurred */\n+\tuint32_t\tsg_fragments;\n+\t\t/**< Counts the number of Scatter/Gather fragments */\n+\tuint32_t\tdma_semaphore_depletion;\n+\t\t/**< Counts the number of failed attempts to allocate a DMA\n+\t\t * semaphore\n+\t\t */\n+\tuint32_t\tnon_consistent_sp;\n+\t\t/**< Counts the number of Non Consistent Storage Profile events\n+\t\t * for successfully reassembled frames\n+\t\t */\n+struct {\n+\tuint32_t\tsuccessfully_reassembled;\n+\t\t/**< Counts the number of successfully reassembled frames */\n+\tuint32_t\tvalid_fragments;\n+\t\t/**< Counts the total number of valid fragments that have been\n+\t\t * processed for all frames\n+\t\t */\n+\tuint32_t\tprocessed_fragments;\n+\t\t/**< Counts the number of processed fragments (valid and error\n+\t\t * fragments) for all frames\n+\t\t */\n+\tuint32_t\tmalformed_fragments;\n+\t\t/**< Counts the number of malformed fragments processed for all\n+\t\t * frames\n+\t\t */\n+\tuint32_t\tdiscarded_fragments;\n+\t\t/**< Counts the number of fragments discarded by the reassembly\n+\t\t * process\n+\t\t */\n+\tuint32_t\tauto_learn_busy;\n+\t\t/**< Counts the number of times a busy condition occurs when\n+\t\t * attempting to access an IP-Reassembly Automatic Learning Hash\n+\t\t * set\n+\t\t */\n+\tuint32_t\tmore_than16fragments;\n+\t\t/**< Counts the fragment occurrences in which the number of\n+\t\t * fragments-per-frame exceeds 16\n+\t\t */\n+\t} specific_hdr_statistics[2];\n+\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;\n+\t\t\t/**< Number of frames that passed through the\n+\t\t\t * manipulation node\n+\t\t\t */\n+\tuint32_t\tfragmented_frames;\n+\t\t\t/**< Number of frames that were fragmented */\n+\tuint32_t\tgenerated_fragments;\n+\t\t\t/**< Number of fragments that were generated */\n+} ioc_fm_pcd_manip_frag_ip_stats_t;\n+\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;\n+\t\t\t/**< Counts the number of timeout occurrences */\n+\tuint32_t\trfd_pool_busy;\n+\t\t\t/**< Counts the number of failed attempts to allocate a\n+\t\t\t * Reassembly Frame Descriptor\n+\t\t\t */\n+\tuint32_t\tinternal_buffer_busy;\n+\t\t\t/**< Counts the number of times an internal buffer busy\n+\t\t\t * occurred\n+\t\t\t */\n+\tuint32_t\texternal_buffer_busy;\n+\t\t\t/**< Counts the number of times external buffer busy\n+\t\t\t * occurred\n+\t\t\t */\n+\tuint32_t\tsg_fragments;\n+\t\t\t/**< Counts the number of Scatter/Gather fragments */\n+\tuint32_t\tdma_semaphore_depletion;\n+\t\t\t/**< Counts the number of failed attempts to allocate a\n+\t\t\t * DMA semaphore\n+\t\t\t */\n+\tuint32_t\tsuccessfully_reassembled;\n+\t\t\t/**< Counts the number of successfully reassembled\n+\t\t\t * frames\n+\t\t\t */\n+\tuint32_t\tvalid_fragments;\n+\t\t\t/**< Counts the total number of valid fragments that\n+\t\t\t * have been processed for all frames\n+\t\t\t */\n+\tuint32_t\tprocessed_fragments;\n+\t\t\t/**< Counts the number of processed fragments (valid and\n+\t\t\t * error fragments) for all frames\n+\t\t\t */\n+\tuint32_t\tmalformed_fragments;\n+\t\t\t/**< Counts the number of malformed fragments processed\n+\t\t\t * for all frames\n+\t\t\t */\n+\tuint32_t\tauto_learn_busy;\n+\t\t\t/**< Counts the number of times a busy condition occurs\n+\t\t\t * when attempting to access an Reassembly Automatic\n+\t\t\t * Learning Hash set\n+\t\t\t */\n+\tuint32_t\tdiscarded_fragments;\n+\t\t\t/**< Counts the number of fragments discarded by the\n+\t\t\t * reassembly process\n+\t\t\t */\n+\tuint32_t\tmore_than16fragments;\n+\t\t\t/**< Counts the fragment occurrences in which the number\n+\t\t\t * of fragments-per-frame exceeds 16\n+\t\t\t */\n+\tuint32_t\texceed_max_reassembly_frame_len;\n+\t\t\t/**< ounts the number of times that a successful\n+\t\t\t * reassembled frame length exceeds\n+\t\t\t * MaxReassembledFrameLength value\n+\t\t\t */\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;\n+\t\t\t/**< Number of frames that passed through the\n+\t\t\t * manipulation node\n+\t\t\t */\n+\tuint32_t\tfragmented_frames;\n+\t\t\t/**< Number of frames that were fragmented */\n+\tuint32_t\tgenerated_fragments;\n+\t\t\t/**< Number of fragments that were generated */\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+\tuint8_t\tsg_allocation_failure;\n+\t\t\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+\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;\n+\t\t\t/**< Structure for IP reassembly statistics */\n+\tioc_fm_pcd_manip_reassem_capwap_stats_t  capwap_reassem;\n+\t\t\t/**< Structure for CAPWAP reassembly statistics */\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;\n+\t\t\t/**< Structure for IP fragmentation statistics */\n+\tioc_fm_pcd_manip_frag_capwap_stats_t capwap_frag;\n+\t\t\t/**< Structure for CAPWAP fragmentation statistics */\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;\n+\t\t\t\t/**< Structure for reassembly statistics */\n+\tioc_fm_pcd_manip_frag_stats_t\tfrag;\n+\t\t\t\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+/*\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;\n+\t\t\t\t/**< Maximal number of members in the group -\n+\t\t\t\t * must be at least two\n+\t\t\t\t */\n+\tuint8_t\t\t\tnum_of_entries;\n+\t\t\t\t/**< Number of members in the group - must be at\n+\t\t\t\t * least 1\n+\t\t\t\t */\n+\tioc_fm_pcd_cc_next_engine_params_t\n+\t\tnext_engine_params[IOC_FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];\n+\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+\n+\n+typedef struct ioc_fm_pcd_cc_key_statistics_t {\n+\tuint32_t\tbyte_count;\n+\t\t\t/**< This counter reflects byte count of frames that\n+\t\t\t * were matched by this key.\n+\t\t\t */\n+\tuint32_t\tframe_count;\n+\t\t\t/**< This counter reflects count of frames that were\n+\t\t\t * matched by this key.\n+\t\t\t */\n+\tuint32_t\tframe_length_range_count[IOC_FM_PCD_CC_STATS_MAX_FLR];\n+\t\t\t/**< These counters reflect how many frames matched this\n+\t\t\t * key in 'RMON' statistics mode: Each counter holds the\n+\t\t\t * number of frames of a specific frames length range,\n+\t\t\t * according to the ranges provided at initialization.\n+\t\t\t */\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\t  fm_pcd_match_table_get_key_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of\n+ *\t\t  specific key in a CC Node.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames passed that were\n+ *\t\t  matched this key; The total frames count will be returned in\n+ *\t\t  the counter of the first range (as only one frame length range\n+ *\t\t  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for\n+ *\t\t  this node, the total frame count will be separated to frame\n+ *\t\t  length counters, based on provided frame length ranges.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_index\t\tKey index for adding\n+ * @Param[out]\t  p_key_statistics\tKey statistics counters\n+ *\n+ * @Return\t  The specific key statistics.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), \\\n+\t\t      ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_miss_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of miss\n+ *\t\t  entry in a CC Node.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames were not matched\n+ *\t\t  to any existing key and therefore passed through the miss\n+ *\t\t  entry; The total frames count will be returned in the counter\n+ *\t\t  of the first range (as only one frame length range was\n+ *\t\t  defined).\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[out]\t  p_miss_statistics\tStatistics counters for 'miss'\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+\n+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), \\\n+\t\t      ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_get_miss_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of 'miss'\n+ *\t\t  entry of the a hash table.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames were not matched\n+ *\t\t  to any existing key and therefore passed through the miss\n+ *\t\t  entry;\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\tA handle to a hash table\n+ * @Param[out]\t  p_miss_statistics\tStatistics counters for 'miss'\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), \\\n+\t\t      ioc_fm_pcd_cc_tbl_get_stats_t)\n+\n+/*\n+ * @Function\t  fm_pcd_net_env_characteristics_set\n+ *\n+ * @Description   Define a set of Network Environment Characteristics.\n+ *\n+ *\t\t  When setting an environment it is important to understand its\n+ *\t\t  application. It is not meant to describe the flows that will\n+ *\t\t  run on the ports using this environment, but what the user\n+ *\t\t  means TO DO with the PCD mechanisms in order to\n+ *\t\t  parse-classify-distribute those frames.\n+ *\t\t  By specifying a distinction unit, the user means it would use\n+ *\t\t  that option for distinction between frames at either a KeyGen\n+ *\t\t  scheme or a coarse classification action descriptor. Using\n+ *\t\t  interchangeable headers to define a unit means that the user\n+ *\t\t  is indifferent to which of the interchangeable headers is\n+ *\t\t  present in the frame, and wants the distinction to be based on\n+ *\t\t  the presence of either one of them.\n+ *\n+ *\t\t  Depending on context, there are limitations to the use of\n+ *\t\t  environments. A port using the PCD functionality is bound to\n+ *\t\t  an environment. Some or even all ports may share an\n+ *\t\t  environment but also an environment per port is possible. When\n+ *\t\t  initializing a scheme, a classification plan group (see\n+ *\t\t  below), or a coarse classification tree, one of the\n+ *\t\t  initialized environments must be stated and related to. When a\n+ *\t\t  port is bound to a scheme, a classification plan group, or a\n+ *\t\t  coarse classification tree, it MUST be bound to the same\n+ *\t\t  environment.\n+ *\n+ *\t\t  The different PCD modules, may relate (for flows definition)\n+ *\t\t  ONLY on distinction units as defined by their environment.\n+ *\t\t  When initializing a scheme for example, it may not choose to\n+ *\t\t  select IPV4 as a match for recognizing flows unless it was\n+ *\t\t  defined in the relating environment. In fact, to guide the\n+ *\t\t  user through the configuration of the PCD, each module's\n+ *\t\t  characterization in terms of flows is not done using protocol\n+ *\t\t  names, but using environment indexes.\n+ *\n+ *\t\t  In terms of HW implementation, the list of distinction units\n+ *\t\t  sets the LCV vectors and later used for match vector,\n+ *\t\t  classification plan vectors and coarse classification\n+ *\t\t  indexing.\n+ *\n+ * @Param[in,out] ioc_fm_pcd_net_env_params_t\tA structure defining the\n+ *\t\t\t\t\t\tdistinction units for this\n+ *\t\t\t\t\t\tconfiguration.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), \\\n+\t\t      ioc_fm_pcd_net_env_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_net_env_characteristics_delete\n+ *\n+ * @Description   Deletes a set of Network Environment Charecteristics.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\t\tThe id of a Network Environment object.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_set\n+ *\n+ * @Description   Initializing or modifying and enabling a scheme for the\n+ *\t\t  KeyGen. This routine should be called for adding or modifying\n+ *\t\t  a scheme. When a scheme needs modifying, the API requires that\n+ *\t\t  it will be rewritten. In such a case 'modify' should be TRUE.\n+ *\t\t  If the routine is called for a valid scheme and 'modify' is\n+ *\t\t  FALSE, it will return error.\n+ *\n+ * @Param[in,out] ioc_fm_pcd_kg_scheme_params_t\t\tA structure of\n+ *\t\t\t\t\t\t\tparameters for defining\n+ *\t\t\t\t\t\t\tthe scheme\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_KG_SCHEME_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), \\\n+\t\t      ioc_fm_pcd_kg_scheme_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_delete\n+ *\n+ * @Description   Deleting an initialized scheme.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\tscheme id as initialized by application at\n+ *\t\t\t\tFM_PCD_IOC_KG_SET_SCHEME\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_KG_SCHEME_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_cc_root_build\n+ *\n+ * @Description   This routine must be called to define a complete coarse\n+ *\t\t  classification tree. This is the way to define coarse\n+ *\t\t  classification to a certain flow - the KeyGen schemes may\n+ *\t\t  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\n+ *\t\t\t\t\t\tdefine the tree.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_CC_ROOT_BUILD \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), void *)\n+\t\t/* workaround ...*/\n+\n+/*\n+ * @Function\t  fm_pcd_cc_root_delete\n+ *\n+ * @Description   Deleting a built tree.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t - The id of a CC tree.\n+ */\n+#define FM_PCD_IOC_CC_ROOT_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_set\n+ *\n+ * @Description   This routine should be called for each CC (coarse\n+ *\t\t  classification) node. The whole CC tree should be built bottom\n+ *\t\t  up so that each node points to already defined nodes. p_NodeId\n+ *\t\t  returns the node Id to be used by other nodes.\n+ *\n+ * @Param[in,out] ioc_fm_pcd_cc_node_params_t\tA structure for defining the CC\n+ *\t\t\t\t\t\tnode params\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), void *)\n+\t\t/* workaround ...*/\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_delete\n+ *\n+ * @Description   Deleting a built node.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t - The id of a CC node.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_cc_root_modify_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters in the entry of the tree.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_tree_modify_next_engine_params_t\n+ *\t\t  Pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_cc_root_build().\n+ */\n+#define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), \\\n+\t\t     ioc_fm_pcd_cc_tree_modify_next_engine_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters in the relevant key entry of\n+ *\t\t  the node.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_modify_next_engine_params_t\n+ *\t\t  A pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), \\\n+\t\t     ioc_fm_pcd_cc_node_modify_next_engine_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_miss_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters of the Miss key case of the\n+ *\t\t  node.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_modify_next_engine_params_t\n+ *\t\t  Pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), \\\n+\t\t     ioc_fm_pcd_cc_node_modify_next_engine_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_remove_key\n+ *\n+ * @Description   Remove the key (including next engine parameters of this key)\n+ *\t\t  defined by the index of the relevant node.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_remove_key_params_t\n+ *\t\t  A pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only after fm_pcd_match_table_set() has been called\n+ *\t\t  for this node and for all of the nodes that lead to it.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), \\\n+\t\t     ioc_fm_pcd_cc_node_remove_key_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_add_key\n+ *\n+ * @Description   Add the key (including next engine parameters of this key in\n+ *\t\t  the index defined by the key_index. Note that\n+ *\t\t  'FM_PCD_LAST_KEY_INDEX' may be used when the user don't care\n+ *\t\t  about the position of the key in the table - in that case, the\n+ *\t\t  key will be automatically added by the driver in the last\n+ *\t\t  available entry.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t\n+ *\t\t  A pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only after fm_pcd_match_table_set() has been called\n+ *\t\t  for this node and for all of the nodes that lead to it.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_ADD_KEY \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), \\\n+\t\t     ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_key_and_next_engine\n+ *\n+ * @Description   Modify the key and Next Engine Parameters of this key in the\n+ *\t\t  index defined by key_index.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t\n+ *\t\t  A pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() not only of\n+ *\t\t  the relevnt node but also the node that points to this node.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), \\\n+\t\t     ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_key\n+ *\n+ * @Description   Modify the key at the index defined by key_index.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_cc_node_modify_key_params_t - Pointer to a\n+ * structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only after fm_pcd_match_table_set() has been called\n+ *\t\t  for this node and for all of the nodes that lead to it.\n+ */\n+#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), \\\n+\t\t     ioc_fm_pcd_cc_node_modify_key_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_set\n+ *\n+ * @Description   This routine initializes a hash table structure.\n+ *\t\t  KeyGen hash result determines the hash bucket.\n+ *\t\t  Next, KeyGen key is compared against all keys of this bucket\n+ *\t\t  (exact match).\n+ *\t\t  Number of sets (number of buckets) of the hash equals to the\n+ *\t\t  number of 1-s in 'hash_res_mask' in the provided parameters.\n+ *\t\t  Number 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\t  maximal number of keys that a hash bucket may hold.\n+ *\t\t  The hash table is initialized empty and keys may be added to\n+ *\t\t  it following the initialization. Keys masks are not supported\n+ *\t\t  in current hash table implementation. The initialized hash\n+ *\t\t  table can be integrated as a node in a CC tree.\n+ *\n+ * @Param[in,out] ioc_fm_pcd_hash_table_params_t\tPointer to a structure\n+ *\t\t\t\t\t\t\twith the relevant\n+ *\t\t\t\t\t\t\tparameters.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_HASH_TABLE_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), \\\n+\t\t      ioc_fm_pcd_hash_table_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_delete\n+ *\n+ * @Description   This routine deletes the provided hash table and released all\n+ *\t\t  its allocated resources.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\t\tThe ID of a hash table.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\tAllowed only following fm_pcd_hash_table_set().\n+ */\n+#define FM_PCD_IOC_HASH_TABLE_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_add_key\n+ *\n+ * @Description   This routine adds the provided key (including next engine\n+ *\t\t  parameters of this key) to the hash table.\n+ *\t\t  The key is added as the last key of the bucket that it is\n+ *\t\t  mapped to.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_hash_table_add_key_params_t\n+ *\t\t  Pointer to a structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\tAllowed only following fm_pcd_hash_table_set().\n+ */\n+#define FM_PCD_IOC_HASH_TABLE_ADD_KEY \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), \\\n+\t\t     ioc_fm_pcd_hash_table_add_key_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_remove_key\n+ *\n+ * @Description   This routine removes the requested key (including next engine\n+ *\t\t  parameters of this key) from the hash table.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_hash_table_remove_key_params_t - Pointer to a\n+ *\t\t  structure with the relevant parameters\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+#define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), \\\n+\t\t     ioc_fm_pcd_hash_table_remove_key_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_set\n+ *\n+ * @Description   Sets a profile entry in the policer profile table.\n+ *\t\t  The routine overrides any existing value.\n+ *\n+ * @Param[in,out] ioc_fm_pcd_plcr_profile_params_t\tA structure of\n+ *\t\t\t\t\t\t\tparameters for defining\n+ *\t\t\t\t\t\t\ta policer profile entry.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_PLCR_PROFILE_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), \\\n+\t\t      ioc_fm_pcd_plcr_profile_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_delete\n+ *\n+ * @Description   Delete a profile entry in the policer profile table.\n+ *\t\t  The routine set entry to invalid.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\t\tThe id of a policer profile.\n+ *\n+ * @Return\t  0 on success; Error code otherwise.\n+ */\n+#define FM_PCD_IOC_PLCR_PROFILE_DELETE  \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_set\n+ *\n+ * @Description   This routine should be called for defining a manipulation\n+ *\t\t  node. A manipulation node must be defined before the CC node\n+ *\t\t  that precedes it.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_manip_params_t\tA structure of parameters\n+ *\t\t\t\t\t\tdefining the manipulation.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ */\n+#define FM_PCD_IOC_MANIP_NODE_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), \\\n+\t\t      ioc_fm_pcd_manip_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_replace\n+ *\n+ * @Description   Change existing manipulation node to be according to new\n+ *\t\t  requirement. (Here, it's implemented as a variant of the same\n+ *\t\t  IOCTL as for fm_pcd_manip_node_set(), and one that when\n+ *\t\t  called, the 'id' member in its 'ioc_fm_pcd_manip_params_t'\n+ *\t\t  argument is set to contain the manip node's handle)\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_manip_params_t\tA structure of parameters\n+ *\t\t\t\t\t\tdefining the manipulation.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_manip_node_set().\n+ */\n+#define FM_PCD_IOC_MANIP_NODE_REPLACE\tFM_PCD_IOC_MANIP_NODE_SET\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_delete\n+ *\n+ * @Description   Delete an existing manipulation node.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\tThe id of the manipulation node to delete.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_manip_node_set().\n+ */\n+#define FM_PCD_IOC_MANIP_NODE_DELETE \\\n+\t\t_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_manip_get_statistics\n+ *\n+ * @Description   Retrieve the manipulation statistics.\n+ *\n+ * @Param[in]\t  h_manip_node\t\tA handle to a manipulation node.\n+ * @Param[out]\t  p_fm_pcd_manip_stats\tA structure for retrieving the\n+ *\t\t\t\t\tmanipulation statistics.\n+ *\n+ * @Return\tE_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\tAllowed only following fm_pcd_manip_node_set().\n+ */\n+#define FM_PCD_IOC_MANIP_GET_STATS \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), \\\n+\t\t      ioc_fm_pcd_manip_get_stats_t)\n+\n+/*\n+ * @Function\t  fm_pcd_set_advanced_offload_support\n+ *\n+ * @Description   This routine must be called in order to support the following\n+ *\t\t  features: IP-fragmentation, IP-reassembly, IPsec,\n+ *\t\t  Header-manipulation, frame-replicator.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only when PCD is disabled.\n+ */\n+#define FM_PCD_IOC_SET_ADVANCED_OFFLOAD_SUPPORT \\\n+\t\t_IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45))\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_set_group\n+ *\n+ * @Description   Initialize a Frame Replicator group.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\t\tFM PCD module descriptor.\n+ * @Param[in]\t  p_frm_replic_group_param\tA structure of parameters for\n+ *\t\t\t\t\t\tthe initialization of the frame\n+ *\t\t\t\t\t\treplicator group.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_SET \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), \\\n+\t\t      ioc_fm_pcd_frm_replic_group_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_delete_group\n+ *\n+ * @Description   Delete a Frame Replicator group.\n+ *\n+ * @Param[in]\t  h_frm_replic_group  A handle to the frame replicator group.\n+ *\n+ * @Return\t  E_OK on success;  Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group().\n+ */\n+#define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_fm_obj_t)\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_add_member\n+ *\n+ * @Description   Add the member in the index defined by the member_index.\n+ *\n+ * @Param[in]\t  h_frm_replic_group\tA handle to the frame replicator group.\n+ * @Param[in]\t  member_index\t\tMember index for adding.\n+ * @Param[in]\t  p_member_params\tA pointer to the new member parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group() of this\n+ *\t\t  group.\n+ */\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), \\\n+\t\t\tioc_fm_pcd_frm_replic_member_params_t)\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_remove_member\n+ *\n+ * @Description   Remove the member defined by the index from the relevant group\n+ *\n+ * @Param[in]\t  h_frm_replic_group\tA handle to the frame replicator group.\n+ * @Param[in]\t  member_index\t\tMember index for removing.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group() of this\n+ *\t\t  group.\n+ */\n+#define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE \\\n+\t\t_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), \\\n+\t\t      ioc_fm_pcd_frm_replic_member_t)\n+\n+/*\n+ * @Group\t  FM_grp Frame Manager API\n+ *\n+ * @Description   Frame Manager Application Programming Interface\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Group\t  FM_PCD_grp FM PCD\n+ *\n+ * @Description   Frame Manager PCD (Parse-Classify-Distribute) API.\n+ *\n+ *\t\t  The FM PCD module is responsible for the initialization of all\n+ *\t\t  global classifying FM modules. This includes the parser\n+ *\t\t  general and common registers, the key generator global and\n+ *\t\t  common registers, and the policer global and common registers.\n+ *\t\t  In addition, the FM PCD SW module will initialize all required\n+ *\t\t  key generator schemes, coarse classification flows, and\n+ *\t\t  policer profiles. When FM module is configured to work with\n+ *\t\t  one of these entities, it will register to it using the FM\n+ *\t\t  PORT API. The PCD module will manage the PCD resources - i.e.\n+ *\t\t  resource management of KeyGen schemes, etc.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Collection\t  General 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 \\\n+\t\t(32 - 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+ */\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; For HW implementation reasons, in\n+ * most cases less than this will be allowed; The driver will return an\n+ * initialization error if resource is unavailable.\n+ */\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 \\\n+\t(FM_PCD_SW_PRS_SIZE \\\n+\t /*- FM_PCD_PRS_SW_OFFSET -FM_PCD_PRS_SW_TAIL_SIZE*/ \\\n+\t - 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+#define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES\t64\n+/**< Maximum possible entries for frame replicator group */\n+/* @} */\n+\n+/*\n+ * @Group\t  FM_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\t  exception passing the exception identification.\n+ *\n+ * @Param[in]\t  h_app\t\tUser's application descriptor.\n+ * @Param[in]\t  exception\tThe exception.\n+ */\n+typedef void (t_fm_pcd_exception_callback) (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\t  exception passing the exception identification.\n+ *\n+ * @Param[in]\t  h_app\t\tUser's application descriptor.\n+ * @Param[in]\t  exception\tThe exception.\n+ * @Param[in]\t  index\t\tid of the relevant source (may be scheme or\n+ *\t\t\t\tprofile id).\n+ */\n+typedef void (t_fm_pcd_id_exception_callback) (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]\t  h_qm_arg\tApplication's handle passed to QM module on\n+ *\t\t\t\tenqueue.\n+ * @Param[in]\t  p_fd\t\tFrame descriptor for the frame.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+typedef uint32_t (t_fm_pcd_qm_enqueue_callback) (t_handle h_qm_arg, void *p_fd);\n+\n+/*\n+ * @Description   Host-Command parameters structure.\n+ *\n+ *\t\t  When using Host command for PCD functionalities, a dedicated\n+ *\t\t  port must be used. If this routine is called for a PCD in a\n+ *\t\t  single partition environment, or it is the Master partition in\n+ *\t\t  a Multi-partition environment, The port will be initialized by\n+ *\t\t  the PCD driver initialization routine.\n+ */\n+typedef struct t_fm_pcd_hc_params {\n+\tuintptr_t\t\tport_base_addr;\n+\t/**< Virtual Address of Host-Command Port memory mapped registers.*/\n+\tuint8_t\t\t\tport_id;\n+\t/**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);\n+\t * NOTE: When configuring Host Command port for FMANv3 devices\n+\t * (DPAA_VERSION 11 and higher), port_id=0 MUST be used.\n+\t */\n+\tuint16_t\t\t\tliodn_base;\n+\t/**< LIODN base for this port, to be used together with LIODN offset\n+\t * (irrelevant for P4080 revision 1.0)\n+\t */\n+\tuint32_t\t\t\terr_fqid;\n+\t/**< Host-Command Port error queue Id. */\n+\tuint32_t\t\t\tconf_fqid;\n+\t/**< Host-Command Port confirmation queue Id. */\n+\tuint32_t\t\t\tqm_channel;\n+\t/**< QM channel dedicated to this Host-Command port; will be used by the\n+\t * FM for dequeue.\n+\t */\n+\tt_fm_pcd_qm_enqueue_callback\t*f_qm_enqueue;\n+\t/**< Callback routine for enqueuing a frame to the QM */\n+\tt_handle\t\t\th_qm_arg;\n+\t/**< Application's handle passed to QM module on enqueue */\n+} t_fm_pcd_hc_params;\n+\n+/*\n+ * @Description   The main structure for PCD initialization\n+ */\n+typedef struct t_fm_pcd_params {\n+\tbool\t\t\tprs_support;\n+\t/**< TRUE if Parser will be used for any of the FM ports. */\n+\tbool\t\t\tcc_support;\n+\t/**< TRUE if Coarse Classification will be used for any of the FM ports.\n+\t */\n+\tbool\t\t\tkg_support;\n+\t/**< TRUE if KeyGen will be used for any of the FM ports. */\n+\tbool\t\t\tplcr_support;\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\tnum_schemes;\n+\t/**< Number of schemes dedicated to this partition.\n+\t * this parameter is relevant if 'kg_support'=TRUE.\n+\t */\n+\tbool\t\t\tuse_host_command;\n+\t/**< Optional for single partition, Mandatory for Multi partition */\n+\tt_fm_pcd_hc_params\t\thc;\n+\t/**< Host Command parameters, relevant only if 'use_host_command'=TRUE;\n+\t * Relevant when FM not runs in \"guest-mode\".\n+\t */\n+\tt_fm_pcd_exception_callback\t*f_exception;\n+\t/**< Callback routine for general PCD exceptions; Relevant when FM not\n+\t * runs in \"guest-mode\".\n+\t */\n+\tt_fm_pcd_id_exception_callback\t*f_exception_id;\n+\t/**< Callback routine for specific KeyGen scheme or Policer profile\n+\t * exceptions; Relevant when FM not runs in \"guest-mode\".\n+\t */\n+\tt_handle\t\th_app;\n+\t/**< A handle to an application layer object; This handle will be passed\n+\t * by the driver upon calling the above callbacks; Relevant when FM not\n+\t * runs in \"guest-mode\".\n+\t */\n+\tuint8_t\t\t\tpart_plcr_profiles_base;\n+\t/**< The first policer-profile-id dedicated to this partition. this\n+\t * parameter is relevant if 'plcr_support'=TRUE. NOTE: this parameter\n+\t * relevant only when working with multiple partitions.\n+\t */\n+\tuint16_t\t\tpart_num_of_plcr_profiles;\n+\t/**< Number of policer-profiles dedicated to this partition. This\n+\t * parameter is relevant if 'plcr_support'=TRUE. NOTE: this parameter\n+\t * relevant only when working with multiple partitions.\n+\t */\n+} t_fm_pcd_params;\n+\n+typedef struct t_fm_pcd_prs_label_params {\n+\tuint32_t instruction_offset;\n+\tioc_net_header_type hdr;\n+\tuint8_t index_per_hdr;\n+} t_fm_pcd_prs_label_params;\n+\n+typedef struct t_fm_pcd_prs_sw_params {\n+\tbool override;\n+\tuint32_t size;\n+\tuint16_t base;\n+\tuint8_t *p_code;\n+\tuint32_t sw_prs_data_params[FM_PCD_PRS_NUM_OF_HDRS];\n+\tuint8_t num_of_labels;\n+\tt_fm_pcd_prs_label_params labels_table[FM_PCD_PRS_NUM_OF_LABELS];\n+} t_fm_pcd_prs_sw_params;\n+\n+/*\n+ * @Function\t  fm_pcd_config\n+ *\n+ * @Description   Basic configuration of the PCD module.\n+ *\t\t  Creates descriptor for the FM PCD module.\n+ *\n+ * @Param[in]\t  p_fm_pcd_params\tA structure of parameters for the\n+\t\t\t\t\tinitialization of PCD.\n+ *\n+ * @Return\t  A handle to the initialized module.\n+ */\n+t_handle fm_pcd_config(t_fm_pcd_params *p_fm_pcd_params);\n+\n+/*\n+ * @Function\t  fm_pcd_init\n+ *\n+ * @Description   Initialization of the PCD module.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_pcd_init(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_free\n+ *\n+ * @Description   Frees all resources that were assigned to FM module.\n+ *\t\t  Calling this routine invalidates the descriptor.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_pcd_free(t_handle h_fm_pcd);\n+\n+/*\n+ * @Group\t  FM_PCD_advanced_cfg_grp\tFM PCD Advanced Configuration\n+ *\t\t\t\t\t\tUnit\n+ *\n+ * @Description   Frame Manager PCD Advanced Configuration API.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Function\t  fm_pcd_config_exception\n+ *\n+ * @Description   Calling this routine changes the internal driver data base\n+ *\t\t  from its default selection of exceptions enabling.\n+ *\t\t  [DEFAULT_num_of_shared_plcr_profiles].\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  exception\tThe exception to be selected.\n+ * @Param[in]\t  enable\tTRUE to enable interrupt, FALSE to mask it.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  This routine should NOT be called from guest-partition (i.e.\n+ *\t\t  guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_config_exception(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_exceptions exception, bool enable);\n+\n+/*\n+ * @Function\t  fm_pcd_config_hc_frames_data_memory\n+ *\n+ * @Description   Configures memory-partition-id for FMan-Controller\n+ *\t\t  Host-Command frames. Calling this routine changes the internal\n+ *\t\t  driver data base from its default configuration [0].\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  mem_id\tMemory partition ID.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  This routine may be called only if 'use_host_command' was TRUE\n+ *\t\t  when fm_pcd_config() routine was called.\n+ */\n+uint32_t fm_pcd_config_hc_frames_data_memory(t_handle h_fm_pcd, uint8_t mem_id);\n+\n+/*\n+ * @Function\t  fm_pcd_config_plcr_num_of_shared_profiles\n+ *\n+ * @Description   Calling this routine changes the internal driver data base\n+ *\t\t  from its default selection of exceptions enablement.\n+ *\t\t  [DEFAULT_num_of_shared_plcr_profiles].\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\t\tFM PCD module descriptor.\n+ * @Param[in]\t  num_of_shared_plcr_profiles\tNumber of profiles to be shared\n+ *\t\t\t\t\t\tbetween ports on this partition\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_pcd_config_plcr_num_of_shared_profiles(t_handle h_fm_pcd,\n+\t\tuint16_t num_of_shared_plcr_profiles);\n+\n+/*\n+ * @Function\t  fm_pcd_config_plcr_auto_refresh_mode\n+ *\n+ * @Description   Calling this routine changes the internal driver data base\n+ *\t\t  from its default selection of exceptions enablement. By\n+ *\t\t  default auto-refresh is [DEFAULT_plcrAutoRefresh].\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_config_plcr_auto_refresh_mode(t_handle h_fm_pcd, bool enable);\n+\n+/*\n+ * @Function\t  fm_pcd_config_prs_max_cycle_limit\n+ *\n+ * @Description   Calling this routine changes the internal data structure for\n+ *\t\t  the maximum parsing time from its default value\n+ *\t\t  [DEFAULT_MAX_PRS_CYC_LIM].\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  value\t\t0 to disable the mechanism, or new maximum\n+ *\t\t\t\tparsing time.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_config_prs_max_cycle_limit(t_handle h_fm_pcd, 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\t  FM_PCD_Runtime_grp FM PCD Runtime Unit\n+ *\n+ * @Description   Frame Manager PCD Runtime Unit API\n+ *\n+ *\t\t  The runtime control allows creation of PCD infrastructure\n+ *\t\t  modules such as Network Environment Characteristics,\n+ *\t\t  Classification Plan Groups and Coarse Classification Trees.\n+ *\t\t  It also allows on-the-fly initialization, modification and\n+ *\t\t  removal of PCD modules such as KeyGen schemes, coarse\n+ *\t\t  classification nodes and Policer profiles.\n+ *\n+ *\t\t  In order to explain the programming model of the PCD driver\n+ *\t\t  interface a few terms should be explained, and will be used\n+ *\t\t  below.\n+ *\t\t  - Distinction Header - One of the 16 protocols supported by\n+ *\t\t    the FM parser, or one of the SHIM headers (1 or 2). May be a\n+ *\t\t    header with a special option (see below).\n+ *\t\t  - Interchangeable Headers Group - This is a group of Headers\n+ *\t\t    recognized by either one of them. For example, if in a\n+ *\t\t    specific context the user chooses to treat IPv4 and IPV6 in\n+ *\t\t    the same way, they may create an interchangeable Headers\n+ *\t\t    Unit consisting of these 2 headers.\n+ *\t\t  - A Distinction Unit - a Distinction Header or an\n+ *\t\t    Interchangeable Headers Group.\n+ *\t\t  - Header with special option - applies to Ethernet, MPLS,\n+ *\t\t    VLAN, IPv4 and IPv6, includes multicast, broadcast and other\n+ *\t\t    protocol specific options. In terms of hardware it relates\n+ *\t\t    to the options available in the classification plan.\n+ *\t\t  - Network Environment Characteristics - a set of Distinction\n+ *\t\t    Units that define the total recognizable header selection\n+ *\t\t    for a certain environment. This is NOT the list of all\n+ *\t\t    headers that will ever appear in a flow, but rather\n+ *\t\t    everything that needs distinction in a flow, where\n+ *\t\t    distinction is made by KeyGen schemes and coarse\n+ *\t\t    classification action descriptors.\n+ *\n+ *\t\t  The PCD runtime modules initialization is done in stages. The\n+ *\t\t  first stage after initializing the PCD module itself is to\n+ *\t\t  establish a Network Flows Environment Definition. The\n+ *\t\t  application may choose to establish one or more such\n+ *\t\t  environments. Later, when needed, the application will have to\n+ *\t\t  state, for some of its modules, to which single environment it\n+ *\t\t  belongs.\n+ *\n+ * @{\n+ */\n+\n+t_handle fm_pcd_open(t_fm_pcd_params *p_fm_pcd_params);\n+void fm_pcd_close(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_enable\n+ *\n+ * @Description   This routine should be called after PCD is initialized for\n+ *\t\t  enabling all PCD engines according to their existing\n+ *\t\t  configuration.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() and when PCD is disabled.\n+ */\n+uint32_t fm_pcd_enable(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_disable\n+ *\n+ * @Description   This routine may be called when PCD is enabled in order to\n+ *\t\t  disable all PCD engines. It may be called only when none of\n+ *\t\t  the ports in the system are using the PCD.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() and when PCD is enabled.\n+ */\n+uint32_t fm_pcd_disable(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_get_counter\n+ *\n+ * @Description   Reads one of the FM PCD counters.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  counter\tThe requested counter.\n+ *\n+ * @Return\t  Counter's current value.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  Note that it is user's responsibility to call this routine\n+ *\t\t  only for enabled counters, and there will be no indication if\n+ *\t\t  a disabled counter is accessed.\n+ */\n+uint32_t fm_pcd_get_counter(t_handle h_fm_pcd, ioc_fm_pcd_counters counter);\n+\n+/*\n+ * @Function\tfm_pcd_prs_load_sw\n+ *\n+ * @Description\tThis routine may be called in order to load software parsing\n+ *\t\tcode.\n+ *\n+ * @Param[in]\th_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\tp_sw_prs\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_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_prs_load_sw(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_prs_sw_params_t *p_sw_prs);\n+\n+/*\n+ * @Function\t  fm_pcd_set_advanced_offload_support\n+ *\n+ * @Description   This routine must be called in order to support the following\n+ *\t\t  features: IP-fragmentation, IP-reassembly, IPsec,\n+ *\t\t  Header-manipulation, frame-replicator.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() and when PCD is disabled.\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_set_advanced_offload_support(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_set_dflt_value\n+ *\n+ * @Description   Calling this routine sets a global default value to be used\n+ *\t\t  by the KeyGen when parser does not recognize a required\n+ *\t\t  field/header.\n+ *\t\t  default value is 0.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  value_id\t0,1 - one of 2 global default values.\n+ * @Param[in]\t  value\t\tThe requested default value.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() and when PCD is disabled.\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_kg_set_dflt_value(t_handle h_fm_pcd,\n+\t\tuint8_t value_id, uint32_t value);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_set_additional_data_after_parsing\n+ *\n+ * @Description   Calling this routine allows the KeyGen to access data past\n+ *\t\t  the parser finishing point.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\tFM PCD module descriptor.\n+ * @Param[in]\t  payload_offset\tthe number of bytes beyond the parser\n+ *\t\t\t\t\tlocation.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() and when PCD is disabled.\n+ *\t\t  This routine should NOT be called from guest-partition (i.e.\n+ *\t\t  guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_kg_set_additional_data_after_parsing(t_handle h_fm_pcd,\n+\t\tuint8_t payload_offset);\n+\n+/*\n+ * @Function\t  fm_pcd_set_exception\n+ *\n+ * @Description   Calling this routine enables/disables PCD interrupts.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  exception\tThe exception to be selected.\n+ * @Param[in]\t  enable\tTRUE to enable interrupt, FALSE to mask it.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_set_exception(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_exceptions exception, bool enable);\n+\n+/*\n+ * @Function\t  fm_pcd_modify_counter\n+ *\n+ * @Description   Sets a value to an enabled counter. Use \"0\" to reset the\n+ *\t\t  counter.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  counter\tThe requested counter.\n+ * @Param[in]\t  value\t\tThe requested value to be written into the\n+ *\t\t\t\tcounter.\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_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_modify_counter(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_counters counter, uint32_t value);\n+\n+/*\n+ * @Function\t  fm_pcd_set_plcr_statistics\n+ *\n+ * @Description   This routine may be used to enable/disable policer statistics\n+ *\t\t  counter. By default the statistics is enabled.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_pcd_set_plcr_statistics(t_handle h_fm_pcd, bool enable);\n+\n+/*\n+ * @Function\t  fm_pcd_set_prs_statistics\n+ *\n+ * @Description   Defines whether to gather parser statistics including all\n+ *\t\t  ports.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  None\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+void fm_pcd_set_prs_statistics(t_handle h_fm_pcd, bool enable);\n+\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+/*\n+ * @Function\t  fm_pcd_dump_regs\n+ *\n+ * @Description   Dumps all PCD registers\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the\n+ *\t\t  registers are mapped.\n+ */\n+uint32_t fm_pcd_dump_regs(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_dump_regs\n+ *\n+ * @Description   Dumps all PCD KG registers\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the\n+ *\t\t  registers are mapped.\n+ */\n+uint32_t fm_pcd_kg_dump_regs(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_dump_regs\n+ *\n+ * @Description   Dumps all PCD Policer registers\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the\n+ *\t\t  registers are mapped.\n+ */\n+uint32_t fm_pcd_plcr_dump_regs(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_dump_regs\n+ *\n+ * @Description   Dumps all PCD Policer profile registers\n+ *\n+ * @Param[in]\t  h_profile\tA handle to a Policer profile.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the\n+ *\t\t  registers are mapped.\n+ */\n+uint32_t fm_pcd_plcr_profile_dump_regs(t_handle h_profile);\n+\n+/*\n+ * @Function\t  fm_pcd_prs_dump_regs\n+ *\n+ * @Description   Dumps all PCD Parser registers\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the\n+ *\t\t  registers are mapped.\n+ */\n+uint32_t fm_pcd_prs_dump_regs(t_handle h_fm_pcd);\n+\n+/*\n+ * @Function\t  fm_pcd_hc_dump_regs\n+ *\n+ * @Description   Dumps HC Port registers\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ *\t\t  NOTE: this routine may be called only for FM in master mode\n+ *\t\t  (i.e. 'guestId'=NCSW_PRIMARY_ID).\n+ */\n+uint32_t\tfm_pcd_hc_dump_regs(t_handle h_fm_pcd);\n+#endif /* (defined(DEBUG_ERRORS) && ... */\n+\n+\n+/*\n+ * KeyGen\t  FM_PCD_Runtime_build_grp FM PCD Runtime Building Unit\n+ *\n+ * @Description   Frame Manager PCD Runtime Building API\n+ *\n+ *\t\t  This group contains routines for setting, deleting and\n+ *\t\t  modifying PCD resources, for defining the total PCD tree.\n+ * @{\n+ */\n+\n+/*\n+ * @Collection\t  Definitions of coarse classification\n+ *\t\t  parameters as required by KeyGen (when coarse classification\n+ *\t\t  is 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\n+\t\t\t/* Obsolete, not used - will be removed in the future */\n+/* @} */\n+\n+/*\n+ * @Collection\t  A set of definitions to allow protocol\n+ *\t\t  special option description.\n+ */\n+typedef uint32_t\tprotocol_opt_t;\n+\t\t\t/**< A general type to define a protocol option. */\n+\n+typedef protocol_opt_t   eth_protocol_opt_t;\n+\t\t\t/**< Ethernet protocol options. */\n+#define ETH_BROADCAST\t\t0x80000000  /**< Ethernet Broadcast. */\n+#define ETH_MULTICAST\t\t0x40000000  /**< Ethernet Multicast. */\n+\n+typedef protocol_opt_t   vlan_protocol_opt_t;\t/**< VLAN protocol options. */\n+#define VLAN_STACKED\t\t0x20000000  /**< Stacked VLAN. */\n+\n+typedef protocol_opt_t   mpls_protocol_opt_t;\t/**< MPLS protocol options. */\n+#define MPLS_STACKED\t\t0x10000000  /**< Stacked MPLS. */\n+\n+typedef protocol_opt_t   ipv_4protocol_opt_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\n+\t\t\t\t/**< Tunneled IPv4 - Broadcast/Multicast. */\n+\n+#define IPV4_FRAG_1\t\t0x00000008\n+\t\t\t\t/**< IPV4 reassembly option. IPV4 Reassembly\n+\t\t\t\t * manipulation requires network environment\n+\t\t\t\t * with IPV4 header and IPV4_FRAG_1 option\n+\t\t\t\t */\n+\n+typedef protocol_opt_t   ipv_6protocol_opt_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\n+\t\t\t\t/**< IPV6 reassembly option. IPV6 Reassembly\n+\t\t\t\t * manipulation requires network environment\n+\t\t\t\t * with IPV6 header and IPV6_FRAG_1 option; in\n+\t\t\t\t * case where fragment found, the\n+\t\t\t\t * fragment-extension offset may be found at\n+\t\t\t\t * 'shim2' (in parser-result).\n+\t\t\t\t */\n+typedef protocol_opt_t   capwap_protocol_opt_t;\t/**< CAPWAP protocol options. */\n+#define CAPWAP_FRAG_1\t\t0x00000008\n+\t\t\t\t/**< CAPWAP reassembly option. CAPWAP Reassembly\n+\t\t\t\t * manipulation requires network environment\n+\t\t\t\t * with CAPWAP header and CAPWAP_FRAG_1 option;\n+\t\t\t\t * in case where fragment found, the\n+\t\t\t\t * fragment-extension offset may be found at\n+\t\t\t\t * 'shim2' (in parser-result).\n+\t\t\t\t */\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\t  A set of definitions to support Header Manipulation selection.\n+ */\n+typedef uint32_t\t\thdr_manip_flags_t;\n+\t\t/**< A general type to define a HMan update command flags. */\n+\n+typedef hdr_manip_flags_t\tipv_4hdr_manip_update_flags_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\t * of t_FmPcdManipHdrFieldUpdateIpv4)\n+\t\t\t */\n+#define HDR_MANIP_IPV4_ID\t0x40000000\n+\t\t\t/**< update IP ID with the given value ('id' field\n+\t\t\t * of t_FmPcdManipHdrFieldUpdateIpv4)\n+\t\t\t */\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+\t\t\t */\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+\t\t\t */\n+\n+typedef hdr_manip_flags_t\tipv_6hdr_manip_update_flags_t;\n+\t\t\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\n+\t\t\t * t_FmPcdManipHdrFieldUpdateIpv6)\n+\t\t\t */\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+\t\t\t */\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+\t\t\t */\n+\n+typedef hdr_manip_flags_t\ttcp_udp_hdr_manip_update_flags_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+\t\t */\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+\t\t */\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\t  each value in this array represents the index of the\n+ *\t\t  extraction command as defined by the user in the\n+ *\t\t  initialization extraction array. The valid size of this array\n+ *\t\t  is the user define number of extractions required (also marked\n+ *\t\t  by the second '0' in this array).\n+ */\n+typedef\tuint8_t\tt_fm_pcd_kg_key_order[FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];\n+\n+/*\n+ * @Collection\t  Definitions for CC statistics\n+ */\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+#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\t  The driver supports two methods for CC node allocation:\n+ *\t\t  dynamic and static. Static mode was created in order to\n+ *\t\t  prevent runtime alloc/free of FMan memory (MURAM), which may\n+ *\t\t  cause fragmentation; in this mode, the driver automatically\n+ *\t\t  allocates the memory according to 'max_num_of_keys' parameter.\n+ *\t\t  The driver calculates the maximal memory size that may be used\n+ *\t\t  for this CC-Node taking into consideration 'mask_support' and\n+ *\t\t  'statistics_mode' parameters. When 'action' =\n+ *\t\t  e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction parameters of\n+ *\t\t  this node, 'max_num_of_keys' must be equal to 'num_of_keys'.\n+ *\t\t  In dynamic mode, 'max_num_of_keys' must be zero. At\n+ *\t\t  initialization, all required structures are allocated\n+ *\t\t  according to 'num_of_keys' parameter. During runtime\n+ *\t\t  modification, these structures are re-allocated according to\n+ *\t\t  the updated number of keys.\n+ *\n+ *\t\t  Please note that 'action' and 'icIndxMask' mentioned in the\n+ *\t\t  specific parameter explanations are passed in the extraction\n+ *\t\t  parameters of the node (fields of\n+ *\t\t  extractCcParams.extractNonHdr).\n+ */\n+typedef struct t_keys_params {\n+\tuint16_t\tmax_num_of_keys;\n+\t\t/**< Maximum number of keys that will (ever) be used in this\n+\t\t * CC-Node; A value of zero may be used for dynamic memory\n+\t\t * allocation.\n+\t\t */\n+\tbool\t\tmask_support;\n+\t\t/**< This parameter is relevant only if a node is initialized\n+\t\t * with 'action' = e_FM_PCD_ACTION_EXACT_MATCH and\n+\t\t * max_num_of_keys > 0; Should be TRUE to reserve table memory\n+\t\t * for key masks, even if initial keys do not contain masks, or\n+\t\t * if the node was initialized as 'empty' (without keys); this\n+\t\t * will allow user to add keys with masks at runtime.\n+\t\t * NOTE that if user want to use only global-masks (i.e. one\n+\t\t * common mask for all the entries within this table, this\n+\t\t * parameter should set to 'FALSE'.\n+\t\t */\n+\tioc_fm_pcd_cc_stats_mode\tstatistics_mode;\n+\t\t/**< Determines the supported statistics mode for all node's\n+\t\t * keys. To enable statistics gathering, statistics should be\n+\t\t * enabled per every key, using 'statisticsEn' in next engine\n+\t\t * parameters structure of that key; If 'max_num_of_keys' is\n+\t\t * set, all required structures will be preallocated for all\n+\t\t * keys.\n+\t\t */\n+\tuint16_t\tframe_length_ranges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];\n+\t\t/**< Relevant only for 'RMON' statistics mode (this feature is\n+\t\t * supported only on B4860 device); Holds a list of programmable\n+\t\t * thresholds - for each received frame, its length in bytes is\n+\t\t * examined against these range thresholds and the appropriate\n+\t\t * counter is incremented by 1 - for example, to belong to range\n+\t\t * i, the following should hold: range i-1 threshold < frame\n+\t\t * length <= range i threshold. Each range threshold must be\n+\t\t * larger then its preceding range threshold, and last range\n+\t\t * threshold must be 0xFFFF.\n+\t\t */\n+\tuint16_t\tnum_of_keys;\n+\t\t/**< Number of initial keys; Note that in case of 'action' =\n+\t\t * e_FM_PCD_ACTION_INDEXED_LOOKUP, this field should be\n+\t\t * power-of-2 of the number of bits that are set in 'icIndxMask'\n+\t\t */\n+\tuint8_t\t\tkey_size;\n+\t\t/**< Size of key - for extraction of type FULL_FIELD, 'key_size'\n+\t\t * has to be the standard size of the selected key; For other\n+\t\t * extraction types, 'key_size' has to be as size of extraction;\n+\t\t * When 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP, 'key_size'\n+\t\t * must be 2.\n+\t\t */\n+\tioc_fm_pcd_cc_key_params_t\tkey_params[FM_PCD_MAX_NUM_OF_KEYS];\n+\t\t/**< An array with 'num_of_keys' entries, each entry specifies\n+\t\t * the corresponding key parameters; When 'action' =\n+\t\t * e_FM_PCD_ACTION_EXACT_MATCH, this value must not exceed 255\n+\t\t * (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved for the\n+\t\t * 'miss' entry.\n+\t\t */\n+\tioc_fm_pcd_cc_next_engine_params_t   cc_next_engine_params_for_miss;\n+\t\t/**< Parameters for defining the next engine when a key is not\n+\t\t * matched; Not relevant if action =\n+\t\t * e_FM_PCD_ACTION_INDEXED_LOOKUP.\n+\t\t */\n+} t_keys_params;\n+\n+/*\n+ * @Description   Parameters for defining custom header manipulation for generic\n+ *\t\t  field replacement\n+ */\n+typedef struct ioc_fm_pcd_manip_hdr_custom_gen_field_replace {\n+\tuint8_t\t\tsrc_offset;\n+\t\t\t/**< Location of new data - Offset from Parse Result\n+\t\t\t * (>= 16, src_offset+size <= 32, )\n+\t\t\t */\n+\tuint8_t\t\tdst_offset;\n+\t\t\t/**< Location of data to be overwritten - Offset from\n+\t\t\t * start of frame (dst_offset + size <= 256).\n+\t\t\t */\n+\tuint8_t\t\tsize;\n+\t\t\t/**< The number of bytes (<=16) to be replaced */\n+\tuint8_t\t\tmask;\n+\t\t\t/**< Optional 1 byte mask. Set to select bits for\n+\t\t\t * replacement (1 - bit will be replaced); Clear to use\n+\t\t\t * field as is.\n+\t\t\t */\n+\tuint8_t\t\tmask_offset;\n+\t\t\t/**< Relevant if mask != 0; Mask offset within the\n+\t\t\t * replaces \"size\"\n+\t\t\t */\n+} ioc_fm_pcd_manip_hdr_custom_gen_field_replace;\n+\n+/*\n+ * @Function\t  fm_pcd_net_env_characteristics_set\n+ *\n+ * @Description   Define a set of Network Environment Characteristics.\n+ *\n+ *\t\t  When setting an environment it is important to understand its\n+ *\t\t  application. It is not meant to describe the flows that will\n+ *\t\t  run on the ports using this environment, but what the user\n+ *\t\t  means TO DO with the PCD mechanisms in order to\n+ *\t\t  parse-classify-distribute those frames.\n+ *\t\t  By specifying a distinction unit, the user means it would use\n+ *\t\t  that option for distinction between frames at either a KeyGen\n+ *\t\t  scheme or a coarse classification action descriptor. Using\n+ *\t\t  interchangeable headers to define a unit means that the user\n+ *\t\t  is indifferent to which of the interchangeable headers is\n+ *\t\t  present in the frame, and wants the distinction to be based on\n+ *\t\t  the presence of either one of them.\n+ *\n+ *\t\t  Depending on context, there are limitations to the use of\n+ *\t\t  environments. A port using the PCD functionality is bound to\n+ *\t\t  an environment. Some or even all ports may share an\n+ *\t\t  environment but also an environment per port is possible. When\n+ *\t\t  initializing a scheme, a classification plan group (see\n+ *\t\t  below), or a coarse classification tree, one of the\n+ *\t\t  initialized environments must be stated and related to. When a\n+ *\t\t  port is bound to a scheme, a classification plan group, or a\n+ *\t\t  coarse classification tree, it MUST be bound to the same\n+ *\t\t  environment.\n+ *\n+ *\t\t  The different PCD modules, may relate (for flows definition)\n+ *\t\t  ONLY on distinction units as defined by their environment.\n+ *\t\t  When initializing a scheme for example, it may not choose to\n+ *\t\t  select IPV4 as a match for recognizing flows unless it was\n+ *\t\t  defined in the relating environment. In fact, to guide the\n+ *\t\t  user through the configuration of the PCD, each module's\n+ *\t\t  characterization in terms of flows is not done using protocol\n+ *\t\t  names, but using environment indexes.\n+ *\n+ *\t\t  In terms of HW implementation, the list of distinction units\n+ *\t\t  sets the LCV vectors and later used for match vector,\n+ *\t\t  classification plan vectors and coarse classification\n+ *\t\t  indexing.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\tFM PCD module descriptor.\n+ * @Param[in]\t  p_netenv_params\tA structure of parameters for the\n+ *\t\t\t\t\tinitialization of the network\n+ *\t\t\t\t\tenvironment.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_net_env_characteristics_set(t_handle h_fm_pcd,\n+\t\t\t\t ioc_fm_pcd_net_env_params_t *p_netenv_params);\n+\n+/*\n+ * @Function\t  fm_pcd_net_env_characteristics_delete\n+ *\n+ * @Description   Deletes a set of Network Environment Characteristics.\n+ *\n+ * @Param[in]\t  h_net_env\tA handle to the Network environment.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_pcd_net_env_characteristics_delete(t_handle h_net_env);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_set\n+ *\n+ * @Description   Initializing or modifying and enabling a scheme for the\n+ *\t\t  KeyGen. This routine should be called for adding or modifying\n+ *\t\t  a scheme. When a scheme needs modifying, the API requires that\n+ *\t\t  it will be rewritten. In such a case 'modify' should be TRUE.\n+ *\t\t  If the routine is called for a valid scheme and 'modify' is\n+ *\t\t  FALSE, it will return error.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\tIf this is a new scheme - A handle to an\n+ *\t\t\t\t\tFM PCD Module. Otherwise NULL (ignored\n+ *\t\t\t\t\tby driver).\n+ * @Param[in,out] p_scheme_params\tA structure of parameters for defining\n+ *\t\t\t\t\tthe scheme\n+ *\n+ * @Return\t  A handle to the initialized scheme on success; NULL code\n+ *\t\t  otherwise. When used as \"modify\" (rather than for setting a\n+ *\t\t  new scheme), p_scheme_params->id.h_scheme will return NULL if\n+ *\t\t  action fails due to scheme BUSY state.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_kg_scheme_set(t_handle h_fm_pcd,\n+\t\t\t    ioc_fm_pcd_kg_scheme_params_t *p_scheme_params);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_delete\n+ *\n+ * @Description   Deleting an initialized scheme.\n+ *\n+ * @Param[in]\t  h_scheme\tscheme handle as returned by\n+ *\t\t\t\tfm_pcd_kg_scheme_set()\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().\n+ */\n+uint32_t\tfm_pcd_kg_scheme_delete(t_handle h_scheme);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_get_counter\n+ *\n+ * @Description   Reads scheme packet counter.\n+ *\n+ * @Param[in]\t  h_scheme\tscheme handle as returned by\n+ *\t\t\t\tfm_pcd_kg_scheme_set().\n+ *\n+ * @Return\t  Counter's current value.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().\n+ */\n+uint32_t  fm_pcd_kg_scheme_get_counter(t_handle h_scheme);\n+\n+/*\n+ * @Function\t  fm_pcd_kg_scheme_set_counter\n+ *\n+ * @Description   Writes scheme packet counter.\n+ *\n+ * @Param[in]\t  h_scheme\tscheme handle as returned by\n+ *\t\t\t\tfm_pcd_kg_scheme_set().\n+ * @Param[in]\t  value\t\tNew scheme counter value - typically '0' for\n+ *\t\t\t\tresetting the counter.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().\n+ */\n+uint32_t  fm_pcd_kg_scheme_set_counter(t_handle h_scheme,\n+\t\t\tuint32_t value);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_set\n+ *\n+ * @Description   Sets a profile entry in the policer profile table.\n+ *\t\t  The routine overrides any existing value.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tA handle to an FM PCD Module.\n+ * @Param[in]\t  p_profile\tA structure of parameters for defining a\n+ *\t\t\t\tpolicer profile entry.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise. When used as \"modify\" (rather than for setting a\n+ *\t\t  new profile), p_profile->id.h_profile will return NULL if\n+ *\t\t  action fails due to profile BUSY state.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_plcr_profile_set(t_handle h_fm_pcd,\n+\t\t\t       ioc_fm_pcd_plcr_profile_params_t  *p_profile);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_delete\n+ *\n+ * @Description   Delete a profile entry in the policer profile table.\n+ *\t\t  The routine set entry to invalid.\n+ *\n+ * @Param[in]\t  h_profile\tA handle to the profile.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_plcr_profile_delete(t_handle h_profile);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_get_counter\n+ *\n+ * @Description   Sets an entry in the classification plan.\n+ *\t\t  The routine overrides any existing value.\n+ *\n+ * @Param[in]\t  h_profile\tA handle to the profile.\n+ * @Param[in]\t  counter\tCounter selector.\n+ *\n+ * @Return\t  specific counter value.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_plcr_profile_get_counter(t_handle\th_profile,\n+\t\t\tioc_fm_pcd_plcr_profile_counters\tcounter);\n+\n+/*\n+ * @Function\t  fm_pcd_plcr_profile_set_counter\n+ *\n+ * @Description   Sets an entry in the classification plan.\n+ *\t\t  The routine overrides any existing value.\n+ *\n+ * @Param[in]\t  h_profile\tA handle to the profile.\n+ * @Param[in]\t  counter\tCounter selector.\n+ * @Param[in]\t  value\t\tvalue to set counter with.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_plcr_profile_set_counter(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\t  fm_pcd_cc_root_build\n+ *\n+ * @Description   This routine must be called to define a complete coarse\n+ *\t\t  classification tree. This is the way to define coarse\n+ *\t\t  classification to a certain flow - the KeyGen schemes may\n+ *\t\t  point only to trees defined in this way.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  p_params\tA structure of parameters to define the tree.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_cc_root_build(t_handle h_fm_pcd,\n+\t\t\t     ioc_fm_pcd_cc_tree_params_t  *p_params);\n+\n+/*\n+ * @Function\t  fm_pcd_cc_root_delete\n+ *\n+ * @Description   Deleting an built tree.\n+ *\n+ * @Param[in]\t  h_cc_tree\tA handle to a CC tree.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_cc_root_delete(t_handle h_cc_tree);\n+\n+/*\n+ * @Function\t  fm_pcd_cc_root_modify_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters in the entry of the tree.\n+ *\n+ * @Param[in]\t  h_cc_tree\t\t\tA handle to the tree\n+ * @Param[in]\t  grp_id\t\t\tA Group index in the tree\n+ * @Param[in]\t  index\t\t\t\tEntry index in the group\n+ *\t\t\t\t\t\tdefined by grp_id\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine\tPointer to new next\n+ *\t\t\t\t\t\tengine parameters\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following FM_PCD_CcBuildTree().\n+ */\n+uint32_t fm_pcd_cc_root_modify_next_engine(t_handle h_cc_tree,\n+\t\tuint8_t\t\tgrp_id,\n+\t\tuint8_t\t\tindex,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_set\n+ *\n+ * @Description   This routine should be called for each CC (coarse\n+ *\t\t  classification) node. The whole CC tree should be built bottom\n+ *\t\t  up so that each node points to already defined nodes.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  p_param\tA structure of parameters defining the CC node\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle   fm_pcd_match_table_set(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_cc_node_params_t *p_param);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_delete\n+ *\n+ * @Description   Deleting an built node.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to a CC node.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_match_table_delete(t_handle h_cc_node);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_miss_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters of the Miss key case of the\n+ *\t\t  node.\n+ *\n+ * @Param[in]\t  h_cc_node\t\t\t\tA handle to the node\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine_params\tParameters for defining\n+ *\t\t\t\t\t\t\tnext engine\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set(); Not\n+ *\t\t  relevant in the case the node is of type 'INDEXED_LOOKUP'.\n+ *\t\t  When configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ *\n+ */\n+uint32_t fm_pcd_match_table_modify_miss_next_engine(t_handle h_cc_node,\n+\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_remove_key\n+ *\n+ * @Description   Remove the key (including next engine parameters of this key)\n+ *\t\t  defined by the index of the relevant node.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to the node\n+ * @Param[in]\t  key_index\tKey index for removing\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ */\n+uint32_t fm_pcd_match_table_remove_key(t_handle h_cc_node,\n+\t\t\tuint16_t key_index);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_add_key\n+ *\n+ * @Description   Add the key (including next engine parameters of this key in\n+ *\t\t  the index defined by the key_index. Note that\n+ *\t\t  'FM_PCD_LAST_KEY_INDEX' may be used by user that don't care\n+ *\t\t  about the position of the key in the table - in that case, the\n+ *\t\t  key will be automatically added by the driver in the last\n+ *\t\t  available entry.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to the node\n+ * @Param[in]\t  key_index\tKey index for adding.\n+ * @Param[in]\t  key_size\tKey size of added key\n+ * @Param[in]\t  p_key_params\tA pointer to the parameters includes new key\n+ *\t\t\t\twith Next Engine Parameters\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ */\n+uint32_t fm_pcd_match_table_add_key(t_handle h_cc_node,\n+\t\t\t\tuint16_t\t\tkey_index,\n+\t\t\t\tuint8_t\t\tkey_size,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_key_params);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters in the relevant key entry of\n+ *\t\t  the node.\n+ *\n+ * @Param[in]\t  h_cc_node\t\t\tA handle to the node\n+ * @Param[in]\t  key_index\t\t\tKey index for Next\n+ *\t\t\t\t\t\tEngine modifications\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine\tParameters for defining\n+ *\t\t\t\t\t\tnext engine\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set(). When\n+ *\t\t  configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ *\n+ */\n+uint32_t fm_pcd_match_table_modify_next_engine(t_handle h_cc_node,\n+\t\tuint16_t\t\tkey_index,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_key_and_next_engine\n+ *\n+ * @Description   Modify the key and Next Engine Parameters of this key in the\n+ *\t\t  index defined by the key_index.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_index\t\tKey index for adding\n+ * @Param[in]\t  key_size\t\tKey size of added key\n+ * @Param[in]\t  p_key_params\t\tA pointer to the parameters includes\n+ *\t\t\t\t\tmodified key and modified Next Engine\n+ *\t\t\t\t\tParams\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\tAllowed only following fm_pcd_match_table_set() was called for\n+ *\t\tthis node and the nodes that lead to it. When configuring\n+ *\t\tnextEngine = e_FM_PCD_CC, note that\n+ *\t\tp_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\tdifferent from the currently changed table.\n+ */\n+uint32_t fm_pcd_match_table_modify_key_and_next_engine(t_handle h_cc_node,\n+\t\t\t\tuint16_t\t\tkey_index,\n+\t\t\t\tuint8_t\t\tkey_size,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_key_params);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_modify_key\n+ *\n+ * @Description   Modify the key in the index defined by the key_index.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_index\t\tKey index for adding\n+ * @Param[in]\t  key_size\t\tKey size of added key\n+ * @Param[in]\t  p_key\t\t\tA pointer to the new key\n+ * @Param[in]\t  p_mask\t\tA pointer to the new mask if relevant,\n+ *\t\t\t\t\totherwise pointer to NULL\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ */\n+uint32_t fm_pcd_match_table_modify_key(t_handle h_cc_node,\n+\t\t\t\tuint16_t key_index,\n+\t\t\t\tuint8_t  key_size,\n+\t\t\t\tuint8_t  *p_key,\n+\t\t\t\tuint8_t  *p_mask);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_find_nremove_key\n+ *\n+ * @Description   Remove the key (including next engine parameters of this key)\n+ *\t\t  defined by the key and mask. Note that this routine will\n+ *\t\t  search the node to locate the index of the required key\n+ *\t\t  (& mask) to remove.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to the node\n+ * @Param[in]\t  key_size\tKey size of the one to remove.\n+ * @Param[in]\t  p_key\t\tA pointer to the requested key to remove.\n+ * @Param[in]\t  p_mask\tA pointer to the mask if relevant,\n+ *\t\t\t\totherwise pointer to NULL\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ */\n+uint32_t fm_pcd_match_table_find_nremove_key(t_handle h_cc_node,\n+\t\t\t\t\tuint8_t  key_size,\n+\t\t\t\t\tuint8_t  *p_key,\n+\t\t\t\t\tuint8_t  *p_mask);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_find_nmodify_next_engine\n+ *\n+ * @Description   Modify the Next Engine Parameters in the relevant key entry of\n+ *\t\t  the node. Note that this routine will search the node to\n+ *\t\t  locate the index of the required key (& mask) to modify.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_size\t\tKey size of the one to modify.\n+ * @Param[in]\t  p_key\t\t\tA pointer to the requested key to modify\n+ * @Param[in]\t  p_mask\t\tA pointer to the mask if relevant,\n+ *\t\t\t\t\totherwise pointer to NULL\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine\tParameters for defining\n+ *\t\t\t\t\t\t\tnext engine\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set(). When\n+ *\t\t  configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ */\n+uint32_t fm_pcd_match_table_find_nmodify_next_engine(t_handle h_cc_node,\n+\t\tuint8_t\t\tkey_size,\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_fm_pcd_cc_next_engine);\n+\n+/*\n+ * @Function\t fm_pcd_match_table_find_nmodify_key_and_next_engine\n+ *\n+ * @Description   Modify the key and Next Engine Parameters of this key in the\n+ *\t\t  index defined by the key_index. Note that this routine will\n+ *\t\t  search the node to locate the index of the required key\n+ *\t\t  (& mask) to modify.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_size\t\tKey size of the one to modify.\n+ * @Param[in]\t  p_key\t\t\tA pointer to the requested key to modify\n+ * @Param[in]\t  p_mask\t\tA pointer to the mask if relevant,\n+ *\t\t\t\t\totherwise pointer to NULL\n+ * @Param[in]\t  p_key_params\t\tA pointer to the parameters includes\n+ *\t\t\t\t\tmodified key and modified Next Engine\n+ *\t\t\t\t\tParams\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ *\t\t  When configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ */\n+uint32_t fm_pcd_match_table_find_nmodify_key_and_next_engine(t_handle h_cc_node,\n+\t\t\t\tuint8_t key_size,\n+\t\t\t\tuint8_t *p_key,\n+\t\t\t\tuint8_t *p_mask,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t *p_key_params);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_find_nmodify_key\n+ *\n+ * @Description   Modify the key  in the index defined by the key_index. Note\n+ *\t\t  that this routine will search the node to locate the index of\n+ *\t\t  the required key (& mask) to modify.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to the node\n+ * @Param[in]\t  key_size\tKey size of the one to modify.\n+ * @Param[in]\t  p_key\t\tA pointer to the requested key to modify.\n+ * @Param[in]\t  p_mask\tA pointer to the mask if relevant,\n+ *\t\t\t\totherwise pointer to NULL\n+ * @Param[in]\t  p_new_key\tA pointer to the new key\n+ * @Param[in]\t  p_new_mask\tA pointer to the new mask if relevant,\n+ *\t\t\t\totherwise pointer to NULL\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set() was called for\n+ *\t\t  this node and the nodes that lead to it.\n+ */\n+uint32_t fm_pcd_match_table_find_nmodify_key(t_handle h_cc_node,\n+\t\t\t\t\tuint8_t  key_size,\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_new_key,\n+\t\t\t\t\tuint8_t  *p_new_mask);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_key_counter\n+ *\n+ * @Description   This routine may be used to get a counter of specific key in a\n+ *\t\t  CC Node; This counter reflects how many frames passed that\n+ *\t\t  were matched this key.\n+ *\n+ * @Param[in]\t  h_cc_node\tA handle to the node\n+ * @Param[in]\t  key_index\tKey index for adding\n+ *\n+ * @Return\t  The specific key counter.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+uint32_t fm_pcd_match_table_get_key_counter(t_handle h_cc_node,\n+\t\t\t\tuint16_t key_index);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_key_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of\n+ *\t\t  specific key in a CC Node.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames passed that were\n+ *\t\t  matched this key; The total frames count will be returned in\n+ *\t\t  the counter of the first range (as only one frame length range\n+ *\t\t  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for\n+ *\t\t  this node, the total frame count will be separated to frame\n+ *\t\t  length counters, based on provided frame length ranges.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_index\t\tKey index for adding\n+ * @Param[out]\t  p_key_statistics\tKey statistics counters\n+ *\n+ * @Return\t  The specific key statistics.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+uint32_t fm_pcd_match_table_get_key_statistics(t_handle h_cc_node,\n+\t\t\tuint16_t\t\tkey_index,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t\t*p_key_statistics);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_miss_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of miss\n+ *\t\t  entry in a CC Node.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames were not matched\n+ *\t\t  to any existing key and therefore passed through the miss\n+ *\t\t  entry; The total frames count will be returned in the counter\n+ *\t\t  of the first range (as only one frame length range was\n+ *\t\t  defined).\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[out]\t  p_miss_statistics\tStatistics counters for 'miss'\n+ *\n+ * @Return\t  The statistics for 'miss'.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+uint32_t fm_pcd_match_table_get_miss_statistics(t_handle h_cc_node,\n+\t\t    ioc_fm_pcd_cc_key_statistics_t\t*p_miss_statistics);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_find_nget_key_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of\n+ *\t\t  specific key in a CC Node.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames passed that were\n+ *\t\t  matched this key; The total frames count will be returned in\n+ *\t\t  the counter of the first range (as only one frame length range\n+ *\t\t  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for\n+ *\t\t  this node, the total frame count will be separated to frame\n+ *\t\t  length counters, based on provided frame length ranges.\n+ *\t\t  Note that this routine will search the node to locate the\n+ *\t\t  index of the required key based on received key parameters.\n+ *\n+ * @Param[in]\t  h_cc_node\t\tA handle to the node\n+ * @Param[in]\t  key_size\t\tSize of the requested key\n+ * @Param[in]\t  p_key\t\t\tA pointer to the requested key\n+ * @Param[in]\t  p_mask\t\tA pointer to the mask if relevant,\n+ *\t\t\t\t\totherwise pointer to NULL\n+ * @Param[out]\t  p_key_statistics\tKey statistics counters\n+ *\n+ * @Return\t  The specific key statistics.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_match_table_set().\n+ */\n+uint32_t fm_pcd_match_table_find_nget_key_statistics(t_handle h_cc_node,\n+\t\t\tuint8_t\t\tkey_size,\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_key_statistics);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_next_engine\n+ *\n+ * @Description   Gets NextEngine of the relevant key_index.\n+ *\n+ * @Param[in]\t  h_cc_node\t\t\t\tA handle to the node.\n+ * @Param[in]\t  key_index\t\t\t\tkey_index in the\n+ *\t\t\t\t\t\t\trelevant node.\n+ * @Param[out]\t  p_fm_pcd_cc_next_engine_params\there updated\n+ *\t\t\t\t\t\t\tnextEngine parameters\n+ *\t\t\t\t\t\t\tfor the relevant\n+ *\t\t\t\t\t\t\tkey_index of the CC Node\n+ *\t\t\t\t\t\t\treceived as parameter to\n+ *\t\t\t\t\t\t\tthis function\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+uint32_t fm_pcd_match_table_get_next_engine(t_handle\th_cc_node,\n+\tuint16_t\t\t\tkey_index,\n+\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);\n+\n+/*\n+ * @Function\t  fm_pcd_match_table_get_indexed_hash_bucket\n+ *\n+ * @Description   This routine simulates KeyGen operation on the provided key\n+ *\t\t  and calculates to which hash bucket it will be mapped.\n+ *\n+ * @Param[in]\t  h_cc_node\t\t\tA handle to the node.\n+ * @Param[in]\t  kg_key_size\t\t\tKey size as it was configured in\n+ *\t\t\t\t\t\tthe KG scheme that leads to this\n+ *\t\t\t\t\t\thash.\n+ * @Param[in]\t  p_kg_key\t\t\tPointer to the key; must be like\n+ *\t\t\t\t\t\tthe key that the KG is\n+ *\t\t\t\t\t\tgenerated, i.e. the same\n+ *\t\t\t\t\t\textraction and with mask if\n+ *\t\t\t\t\t\texist.\n+ * @Param[in]\t  kg_hash_shift\t\t\tHash-shift as it was configured\n+ *\t\t\t\t\t\tin the KG scheme that leads to\n+ *\t\t\t\t\t\tthis hash.\n+ * @Param[out]\t  p_cc_node_bucket_handle\tPointer to the bucket of the\n+ *\t\t\t\t\t\tprovided key.\n+ * @Param[out]\t  p_bucket_index\t\tIndex to the bucket of the\n+ *\t\t\t\t\t\tprovided key\n+ * @Param[out]\t  p_last_index\t\t\tPointer to last index in the\n+ *\t\t\t\t\t\tbucket of the provided key.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set()\n+ */\n+uint32_t fm_pcd_match_table_get_indexed_hash_bucket(t_handle h_cc_node,\n+\t\t\t\tuint8_t\tkg_key_size,\n+\t\t\t\tuint8_t\t*p_kg_key,\n+\t\t\t\tuint8_t\tkg_hash_shift,\n+\t\t\t\tt_handle\t*p_cc_node_bucket_handle,\n+\t\t\t\tuint8_t\t*p_bucket_index,\n+\t\t\t\tuint16_t\t*p_last_index);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_set\n+ *\n+ * @Description   This routine initializes a hash table structure.\n+ *\t\t  KeyGen hash result determines the hash bucket.\n+ *\t\t  Next, KeyGen key is compared against all keys of this bucket\n+ *\t\t  (exact match).\n+ *\t\t  Number of sets (number of buckets) of the hash equals to the\n+ *\t\t  number of 1-s in 'hashResMask' in the provided parameters.\n+ *\t\t  Number 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\t  maximal number of keys that a hash bucket may hold.\n+ *\t\t  The hash table is initialized empty and keys may be added to\n+ *\t\t  it following the initialization. Keys masks are not supported\n+ *\t\t  in current hash table implementation.\n+ *\t\t  The initialized hash table can be integrated as a node in a CC\n+ *\t\t  tree.\n+ *\n+ * @Param[in]\t  h_fm_pcd\tFM PCD module descriptor.\n+ * @Param[in]\t  p_param\tA structure of parameters defining the hash\n+ *\t\t\t\ttable\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_hash_table_set(t_handle h_fm_pcd,\n+\tioc_fm_pcd_hash_table_params_t *p_param);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_delete\n+ *\n+ * @Description   This routine deletes the provided hash table and released all\n+ *\t\t  its allocated resources.\n+ *\n+ * @Param[in]\t  h_hash_tbl\tA handle to a hash table\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_delete(t_handle h_hash_tbl);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_add_key\n+ *\n+ * @Description   This routine adds the provided key (including next engine\n+ *\t\t  parameters of this key) to the hash table.\n+ *\t\t  The key is added as the last key of the bucket that it is\n+ *\t\t  mapped to.\n+ *\n+ * @Param[in]\t  h_hash_tbl\tA handle to a hash table\n+ * @Param[in]\t  key_size\tKey size of added key\n+ * @Param[in]\t  p_key_params  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\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_add_key(t_handle h_hash_tbl,\n+\t\t\t\tuint8_t\t\tkey_size,\n+\t\t\t\tioc_fm_pcd_cc_key_params_t  *p_key_params);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_remove_key\n+ *\n+ * @Description   This routine removes the requested key (including next engine\n+ *\t\t  parameters of this key) from the hash table.\n+ *\n+ * @Param[in]\t  h_hash_tbl\tA handle to a hash table\n+ * @Param[in]\t  key_size\tKey size of the one to remove.\n+ * @Param[in]\t  p_key\t\tA pointer to the requested key to remove.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_remove_key(t_handle h_hash_tbl,\n+\t\t\t\tuint8_t  key_size,\n+\t\t\t\tuint8_t  *p_key);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_modify_next_engine\n+ *\n+ * @Description   This routine modifies the next engine for the provided key.\n+ *\t\t  The key should be previously added to the hash table.\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\t\tA handle to a hash table\n+ * @Param[in]\t  key_size\t\t\tKey size of the key to modify.\n+ * @Param[in]\t  p_key\t\t\t\tA pointer to the requested key\n+ *\t\t\t\t\t\tto modify.\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine\tA structure for defining\n+ *\t\t\t\t\t\tnew next engine parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ *\t\t  When configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ */\n+uint32_t fm_pcd_hash_table_modify_next_engine(t_handle h_hash_tbl,\n+\t\tuint8_t\t\tkey_size,\n+\t\tuint8_t\t\t*p_key,\n+\t\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_modify_miss_next_engine\n+ *\n+ * @Description   This routine modifies the next engine on key match miss.\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\t\tA handle to a hash table\n+ * @Param[in]\t  p_fm_pcd_cc_next_engine\tA structure for defining\n+ *\t\t\t\t\t\tnew next engine parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ *\t\t  When configuring nextEngine = e_FM_PCD_CC, note that\n+ *\t\t  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be\n+ *\t\t  different from the currently changed table.\n+ */\n+uint32_t fm_pcd_hash_table_modify_miss_next_engine(t_handle h_hash_tbl,\n+\t      ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_get_miss_next_engine\n+ *\n+ * @Description   Gets NextEngine in case of key match miss.\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\t\t\tA handle to a hash table\n+ * @Param[out]\t  p_fm_pcd_cc_next_engine_params\tNext engine parameters\n+ *\t\t\t\t\t\t\tfor the specified hash\n+ *\t\t\t\t\t\t\ttable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_get_miss_next_engine(t_handle\th_hash_tbl,\n+\tioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_find_nget_key_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of\n+ *\t\t  specific key in a hash table.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames passed that were\n+ *\t\t  matched this key; The total frames count will be returned in\n+ *\t\t  the counter of the first range (as only one frame length range\n+ *\t\t  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for\n+ *\t\t  this node, the total frame count will be separated to frame\n+ *\t\t  length counters, based on provided frame length ranges. Note\n+ *\t\t  that this routine will identify the bucket of this key in the\n+ *\t\t  hash table and will search the bucket to locate the index of\n+ *\t\t  the required key based on received key parameters.\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\tA handle to a hash table\n+ * @Param[in]\t  key_size\t\tSize of the requested key\n+ * @Param[in]\t  p_key\t\t\tA pointer to the requested key\n+ * @Param[out]\t  p_key_statistics\tKey statistics counters\n+ *\n+ * @Return\t  The specific key statistics.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_find_nget_key_statistics(t_handle h_hash_tbl,\n+\t\t\tuint8_t\t\tkey_size,\n+\t\t\tuint8_t\t\t*p_key,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t   *p_key_statistics);\n+\n+/*\n+ * @Function\t  fm_pcd_hash_table_get_miss_statistics\n+ *\n+ * @Description   This routine may be used to get statistics counters of 'miss'\n+ *\t\t  entry of the a hash table.\n+ *\n+ *\t\t  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and\n+ *\t\t  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this\n+ *\t\t  node, these counters reflect how many frames were not matched\n+ *\t\t  to any existing key and therefore passed through the miss\n+ *\t\t  entry;\n+ *\n+ * @Param[in]\t  h_hash_tbl\t\tA handle to a hash table\n+ * @Param[out]\t  p_miss_statistics\tStatistics counters for 'miss'\n+ *\n+ * @Return\t  The statistics for 'miss'.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_hash_table_set().\n+ */\n+uint32_t fm_pcd_hash_table_get_miss_statistics(t_handle\th_hash_tbl,\n+\t\t\tioc_fm_pcd_cc_key_statistics_t   *p_miss_statistics);\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_set\n+ *\n+ * @Description   This routine should be called for defining a manipulation\n+ *\t\t  node. A manipulation node must be defined before the CC node\n+ *\t\t  that precedes it.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\t\tFM PCD module descriptor.\n+ * @Param[in]\t  p_fm_pcd_manip_params\t\tA structure of parameters\n+ *\t\t\t\t\t\tdefining the manipulation\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_manip_node_set(t_handle h_fm_pcd,\n+\tioc_fm_pcd_manip_params_t *p_fm_pcd_manip_params);\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_delete\n+ *\n+ * @Description   Delete an existing manipulation node.\n+ *\n+ * @Param[in]\t  h_manip_node\t\tA handle to a manipulation node.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_manip_node_set().\n+ */\n+uint32_t  fm_pcd_manip_node_delete(t_handle h_manip_node);\n+\n+/*\n+ * @Function\t  fm_pcd_manip_get_statistics\n+ *\n+ * @Description   Retrieve the manipulation statistics.\n+ *\n+ * @Param[in]\t  h_manip_node\t\tA handle to a manipulation node.\n+ * @Param[out]\t  p_fm_pcd_manip_stats\tA structure for retrieving the\n+ *\t\t\t\t\tmanipulation statistics\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_manip_node_set().\n+ */\n+uint32_t fm_pcd_manip_get_statistics(t_handle h_manip_node,\n+\tioc_fm_pcd_manip_stats_t *p_fm_pcd_manip_stats);\n+\n+/*\n+ * @Function\t  fm_pcd_manip_node_replace\n+ *\n+ * @Description   Change existing manipulation node to be according to new\n+ *\t\t  requirement.\n+ *\n+ * @Param[in]\t  h_manip_node\t\tA handle to a manipulation node.\n+ * @Param[out]\t  p_manip_params\tA structure of parameters defining the\n+ *\t\t\t\t\tchange requirement\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_manip_node_set().\n+ */\n+uint32_t fm_pcd_manip_node_replace(t_handle h_manip_node,\n+ioc_fm_pcd_manip_params_t *p_manip_params);\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_set_group\n+ *\n+ * @Description   Initialize a Frame Replicator group.\n+ *\n+ * @Param[in]\t  h_fm_pcd\t\t\tFM PCD module descriptor.\n+ * @Param[in]\t  p_frm_replic_group_param\tA structure of parameters for\n+ *\t\t\t\t\t\tthe initialization of the frame\n+ *\t\t\t\t\t\treplicator group.\n+ *\n+ * @Return\t  A handle to the initialized object on success; NULL code\n+ *\t\t  otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_init().\n+ */\n+t_handle fm_pcd_frm_replic_set_group(t_handle h_fm_pcd,\n+\t\tioc_fm_pcd_frm_replic_group_params_t *p_frm_replic_group_param);\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_delete_group\n+ *\n+ * @Description   Delete a Frame Replicator group.\n+ *\n+ * @Param[in]\t  h_frm_replic_group\tA handle to the frame replicator group.\n+ *\n+ * @Return\t  E_OK on success;  Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group().\n+ */\n+uint32_t fm_pcd_frm_replic_delete_group(t_handle h_frm_replic_group);\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_add_member\n+ *\n+ * @Description   Add the member in the index defined by the member_index.\n+ *\n+ * @Param[in]\t  h_frm_replic_group\tA handle to the frame replicator group.\n+ * @Param[in]\t  member_index\t\tmember index for adding.\n+ * @Param[in]\t  p_member_params\tA pointer to the new member parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group() of this\n+ *\t\t  group.\n+ */\n+uint32_t fm_pcd_frm_replic_add_member(t_handle h_frm_replic_group,\n+\t\t\tuint16_t\t\tmember_index,\n+\t\t\tioc_fm_pcd_cc_next_engine_params_t *p_member_params);\n+\n+/*\n+ * @Function\t  fm_pcd_frm_replic_remove_member\n+ *\n+ * @Description   Remove the member defined by the index from the relevant\n+ *\t\t  group.\n+ *\n+ * @Param[in]\t  h_frm_replic_group\tA handle to the frame replicator group.\n+ * @Param[in]\t  member_index\t\tmember index for removing.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_pcd_frm_replic_set_group() of this\n+ * group.\n+ */\n+uint32_t fm_pcd_frm_replic_remove_member(t_handle h_frm_replic_group,\n+\t\t\t\t      uint16_t member_index);\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..6f5479fbe\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/fm_port_ext.h\n@@ -0,0 +1,3350 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\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\t  lnx_ioctl_FM_grp Frame Manager Linux IOCTL API\n+ *\n+ * @Description   FM Linux ioctls definitions and enums\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Group\t  lnx_ioctl_FM_PORT_grp FM Port\n+ *\n+ * @Description   FM Port API\n+ *\n+ *\t\t  The FM uses a general module called \"port\" to represent a Tx\n+ *\t\t  port (MAC), an Rx port (MAC), offline parsing flow or host\n+ *\t\t  command flow. There may be up to 17 (may change) ports in an\n+ *\t\t  FM - 5 Tx ports (4 for the 1G MACs, 1 for the 10G MAC), 5 Rx\n+ *\t\t  Ports, and 7 Host command/Offline parsing ports. The SW driver\n+ *\t\t  manages these ports as sub-modules of the FM, i.e. after an FM\n+ *\t\t  is initialized, its ports may be initialized and operated\n+ *\t\t  upon.\n+ *\n+ *\t\t  The port is initialized aware of its type, but other functions\n+ *\t\t  on a port may be indifferent to its type. When necessary, the\n+ *\t\t  driver verifies coherency and returns error if applicable.\n+ *\n+ *\t\t  On initialization, user specifies the port type and it's index\n+ *\t\t  (relative to the port's type). Host command and Offline\n+ *\t\t  parsing ports share the same id range, I.e user may not\n+ *\t\t  initialized host command port 0 and offline parsing port 0.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Description   An enum for defining port PCD modes.\n+ *\t\t  (Must match enum e_fm_port_pcd_support defined in\n+ *\t\t  fm_port_ext.h)\n+ *\n+ *\t\t  This enum defines the superset of PCD engines support - i.e.\n+ *\t\t  not all engines have to be used, but all have to be enabled.\n+ *\t\t  The real flow of a specific frame depends on the PCD\n+ *\t\t  configuration and the frame headers and payload. Note: the\n+ *\t\t  first engine and the first engine after the parser (if exists)\n+ *\t\t  should be in order, the order is important as it will define\n+ *\t\t  the flow of the port. However, as for the rest engines (the\n+ *\t\t  ones that follows), the order is not important anymore as it\n+ *\t\t  is defined by the PCD graph itself.\n+ */\n+typedef enum ioc_fm_port_pcd_support {\n+\te_IOC_FM_PCD_NONE = 0\n+\t\t\t/**< BMI to BMI, PCD is not used */\n+\t, e_IOC_FM_PCD_PRS_ONLY\t/**< Use only Parser */\n+\t, e_IOC_FM_PCD_PLCR_ONLY\t/**< Use only Policer */\n+\t, e_IOC_FM_PCD_PRS_PLCR/**< Use Parser and Policer */\n+\t, e_IOC_FM_PCD_PRS_KG\t/**< Use Parser and Keygen */\n+\t, e_IOC_FM_PCD_PRS_KG_AND_CC\n+\t\t\t/**< Use Parser, Keygen and Coarse Classification */\n+\t, e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR\n+\t\t\t/**< Use all PCD engines */\n+\t, e_IOC_FM_PCD_PRS_KG_AND_PLCR\n+\t\t\t/**< Use Parser, Keygen and Policer */\n+\t, e_IOC_FM_PCD_PRS_CC\n+\t\t\t/**< Use Parser and Coarse Classification */\n+\t, e_IOC_FM_PCD_PRS_CC_AND_PLCR\n+\t\t\t/**< Use Parser and Coarse Classification and Policer */\n+\t, e_IOC_FM_PCD_CC_ONLY\n+\t\t\t/**< Use only Coarse Classification */\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\t  (Must match e_fm_port_dual_rate_limiter_scale_down defined in\n+ *\t\t  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\t  (Must match struct t_fm_port_rate_limit defined in\n+ *\t\t  fm_port_ext.h)\n+ */\n+typedef struct ioc_fm_port_rate_limit_t {\n+\tuint16_t\tmax_burst_size;\n+\t\t\t/**< in KBytes for Tx ports, in frames for offline\n+\t\t\t * parsing ports. (note that for early chips burst size\n+\t\t\t * is rounded up to a multiply of 1000 frames).\n+\t\t\t */\n+\tuint32_t\trate_limit;\n+\t\t\t/**< in Kb/sec for Tx ports, in frame/sec for offline\n+\t\t\t * parsing ports. Rate limit refers to data rate (rather\n+\t\t\t * than line rate).\n+\t\t\t */\n+\tioc_fm_port_dual_rate_limiter_scale_down rate_limit_divider;\n+\t\t\t/**< For offline parsing ports only. Not-valid for some\n+\t\t\t * earlier chip revisions\n+\t\t\t */\n+} ioc_fm_port_rate_limit_t;\n+\n+\n+/*\n+ * @Group\t  lnx_ioctl_FM_PORT_runtime_control_grp FM Port Runtime Control\n+ *\t\t  Unit\n+ *\n+ * @Description   FM Port Runtime control unit API functions, definitions and\n+ *\t\t  enums.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Description   An enum for defining FM Port counters.\n+ *\t\t  (Must match enum e_fm_port_counters 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/**< 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/**< BMI deallocate buffer statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_BAD_FRAME,\n+\t\t\t\t/**< BMI Rx only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_LARGE_FRAME,\n+\t\t\t\t/**< BMI Rx only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_FILTER_FRAME,\n+\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/**< BMI Rx, OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD,\n+\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/**< BMI Rx, OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_WRED_DISCARD,\n+\t\t\t\t/**< BMI OP & HC only statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_LENGTH_ERR,\n+\t\t\t\t/**< BMI non-Rx statistics counter */\n+\te_IOC_FM_PORT_COUNTERS_UNSUPPRTED_FORMAT,\n+\t\t\t\t/**< 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\t  must match struct t_fm_port_congestion_grps defined in\n+ *\t\t  fm_port_ext.h)\n+ *\n+ *\t\t  Fields commented 'IN' are passed by the port module to be used\n+ *\t\t  by the FM module. Fields commented 'OUT' will be filled by FM\n+ *\t\t  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 to define\n+\t\t\t * the size of the following array\n+\t\t\t */\n+\tuint8_t\tcongestion_grps_to_consider[FM_NUM_CONG_GRPS];\n+\t\t\t/**< An array of CG indexes; Note that the size of the\n+\t\t\t * array should be 'num_of_congestion_grps_to_consider'.\n+\t\t\t */\n+\tbool\tpfc_priorities_enable[FM_NUM_CONG_GRPS][FM_MAX_PFC_PRIO];\n+\t\t\t/**< A matrix that represents the map between the CG ids\n+\t\t\t * defined in 'congestion_grps_to_consider' to the\n+\t\t\t * priorities mapping array.\n+\t\t\t */\n+} ioc_fm_port_congestion_groups_t;\n+\n+\n+/*\n+ * @Function\t  fm_port_disable\n+ *\n+ * @Description   Gracefully disable an FM port. The port will not start new\n+ *\t\t  tasks after all tasks associated with the port are terminated.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  This is a blocking routine, it returns after port is\n+ *\t\t  gracefully stopped, i.e. the port will not except new frames,\n+ *\t\t  but it will finish all frames or tasks which were already\n+ *\t\t  began\n+ */\n+#define FM_PORT_IOC_DISABLE   _IO(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(1))\n+\n+/*\n+ * @Function\t  fm_port_enable\n+ *\n+ * @Description   A runtime routine provided to allow disable/enable of port.\n+ *\n+ * @Return\t  0 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\t  fm_port_set_rate_limit\n+ *\n+ * @Description   Calling this routine enables rate limit algorithm.\n+ *\t\t  By default, this functionality is disabled.\n+ *\n+ *\t\t  Note that rate - limit mechanism uses the FM time stamp.\n+ *\t\t  The selected rate limit specified here would be\n+ *\t\t  rounded DOWN to the nearest 16M.\n+ *\n+ *\t\t  May be used for Tx and offline parsing ports only\n+ *\n+ * @Param[in]\t  ioc_fm_port_rate_limit\tA structure of rate limit\n+ *\t\t\t\t\t\tparameters\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\t  fm_port_delete_rate_limit\n+ *\n+ * @Description   Calling this routine disables the previously enabled rate\n+ *\t\t  limit.\n+ *\n+ *\t\t  May be used for Tx and offline parsing ports only\n+ *\n+ * @Return\t  0 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\t  fm_port_add_congestion_grps\n+ *\n+ * @Description   This routine effects the corresponding Tx port.\n+ *\t\t  It should be called in order to enable pause frame\n+ *\t\t  transmission in case of congestion in one or more of the\n+ *\t\t  congestion groups relevant to this port.\n+ *\t\t  Each call to this routine may add one or more congestion\n+ *\t\t  groups to be considered relevant to this port.\n+ *\n+ *\t\t  May be used for Rx, or RX+OP ports only (depending on chip)\n+ *\n+ * @Param[in]\t  ioc_fm_port_congestion_groups_t\tA pointer to an array of\n+ *\t\t\t\t\t\t\tcongestion group ids to\n+ *\t\t\t\t\t\t\tconsider.\n+ *\n+ * @Return\t  0 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), \\\n+\t     ioc_fm_port_congestion_groups_t)\n+\n+/*\n+ * @Function\tfm_port_remove_congestion_grps\n+ *\n+ * @Description   This routine effects the corresponding Tx port. It should be\n+ *\t\t  called when congestion groups were defined for this port and\n+ *\t\t  are no longer relevant, or pause frames transmitting is not\n+ *\t\t  required on their behalf. Each call to this routine may remove\n+ *\t\t  one or more congestion groups to be considered relevant to\n+ *\t\t  this port.\n+ *\n+ *\t\t  May be used for Rx, or RX+OP ports only (depending on chip)\n+ *\n+ * @Param[in]\t  ioc_fm_port_congestion_groups_t\tA pointer to an array of\n+ *\t\t\t\t\t\t\tcongestion group ids to\n+ *\t\t\t\t\t\t\tconsider.\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), \\\n+\t     ioc_fm_port_congestion_groups_t)\n+\n+/*\n+ * @Function\t  fm_port_set_errors_route\n+ *\n+ * @Description   Errors selected for this routine will cause a frame with that\n+ *\t\t  error to be enqueued to error queue.\n+ *\t\t  Errors not selected for this routine will cause a frame with\n+ *\t\t  that error to be enqueued to the one of the other port queues.\n+ *\t\t  By default all errors are defined to be enqueued to error\n+ *\t\t  queue. Errors that were configured to be discarded (at\n+ *\t\t  initialization) may not be selected here.\n+ *\n+ *\t\t  May be used for Rx and offline parsing ports only\n+ *\n+ * @Param[in]\t  ioc_fm_port_frame_err_select_t\tA list of errors to\n+ *\t\t\t\t\t\t\tenqueue to error queue\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ *\t\t  (szbs001: How is it possible to have one function that needs\n+ *\t\t  to be called BEFORE fm_port_init() implemented as an ioctl,\n+ *\t\t  which will ALWAYS be called AFTER the fm_port_init() for that\n+ I\t\t  port!?!?!?!???!?!??!?!?)\n+ */\n+#define FM_PORT_IOC_SET_ERRORS_ROUTE \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(4), \\\n+\t     ioc_fm_port_frame_err_select_t)\n+\n+/*\n+ * @Group\t  lnx_ioctl_FM_PORT_pcd_runtime_control_grp FM Port PCD Runtime\n+ *\t\t  Control Unit\n+ *\n+ * @Description   FM Port PCD Runtime control unit API functions, definitions\n+ *\t\t  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\n+ *\t\t  fm_port_ext.h)\n+ *\n+ *\t\t  This is relevant only to change scheme selection mode - from\n+ *\t\t  direct to indirect and vice versa, or when the scheme is\n+ *\t\t  selected directly, to select the scheme id.\n+ *\n+ */\n+typedef struct ioc_fm_pcd_kg_scheme_select_t {\n+\tbool\tdirect;\n+\t\t/**< TRUE to use 'scheme_id' directly, FALSE to use LCV.*/\n+\tvoid\t*scheme_id;\n+\t\t/**< Relevant for 'direct'=TRUE only. 'scheme_id' selects the\n+\t\t * scheme after parser.\n+\t\t */\n+} ioc_fm_pcd_kg_scheme_select_t;\n+\n+/*\n+ * @Description   Scheme IDs structure\n+ *\t\t  (Must match struct ioc_fm_pcd_port_schemes_params_t defined\n+ *\t\t  in fm_port_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_port_schemes_params_t {\n+\tuint8_t\tnum_schemes;\n+\t\t/**< Number of schemes for port to be bound to. */\n+\tvoid\t*scheme_ids[FM_PCD_KG_NUM_OF_SCHEMES];\n+\t\t/**< Array of 'num_schemes' schemes for the port to be bound\n+\t\t * to\n+\t\t */\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/**< When this bit is set, the last MPLS label will be\n+\t\t * interpreted as described in HW spec table. When the bit is\n+\t\t * cleared, the parser will advance to MPLS next parse\n+\t\t */\n+\tioc_net_header_type next_parse;\n+\t\t/**< 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/**< User defined Tag Protocol Identifier, to be recognized on\n+\t\t * VLAN TAG on top of 0x8100 and 0x88A8\n+\t\t */\n+\tuint16_t\ttag_protocol_id2;\n+\t\t/**< User defined Tag Protocol Identifier, to be recognized on\n+\t\t * VLAN TAG on top of 0x8100 and 0x88A8\n+\t\t */\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\n+ *\t\t  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;\n+\t\t/**< Enable jump to SW parser when this header is recognized by\n+\t\t * the HW parser.\n+\t\t */\n+\tuint8_t\tindex_per_hdr;\n+\t\t/**< Normally 0, if more than one sw parser attachments exists\n+\t\t * for the same header, (in the main sw parser code) use this\n+\t\t * index to distinguish between them.\n+\t\t */\n+\tbool\tuse_prs_opts;\t/**< TRUE to use parser options. */\n+\tioc_fm_pcd_hdr_prs_opts_u prs_opts;\n+\t\t/**< A unuion according to header type, defining the parser\n+\t\t * options selected.\n+\t\t */\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_fm_portPcdPrsParams 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/**< The private info provides a method of inserting port\n+\t\t * information into the parser result. This information may be\n+\t\t * extracted by KeyGen and be used for frames distribution when\n+\t\t * a per-port distinction is required, it may also be used as a\n+\t\t * port logical id for analyzing incoming frames.\n+\t\t */\n+\tuint8_t\t\tparsing_offset;\n+\t\t/**< Number of bytes from beginning of packet to start parsing\n+\t\t */\n+\tioc_net_header_type\tfirst_prs_hdr;\n+\t\t/**< The type of the first header axpected at 'parsing_offset'\n+\t\t */\n+\tbool\t\tinclude_in_prs_statistics;\n+\t\t/**< TRUE to include this port in the parser statistics */\n+\tuint8_t\t\tnum_of_hdrs_with_additional_params;\n+\t\t/**< Normally 0, some headers may get special parameters */\n+\tioc_fm_pcd_prs_additional_hdr_params_t\n+\t\t\tadditional_params[IOC_FM_PCD_PRS_NUM_OF_HDRS];\n+\t\t/**< 'num_of_hdrs_with_additional_params' structures additional\n+\t\t * parameters for each header that requires them\n+\t\t */\n+\tbool\t\tset_vlan_tpid1;\n+\t\t/**< TRUE to configure user selection of Ethertype to indicate a\n+\t\t * VLAN tag (in addition to the TPID values 0x8100 and 0x88A8).\n+\t\t */\n+\tuint16_t\tvlan_tpid1;\n+\t\t/**< extra tag to use if set_vlan_tpid1=TRUE. */\n+\tbool\t\tset_vlan_tpid2;\n+\t\t/**< TRUE to configure user selection of Ethertype to indicate a\n+\t\t * VLAN tag (in addition to the TPID values 0x8100 and 0x88A8).\n+\t\t */\n+\tuint16_t\tvlan_tpid2;\n+\t\t/**< 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_fm_portPcdCcParams 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_fm_portPcdKgParams defined in fm_port_ext.h)\n+ */\n+typedef struct ioc_fm_port_pcd_kg_params_t {\n+\tuint8_t\t\tnum_schemes;\n+\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/**< Array of 'num_schemes' schemes for the port to\n+\t\t\t * be bound to\n+\t\t\t */\n+\tbool\t\tdirect_scheme;\n+\t\t\t/**< TRUE for going from parser to a specific scheme,\n+\t\t\t * regardless of parser result\n+\t\t\t */\n+\tvoid\t\t*direct_scheme_id;\n+\t\t\t/**< Scheme id, as returned by FM_PCD_KgSetScheme;\n+\t\t\t * relevant only if direct=TRUE.\n+\t\t\t */\n+} ioc_fm_port_pcd_kg_params_t;\n+\n+/*\n+ * @Description   A structure for defining policer parameters\n+ *\t\t  (Must match t_fm_portPcdPlcrParams defined in fm_port_ext.h)\n+ */\n+typedef struct ioc_fm_port_pcd_plcr_params_t {\n+\tvoid\t*plcr_profile_id;\n+\t\t/**< Selected profile handle;\n+\t\t * relevant in one of the following cases:\n+\t\t * e_IOC_FM_PCD_PLCR_ONLY or\n+\t\t * e_IOC_FM_PCD_PRS_PLCR were selected, or if\n+\t\t * any flow uses a KG scheme where policer profile is not\n+\t\t * generated (bypass_plcr_profile_generation selected)\n+\t\t */\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_fm_portPcdParams defined in\n+ *\t\t  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/**< Relevant for Rx and offline ports only.\n+\t\t * Describes the active PCD engines for this port.\n+\t\t */\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/**< Parser parameters for this port */\n+\tioc_fm_port_pcd_cc_params_t\t*p_cc_params;\n+\t\t/**< Coarse classification parameters for this port */\n+\tioc_fm_port_pcd_kg_params_t\t*p_kg_params;\n+\t\t/**< Keygen parameters for this port */\n+\tioc_fm_port_pcd_plcr_params_t\t*p_plcr_params;\n+\t\t/**< Policer parameters for this port */\n+\tvoid\t\t*p_ip_reassembly_manip;\n+\t\t/**< IP Reassembly manipulation */\n+\tvoid\t\t*p_capwap_reassembly_manip;\n+\t\t/**< CAPWAP Reassembly manipulation */\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\n+ *\t\t  fm_port_ext.h)\n+ */\n+typedef struct ioc_fm_pcd_prs_start_t {\n+\tuint8_t\tparsing_offset;\n+\t\t/**< Number of bytes from beginning of packet to start parsing\n+\t\t */\n+\tioc_net_header_type first_prs_hdr;\n+\t\t/**< The type of the first header axpected at 'parsing_offset'\n+\t\t */\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;\n+\t\t/**< Number of fqids to be allocated for the port */\n+\tuint8_t\t\talignment;\n+\t\t/**< Alignment required for this port */\n+\tuint32_t\tbase_fqid;\n+\t\t/**< output parameter - the base fqid */\n+} ioc_fm_port_pcd_fqids_params_t;\n+\n+/*\n+ * @Function\t  FM_PORT_IOC_ALLOC_PCD_FQIDS\n+ *\n+ * @Description   Allocates FQID's\n+ *\t\t  May be used for Rx and offline parsing ports only\n+ *\n+ * @Param[in,out] ioc_fm_port_pcd_fqids_params_t\tParameters for\n+ *\t\t\t\t\t\t\tallocating FQID's\n+ *\n+ * @Return\t  0 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), \\\n+\t      ioc_fm_port_pcd_fqids_params_t)\n+\n+/*\n+ * @Function\t  FM_PORT_IOC_FREE_PCD_FQIDS\n+ *\n+ * @Description   Frees previously-allocated FQIDs\n+ *\t\t  May be used for Rx and offline parsing ports only\n+ *\n+ * @Param[in]\t  uint32_t\tBase FQID of previously allocated range.\n+ *\n+ * @Return\t  0 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_set_pcd\n+ *\n+ * @Description   Calling this routine defines the port's PCD configuration.\n+ *\t\t  It changes it from its default configuration which is PCD\n+ *\t\t  disabled (BMI to BMI) and configures it according to the\n+ *\t\t  passed parameters.\n+ *\t\t  May be used for Rx and offline parsing ports only\n+ *\n+ * @Param[in]\t  ioc_fm_port_pcd_params_t\tA Structure of parameters\n+ *\t\t\t\t\t\tdefining the port's PCD\n+ *\t\t\t\t\t\tconfiguration.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ */\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\t  fm_port_delete_pcd\n+ *\n+ * @Description   Calling this routine releases the port's PCD configuration.\n+ *\t\t  The port returns to its default configuration which is PCD\n+ *\t\t  disabled (BMI to BMI) and all PCD configuration is removed.\n+ *\t\t  May be used for Rx and offline parsing ports which are in PCD\n+ *\t\t  mode only\n+ *\n+ * @Return\t  0 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\t  fm_port_attach_pcd\n+ *\n+ * @Description   This routine may be called after fm_port_detach_pcd was\n+ *\t\t  called, to return to the originally configured PCD support\n+ *\t\t  flow. The couple of routines are used to allow PCD\n+ *\t\t  configuration changes that demand that PCD will not be used\n+ *\t\t  while changes take place.\n+ *\n+ *\t\t  May be used for Rx and offline parsing ports which are in PCD\n+ *\t\t  mode only\n+ *\n+ * @Return\t  0 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\t  fm_port_detach_pcd\n+ *\n+ * @Description   Calling this routine detaches the port from its PCD\n+ *\t\t  functionality. The port returns to its default flow which is\n+ *\t\t  BMI to BMI.\n+ *\n+ *\t\t  May be used for Rx and offline parsing ports which are in PCD\n+ *\t\t  mode only\n+ *\n+ * @Return\t  0 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\t  fm_port_pcd_plcr_alloc_profiles\n+ *\n+ * @Description   This routine may be called only for ports that use the Policer\n+ *\t\t  in order to allocate private policer profiles.\n+ *\n+ * @Param[in]\t  uint16_t\tThe number of required policer profiles\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed before fm_port_set_pcd() 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\t  fm_port_pcd_plcr_free_profiles\n+ *\n+ * @Description   This routine should be called for freeing private policer\n+ *\t\t  profiles.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed before fm_port_set_pcd() 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\t  fm_port_pcd_kg_modify_initial_scheme\n+ *\n+ * @Description   This routine may be called only for ports that use the keygen\n+ *\t\t  in order to change the initial scheme frame should be routed\n+ *\t\t  to.The change may be of a scheme id (in case of direct mode),\n+ *\t\t  from direct to indirect, or from indirect to direct -\n+ *\t\t  specifying the scheme id.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_kg_scheme_select_t\n+ *\t\t  A structure of parameters for defining whether a scheme is\n+ *\t\t  direct/indirect, and if direct - scheme id.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ */\n+#define FM_PORT_IOC_PCD_KG_MODIFY_INITIAL_SCHEME \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(26), \\\n+\t     ioc_fm_pcd_kg_scheme_select_t)\n+\n+/*\n+ * @Function\t  fm_port_pcd_plcr_modify_initial_profile\n+ *\n+ * @Description   This routine may be called for ports with flows\n+ *\t\t  e_IOC_FM_PCD_SUPPORT_PLCR_ONLY or\n+ *\t\t  e_IOC_FM_PCD_SUPPORT_PRS_AND_PLCR only, to change the initial\n+ *\t\t  Policer profile frame should be routed to.\n+ *\t\t  The change may be of a profile and / or absolute / direct mode\n+ *\t\t  selection.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\t\tPolicer profile Id as returned from\n+ *\t\t\t\t\tFM_PCD_PlcrSetProfile.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ */\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\t  fm_port_pcd_cc_modify_tree\n+ *\n+ * @Description   This routine may be called to change this port connection to\n+ *\t\t  a pre - initializes coarse classification Tree.\n+ *\n+ * @Param[in]\t  ioc_fm_obj_t\tId of new coarse classification tree selected\n+ *\t\t\t\tfor this port.\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_set_pcd() and\n+ *\t\t  fm_port_detach_pcd()\n+ */\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\t  fm_port_pcd_kg_bind_schemes\n+ *\n+ * @Description   These routines may be called for modifying the binding of\n+ *\t\t  ports to schemes. The scheme itself is not added, just this\n+ *\t\t  specific port starts using it.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_port_schemes_params_t\tSchemes parameters\n+ *\t\t\t\t\t\t\tstructure\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_set_pcd().\n+ */\n+#define FM_PORT_IOC_PCD_KG_BIND_SCHEMES \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(30), \\\n+\t     ioc_fm_pcd_port_schemes_params_t)\n+\n+/*\n+ * @Function\t  fm_port_pcd_kg_unbind_schemes\n+ *\n+ * @Description   These routines may be called for modifying the binding of\n+ *\t\t  ports to schemes. The scheme itself is not removed or\n+ *\t\t  invalidated, just this specific port stops using it.\n+ *\n+ * @Param[in]\t  ioc_fm_pcd_port_schemes_params_t\tSchemes parameters\n+ *\t\t\t\t\t\t\tstructure\n+ *\n+ * @Return\t  0 on success; error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_set_pcd().\n+ */\n+#define FM_PORT_IOC_PCD_KG_UNBIND_SCHEMES \\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(31), \\\n+\t     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\t  FM_MAC_AddHashMacAddr\n+ *\n+ * @Description   Add an Address to the hash table. This is for filter purpose\n+ *\t\t  only.\n+ *\n+ * @Param[in]\t  ioc_fm_port_mac_addr_params_t\t\tEthernet Mac address\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following FM_MAC_Init(). It is a filter only\n+ *\t\t  address.\n+ * @Cautions\t  Some 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), \\\n+\t     ioc_fm_port_mac_addr_params_t)\n+\n+/*\n+ * @Function\t  FM_MAC_RemoveHashMacAddr\n+ *\n+ * @Description   Delete an Address to the hash table. This is for filter\n+ *\t\t  purpose only.\n+ *\n+ * @Param[in]\t  ioc_fm_port_mac_addr_params_t\t\tEthernet Mac address\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed 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), \\\n+\t     ioc_fm_port_mac_addr_params_t)\n+\n+typedef struct ioc_fm_port_tx_pause_frames_t {\n+\tuint8_t  priority;\n+\tuint16_t pause_time;\n+\tuint16_t thresh_time;\n+} ioc_fm_port_tx_pause_frames_t;\n+\n+/*\n+ * @Function\t  FM_MAC_SetTxPauseFrames\n+ *\n+ * @Description   Enable/Disable transmission of Pause-Frames. The routine\n+ *\t\t  changes the default configuration: pause-time - [0xf000]\n+ *\t\t  threshold-time - [0]\n+ *\n+ * @Param[in]\t  ioc_fm_port_tx_pause_frames_params_t\n+ *\t\t  A structure holding the required parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following FM_MAC_Init(). PFC is supported only on\n+ *\t\t  new mEMAC; i.e. in MACs that don't have PFC support (10G-MAC\n+ *\t\t  and dTSEC), user should use 'FM_MAC_NO_PFC' in the 'priority'\n+ *\t\t  field.\n+ */\n+#define FM_PORT_IOC_SET_TX_PAUSE_FRAMES\t\\\n+\t_IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(40), \\\n+\t\tioc_fm_port_tx_pause_frames_t)\n+\n+typedef struct ioc_fm_port_mac_statistics_t {\n+\t/* RMON */\n+\tuint64_t  e_stat_pkts_64;\n+\t\t/**< r-10G tr-DT 64 byte frame counter */\n+\tuint64_t  e_stat_pkts_65_to_127;\n+\t\t/**< r-10G 65 to 127 byte frame counter */\n+\tuint64_t  e_stat_pkts_128_to_255;\n+\t\t/**< r-10G 128 to 255 byte frame counter */\n+\tuint64_t  e_stat_pkts_256_to_511;\n+\t\t/**< r-10G 256 to 511 byte frame counter */\n+\tuint64_t  e_stat_pkts_512_to_1023;\n+\t\t/**< r-10G 512 to 1023 byte frame counter*/\n+\tuint64_t  e_stat_pkts_1024_to_1518;\n+\t\t/**< r-10G 1024 to 1518 byte frame counter */\n+\tuint64_t  e_stat_pkts_1519_to_1522;\n+\t\t/**< r-10G 1519 to 1522 byte good frame count */\n+\t/* */\n+\tuint64_t  e_stat_fragments;\n+\t\t/**< Total number of packets that were less than 64 octets long\n+\t\t * with a wrong CRC.\n+\t\t */\n+\tuint64_t  e_stat_jabbers;\n+\t\t/**< Total number of packets longer than valid maximum length\n+\t\t * octets\n+\t\t */\n+\tuint64_t  e_stat_drop_events;\n+\t\t/**< number of dropped packets due to internal errors of the MAC\n+\t\t * Client (during receive).\n+\t\t */\n+\tuint64_t  e_stat_CRC_align_errors;\n+\t\t/**< Incremented when frames of correct length but with CRC\n+\t\t * error are received.\n+\t\t */\n+\tuint64_t  e_stat_undersize_pkts;\n+\t\t/**< Incremented for frames under 64 bytes with a valid FCS and\n+\t\t * otherwise well formed; This count does not include range\n+\t\t * length errors\n+\t\t */\n+\tuint64_t  e_stat_oversize_pkts;\n+\t\t/**< Incremented for frames which exceed 1518 (non VLAN) or 1522\n+\t\t * (VLAN) and contains a valid FCS and otherwise well formed\n+\t\t */\n+\t/* Pause */\n+\tuint64_t  rx_stat_pause;\t/**< Pause MAC Control received */\n+\tuint64_t  tx_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;\n+\t\t/**< Total number of unicast frame received;\n+\t\t * NOTE: this counter is not supported on dTSEC MAC\n+\t\t */\n+\tuint64_t  if_in_mcast_pkts;\n+\t\t/**< Total number of multicast frame received*/\n+\tuint64_t  if_in_bcast_pkts;\n+\t\t/**< Total number of broadcast frame received */\n+\tuint64_t  if_in_discards;\n+\t\t/**< Frames received, but discarded due to problems within the\n+\t\t * MAC RX.\n+\t\t */\n+\tuint64_t  if_in_errors;\n+\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\n+\t\t *\t  received\n+\t\t */\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;\n+\t\t/**< Total number of unicast frame sent;\n+\t\t * NOTE: this counter is not supported on dTSEC MAC\n+\t\t */\n+\tuint64_t  if_out_mcast_pkts;\n+\t\t/**< Total number of multicast frame sent */\n+\tuint64_t  if_out_bcast_pkts;\n+\t\t/**< Total number of multicast frame sent */\n+\tuint64_t  if_out_discards;\n+\t\t/**< Frames received, but discarded due to problems within the\n+\t\t * MAC TX N/A!.\n+\t\t */\n+\tuint64_t  if_out_errors;\n+\t\t/**< Number of frames transmitted with error:\n+\t\t *\t- FIFO Overflow Error\n+\t\t *\t- FIFO Underflow Error\n+\t\t *\t- Other\n+\t\t */\n+} ioc_fm_port_mac_statistics_t;\n+\n+/*\n+ * @Function\t  FM_MAC_GetStatistics\n+ *\n+ * @Description   get all MAC statistics counters\n+ *\n+ * @Param[out]\t  ioc_fm_port_mac_statistics_t\tA structure holding the\n+ *\t\t\t\t\t\tstatistics\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed 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), \\\n+\t     ioc_fm_port_mac_statistics_t)\n+\n+/*\n+ * @Function\t  fm_port_get_bmi_counters\n+ *\n+ * @Description   Read port's BMI stat counters and place them into\n+ *\t\t  a designated structure of counters.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[out]\t  p_bmi_stats\tcounters structure\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed 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\t  gen_id\tGeneral Drivers Utilities\n+ *\n+ * @Description   External routines.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Group\t  gen_error_id\tErrors, 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|\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       |\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/**< Extract module code from error code (#uint32_t) */\n+\n+#define GET_ERROR_MODULE(_errcode)  ((_errcode) & 0x00FF0000)\n+\t\t\t/**< Extract error type (#e_error_type) from\n+\t\t\t * error code (#uint32_t)\n+\t\t\t */\n+\n+#define RETURN_ERROR(_level, _err, _vmsg) { return ERROR_CODE(_err); }\n+\n+/*\n+ * @Description  Error Type Enumeration\n+ */\n+typedef enum e_error_type {\n+\tE_OK = 0\n+\t\t/* Never use \"RETURN_ERROR\" with E_OK; Use \"return E_OK;\"*/\n+\t, E_WRITE_FAILED = EIO\n+\t\t/**< Write access failed on memory/device.*/\n+\t\t/* String: none, or device name.*/\n+\t, E_NO_DEVICE = ENXIO\n+\t\t/**< The associated device is not initialized.*/\n+\t\t/* String: none.*/\n+\t, E_NOT_AVAILABLE = EAGAIN\n+\t\t/**< Resource is unavailable.*/\n+\t\t/* String: none, unless the operation is not the main goal of\n+\t\t *\t   the function (in this case add resource description).\n+\t\t */\n+\t, E_NO_MEMORY = ENOMEM\n+\t\t/**< External memory allocation failed.*/\n+\t\t/* String: description of item for which allocation failed. */\n+\t, E_INVALID_ADDRESS = EFAULT\n+\t\t/**< Invalid address.*/\n+\t\t/*   String: description of the specific violation.*/\n+\t, E_BUSY = EBUSY\n+\t\t/**< Resource or module is busy.*/\n+\t\t/* String: none, unless the operation is not the main goal\n+\t\t *\t   of the function (in this case add resource\n+\t\t *\t   description).\n+\t\t */\n+\t, E_ALREADY_EXISTS = EEXIST\n+\t\t/**< Requested resource or item already exists.*/\n+\t\t/* Use when resource duplication or sharing are not allowed.\n+\t\t * String: none, unless the operation is not the main goal\n+\t\t *\t   of the function (in this case add item description).\n+\t\t */\n+\t, E_INVALID_OPERATION = ENODEV\n+\t\t/**< The operation/command is invalid (unrecognized).*/\n+\t\t/* String: none.*/\n+\t, E_INVALID_VALUE = EDOM\n+\t\t/**< Invalid value.*/\n+\t\t/* Use for non-enumeration parameters, and only when other error\n+\t\t * types are not suitable.\n+\t\t * String: parameter description + \"(should be <attribute>)\",\n+\t\t *\t   e.g: \"Maximum Rx buffer length (should be divisible\n+\t\t *\t   by 8)\", \"Channel number (should be even)\".\n+\t\t */\n+\t, E_NOT_IN_RANGE = ERANGE\n+\t\t/**< Parameter value is out of range.*/\n+\t\t/* Don't use this error for enumeration parameters.\n+\t\t * String: parameter description + \"(should be %d-%d)\",\n+\t\t *\t   e.g: \"Number of pad characters (should be 0-15)\".\n+\t\t */\n+\t, E_NOT_SUPPORTED = ENOSYS\n+\t\t/**< The function is not supported or not implemented.*/\n+\t\t/* String: none.*/\n+\t, E_INVALID_STATE\n+\t\t/**< The operation is not allowed in current module state.*/\n+\t\t/* String: none.*/\n+\t, E_INVALID_HANDLE\n+\t\t/**< Invalid handle of module or object.*/\n+\t\t/* String: none, unless the function takes in more than one\n+\t\t *\t   handle (in this case add the handle description)\n+\t\t */\n+\t, E_INVALID_ID\n+\t\t/**< Invalid module ID (usually enumeration or index).*/\n+\t\t/* String: none, unless the function takes in more than one ID\n+\t\t *\t   (in this case add the ID description)\n+\t\t */\n+\t, E_NULL_POINTER\n+\t\t/**< Unexpected NULL pointer.*/\n+\t\t/* String: pointer description.*/\n+\t, E_INVALID_SELECTION\n+\t\t/**< Invalid selection or mode.*/\n+\t\t/* Use for enumeration values, only when other error types are\n+\t\t * not suitable.\n+\t\t * String: parameter description.\n+\t\t */\n+\t, E_INVALID_COMM_MODE\n+\t\t/**< Invalid communication mode.*/\n+\t\t/* String: none, unless the function takes in more than one\n+\t\t *\t   communication mode indications (in this case add\n+\t\t *\t   parameter description).\n+\t\t */\n+\t, E_INVALID_MEMORY_TYPE\n+\t\t/**< Invalid memory type.*/\n+\t\t/* String: none, unless the function takes in more than one\n+\t\t *\t   memory types (in this case add memory description,\n+\t\t *\t   e.g: \"Data memory\", \"Buffer descriptors memory\").\n+\t\t */\n+\t, E_INVALID_CLOCK\n+\t\t/**< Invalid clock.*/\n+\t\t/* String: none, unless the function takes in more than one\n+\t\t *\t   clocks (in this case add clock description, e.g: \"Rx\n+\t\t *\t   clock\", \"Tx clock\").\n+\t\t */\n+\t, E_CONFLICT\n+\t\t/**< Some setting conflicts with another setting.*/\n+\t\t/* String: description of the conflicting settings.*/\n+\t, E_NOT_ALIGNED\n+\t\t/**< Non-aligned address.*/\n+\t\t/* String: parameter description + \"(should be %d-bytes\n+\t\t *\t   aligned)\", e.g: \"Rx data buffer (should be 32-bytes\n+\t\t *\t   aligned)\".\n+\t\t */\n+\t, E_NOT_FOUND\n+\t\t/**< Requested resource or item was not found.*/\n+\t\t/* Use only when the resource/item is uniquely identified.\n+\t\t * String: none, unless the operation is not the main goal\n+\t\t *\t   of the function (in this case add item description).\n+\t\t */\n+\t, E_FULL\n+\t\t/**< Resource is full.*/\n+\t\t/* String: none, unless the operation is not the main goal of\n+\t\t *\t   the function (in this case add resource description).\n+\t\t */\n+\t, E_EMPTY\n+\t\t/**< Resource is empty.*/\n+\t\t/* String: none, unless the operation is not the main goal of\n+\t\t *\t   the function (in this case add resource description).\n+\t\t */\n+\t, E_ALREADY_FREE\n+\t\t/**< Specified resource or item is already free or deleted.*/\n+\t\t/* String: none, unless the operation is not the main goal\n+\t\t *\t   of the function (in this case add item description).\n+\t\t */\n+\t, E_READ_FAILED\n+\t\t/**< Read access failed on memory/device.*/\n+\t\t/* String: none, or device name.*/\n+\t, E_INVALID_FRAME\n+\t\t/**< Invalid frame object (NULL handle or missing buffers).*/\n+\t\t/* String: none.*/\n+\t, E_SEND_FAILED\n+\t\t/**< Send operation failed on device.*/\n+\t\t/* String: none, or device name.*/\n+\t, E_RECEIVE_FAILED\n+\t\t/**< Receive operation failed on device.*/\n+\t\t/* String: none, or device name.*/\n+\t, E_TIMEOUT/* = ETIMEDOUT*/\n+\t\t/**< The operation timed out.*/\n+\t\t/* String: none.*/\n+\n+\t, E_DUMMY_LAST\t/* NEVER USED */\n+\n+} e_error_type;\n+\n+/*\n+ *\n+ * @Group\t  FM_grp Frame Manager API\n+ *\n+ * @Description   FM API functions, definitions and enums\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Group\t  FM_PORT_grp FM Port\n+ *\n+ * @Description   FM Port API\n+ *\n+ *\t\t  The FM uses a general module called \"port\" to represent a Tx\n+ *\t\t  port (MAC), an Rx port (MAC) or Offline Parsing port. The\n+ *\t\t  number of ports in an FM varies between SOCs. The SW driver\n+ *\t\t  manages these ports as sub-modules of the FM, i.e. after an FM\n+ *\t\t  is initialized, its ports may be initialized and operated\n+ *\t\t  upon.\n+ *\n+ *\t\t  The port is initialized aware of its type, but other functions\n+ *\t\t  on a port may be indifferent to its type. When necessary, the\n+ *\t\t  driver verifies coherence and returns error if applicable.\n+ *\n+ *\t\t  On 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\t  This enum defines the superset of PCD engines support - i.e.\n+ *\t\t  not all engines have to be used, but all have to be enabled.\n+ *\t\t  The real flow of a specific frame depends on the PCD\n+ *\t\t  configuration and the frame headers and payload. Note: the\n+ *\t\t  first engine and the first engine after the parser (if exists)\n+ *\t\t  should be in order, the order is important as it will define\n+ *\t\t  the flow of the port. However, as for the rest engines (the\n+ *\t\t  ones that follows), the order is not important anymore as it\n+ *\t\t  is defined by the PCD graph itself.\n+ */\n+typedef enum e_fm_port_pcd_support {\n+\te_FM_PORT_PCD_SUPPORT_NONE = 0\n+\t\t/**< BMI to BMI, PCD is not used */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_ONLY\n+\t\t/**< Use only Parser */\n+\t, e_FM_PORT_PCD_SUPPORT_PLCR_ONLY\n+\t\t/**< Use only Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR\n+\t\t/**< Use Parser and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG\n+\t\t/**< Use Parser and Keygen */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC\n+\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/**< Use all PCD engines */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR\n+\t\t/**< Use Parser, Keygen and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_CC\n+\t\t/**< Use Parser and Coarse Classification */\n+\t, e_FM_PORT_PCD_SUPPORT_PRS_AND_CC_AND_PLCR\n+\t\t/**< Use Parser and Coarse Classification and Policer */\n+\t, e_FM_PORT_PCD_SUPPORT_CC_ONLY\n+\t\t/**< Use only Coarse Classification */\n+#ifdef FM_CAPWAP_SUPPORT\n+\t, e_FM_PORT_PCD_SUPPORT_CC_AND_KG\n+\t\t/**< Use Coarse Classification,and Keygen */\n+\t, e_FM_PORT_PCD_SUPPORT_CC_AND_KG_AND_PLCR\n+\t\t/**< Use Coarse Classification, Keygen and Policer */\n+#endif /* FM_CAPWAP_SUPPORT */\n+} e_fm_port_pcd_support;\n+\n+/*\n+ * @Description   Port interrupts\n+ */\n+typedef enum e_fm_port_exceptions {\n+\te_FM_PORT_EXCEPTION_IM_BUSY\t/**< Independent-Mode Rx-BUSY */\n+} e_fm_port_exceptions;\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\tfm_port_frame_err_select_t;\n+\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/**< Not for Rx-Port! Unsupported Format */\n+#define FM_PORT_FRM_ERR_LENGTH\t\tFM_FD_ERR_LENGTH\n+\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\n+\t\t\t * that was chained to FM\n+\t\t\t */\n+\n+#define FM_PORT_FRM_ERR_IPRE\t\t(FM_FD_ERR_IPR & ~FM_FD_IPR)\n+\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/**< IPR non-consistent-sp */\n+\n+#define FM_PORT_FRM_ERR_IPFE\t\t0\n+\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\n+\t\t\t * disparity error (SGMII and TBI modes), FIFO parity\n+\t\t\t * error. PHY Sequence error, PHY error control\n+\t\t\t * character detected.\n+\t\t\t */\n+#define FM_PORT_FRM_ERR_SIZE\t\tFM_FD_ERR_SIZE\n+\t\t\t/**< Frame too long OR Frame size exceeds\n+\t\t\t * max_length_frame\n+\t\t\t */\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\t  FM_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\t  exception passing the exception identification.\n+ *\n+ * @Param[in]\t  h_app\t\tUser's application descriptor.\n+ * @Param[in]\t  exception\tThe exception.\n+ */\n+typedef void (t_fm_port_exception_callback) (t_handle h_app,\n+\t\t\t\t\te_fm_port_exceptions exception);\n+\n+/*\n+ * @Description   User callback function called by driver with received data.\n+ *\t\t  User provides this function. Driver invokes it.\n+ *\n+ * @Param[in]\t  h_app\t\tApplication's handle originally specified to\n+ *\t\t\t\tthe API Config function\n+ * @Param[in]\t  p_data\tA pointer to data received\n+ * @Param[in]\t  length\tlength of received data\n+ * @Param[in]\t  status\treceive status and errors\n+ * @Param[in]\t  position\tposition of buffer in frame\n+ * @Param[in]\t  h_buf_context\tA handle of the user acossiated with this buffer\n+ *\n+ * @Retval\t  e_RX_STORE_RESPONSE_CONTINUE\n+ *\t\t  order the driver to continue Rx operation for all ready data.\n+ * @Retval\t  e_RX_STORE_RESPONSE_PAUSE\n+ *\t\t  order the driver to stop Rx operation.\n+ */\n+typedef e_rx_store_response(t_fm_port_im_rx_store_callback) (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_buf_context);\n+\n+/*\n+ * @Description   User callback function called by driver when transmit\n+ *\t\t  completed.\n+ *\t\t  User provides this function. Driver invokes it.\n+ *\n+ * @Param[in]\t  h_app\t\tApplication's handle originally specified to\n+ *\t\t\t\tthe API Config function\n+ * @Param[in]\t  p_data\tA pointer to data received\n+ * @Param[in]\t  status\ttransmit status and errors\n+ * @Param[in]\t  last_buffer\tis last buffer in frame\n+ * @Param[in]\t  h_buf_context\tA handle of the user acossiated with this buffer\n+ */\n+typedef void (t_fm_port_im_tx_conf_callback) (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_buf_context);\n+\n+/*\n+ * @Description   A structure for additional Rx port parameters\n+ */\n+typedef struct t_fm_port_rx_params {\n+\tuint32_t\t\terr_fqid;\t/**< Error Queue Id. */\n+\tuint32_t\t\tdflt_fqid;\t/**< Default Queue Id.*/\n+\tuint16_t\t\tliodn_offset;\t/**< Port's LIODN offset. */\n+\tt_fm_ext_pools\t\text_buf_pools;\n+\t\t\t/**< Which external buffer pools are used\n+\t\t\t * (up to FM_PORT_MAX_NUM_OF_EXT_POOLS), and their sizes\n+\t\t\t */\n+} t_fm_port_rx_params;\n+\n+/*\n+ * @Description   A structure for additional non-Rx port parameters\n+ */\n+typedef struct t_fm_port_non_rx_params {\n+\tuint32_t\t\terr_fqid;\t/**< Error Queue Id. */\n+\tuint32_t\t\tdflt_fqid;\n+\t\t\t/**< For Tx - Default Confirmation queue,\n+\t\t\t * 0 means no Tx confirmation for processed frames.\n+\t\t\t * For OP port - default Rx queue.\n+\t\t\t */\n+\tuint32_t\t\tqm_channel;\n+\t\t\t/**< QM-channel dedicated to this port; will be used by\n+\t\t\t * the FM for dequeue.\n+\t\t\t */\n+} t_fm_port_non_rx_params;\n+\n+/*\n+ * @Description   A structure for additional Rx port parameters\n+ */\n+typedef struct t_fm_port_im_rx_tx_params {\n+\tt_handle\t\t\th_fm_muram;\n+\t\t\t/**< A handle of the FM-MURAM partition */\n+\tuint16_t\t\t\tliodn_offset;\n+\t\t\t/**< For Rx ports only. Port's LIODN Offset. */\n+\tuint8_t\t\t\tdata_mem_id;\n+\t\t\t/**< Memory partition ID for data buffers */\n+\tuint32_t\t\t\tdata_mem_attributes;\n+\t\t\t/**< Memory attributes for data buffers */\n+\tt_buffer_pool_info\t\trx_pool_params;\n+\t\t\t/**< For Rx ports only. */\n+\tt_fm_port_im_rx_store_callback   *f_rx_store;\n+\t\t\t/**< For Rx ports only. */\n+\tt_fm_port_im_tx_conf_callback\t*f_tx_conf;\n+\t\t\t/**< For Tx ports only. */\n+} t_fm_port_im_rx_tx_params;\n+\n+/*\n+ * @Description   A union for additional parameters depending on port type\n+ */\n+typedef union u_fm_port_specific_params {\n+\tt_fm_port_im_rx_tx_params\tim_rx_tx_params;\n+\t\t\t/**< Rx/Tx Independent-Mode port parameter structure */\n+\tt_fm_port_rx_params\trx_params;\n+\t\t\t/**< Rx port parameters structure */\n+\tt_fm_port_non_rx_params\tnon_rx_params;\n+\t\t\t/**< Non-Rx port parameters structure */\n+} u_fm_port_specific_params;\n+\n+/*\n+ * @Description   A structure representing FM initialization parameters\n+ */\n+typedef struct t_fm_port_params {\n+\tuintptr_t\tbase_addr;\n+\t\t\t/**< Virtual Address of memory mapped FM Port registers.\n+\t\t\t */\n+\tt_handle\th_fm;\n+\t\t\t/**< A handle to the FM object this port related to */\n+\te_fm_port_type\tport_type;\t/**< Port type */\n+\tuint8_t\t\tport_id;\n+\t\t\t/**< Port Id - relative to type;\n+\t\t\t * NOTE: When configuring Offline Parsing port for\n+\t\t\t * FMANv3 devices (DPAA_VERSION 11 and higher),\n+\t\t\t * it is highly recommended NOT to use port_id=0 due to\n+\t\t\t * lack of HW resources on port_id=0.\n+\t\t\t */\n+\tbool\t\tindependent_mode_enable;\n+\t\t\t/**< This port is Independent-Mode - Used for Rx/Tx\n+\t\t\t * ports only!\n+\t\t\t */\n+\tuint16_t\t\tliodn_base;\n+\t\t\t/**< Irrelevant for P4080 rev 1. LIODN base for this\n+\t\t\t * port, to be used together with LIODN offset.\n+\t\t\t */\n+\tu_fm_port_specific_params\tspecific_params;\n+\t\t\t/**< Additional parameters depending on port type. */\n+\n+\tt_fm_port_exception_callback   *f_exception;\n+\t\t\t/**< Relevant for IM only Callback routine to be called\n+\t\t\t * on BUSY exception\n+\t\t\t */\n+\tt_handle\t\th_app;\n+\t\t\t/**< A handle to an application layer object; This\n+\t\t\t * handle will be passed by the driver upon calling the\n+\t\t\t * above callbacks\n+\t\t\t */\n+} t_fm_port_params;\n+\n+/*\n+ * @Function\t  fm_port_config\n+ *\n+ * @Description   Creates a descriptor for the FM PORT module.\n+ *\n+ *\t\t  The routine returns a handle(descriptor) to the FM PORT\n+ *\t\t  object. This descriptor must be passed as first parameter to\n+ *\t\t  all other FM PORT function calls.\n+ *\n+ *\t\t  No actual initialization or configuration of FM hardware is\n+ *\t\t  done by this routine.\n+ *\n+ * @Param[in]\t  p_fm_port_params\tPointer to data structure of parameters\n+ *\n+ * @Retval\t  Handle to FM object, or NULL for Failure.\n+ */\n+t_handle fm_port_config(t_fm_port_params *p_fm_port_params);\n+\n+/*\n+ * @Function\t  fm_port_init\n+ *\n+ * @Description   Initializes the FM PORT module by defining the software\n+ *\t\t  structure and configuring the hardware registers.\n+ *\n+ * @Param[in]\t  h_fm_port - FM PORT module descriptor\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_port_init(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_free\n+ *\n+ * @Description   Frees all resources that were assigned to FM PORT module.\n+ *\n+ *\t\t  Calling this routine invalidates the descriptor.\n+ *\n+ * @Param[in]\t  h_fm_port - FM PORT module descriptor\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t fm_port_free(t_handle h_fm_port);\n+\n+t_handle fm_port_open(t_fm_port_params *p_fm_port_params);\n+void fm_port_close(t_handle h_fm_port);\n+\n+\n+/*\n+ * @Group\t  FM_PORT_advanced_init_grp\tFM Port Advanced Configuration\n+ *\t\t\t\t\t\tUnit\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_fm_port_deq_type {\n+\te_FM_PORT_DEQ_TYPE1,\n+\t\t/**< Dequeue from the SP channel - with priority precedence,\n+\t\t * and Intra-Class Scheduling respected.\n+\t\t */\n+\te_FM_PORT_DEQ_TYPE2,\n+\t\t/**< Dequeue from the SP channel - with active FQ precedence,\n+\t\t * and Intra-Class Scheduling respected.\n+\t\t */\n+\te_FM_PORT_DEQ_TYPE3\n+\t\t/**< Dequeue from the SP channel - with active FQ precedence,\n+\t\t * and override Intra-Class Scheduling\n+\t\t */\n+} e_fm_port_deq_type;\n+\n+/*\n+ * @Description   enum for defining QM frame dequeue\n+ */\n+typedef enum e_fm_port_deq_prefetch_option {\n+\te_FM_PORT_DEQ_NO_PREFETCH,\n+\t\t/**< QMI performs a dequeue action for a single frame\n+\t\t * only when a dedicated portID Tnum is waiting.\n+\t\t */\n+\te_FM_PORT_DEQ_PARTIAL_PREFETCH,\n+\t\t/**< QMI performs a dequeue action for 3 frames\n+\t\t * when one dedicated port_id tnum is waiting.\n+\t\t */\n+\te_FM_PORT_DEQ_FULL_PREFETCH\n+\t\t/**< QMI performs a dequeue action for 3 frames when\n+\t\t * no dedicated port_id tnums are waiting.\n+\t\t */\n+\n+} e_fm_port_deq_prefetch_option;\n+\n+/*\n+ * @Description   enum for defining port default color\n+ */\n+typedef enum e_fm_port_color {\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_fm_port_color;\n+\n+/*\n+ * @Description   A structure for defining Dual Tx rate limiting scale\n+ */\n+typedef enum e_fm_port_dual_rate_limiter_scale_down {\n+\te_FM_PORT_DUAL_RATE_LIMITER_NONE = 0,\n+\t\t/**< Use only single rate limiter*/\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_2,\n+\t\t/**< Divide high rate limiter by 2 */\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_4,\n+\t\t/**< Divide high rate limiter by 4 */\n+\te_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_8\n+\t\t/**< Divide high rate limiter by 8 */\n+} e_fm_port_dual_rate_limiter_scale_down;\n+\n+/*\n+ * @Description   A structure for defining FM port resources\n+ */\n+typedef struct t_fm_port_rsrc {\n+\tuint32_t\tnum;\n+\t\t\t/**< Committed required resource */\n+\tuint32_t\textra;\n+\t\t\t/**< Extra (not committed) required resource */\n+} t_fm_port_rsrc;\n+\n+/*\n+ * @Description   A structure for defining Tx rate limiting\n+ */\n+typedef struct t_fm_port_rate_limit {\n+\tuint16_t\t\tmax_burst_size;\n+\t\t\t\t/**< in KBytes for Tx ports, in frames for OP\n+\t\t\t\t * ports. (note that for early chips burst size\n+\t\t\t\t * is rounded up to a multiply of 1000 frames).\n+\t\t\t\t */\n+\tuint32_t\t\trate_limit;\n+\t\t\t\t/**< in Kb/sec for Tx ports, in frame/sec for OP\n+\t\t\t\t * ports. Rate limit refers to data rate\n+\t\t\t\t * (rather than line rate).\n+\t\t\t\t */\n+\te_fm_port_dual_rate_limiter_scale_down\trate_limit_divider;\n+\t\t\t\t/**< For OP ports only. Not-valid for some\n+\t\t\t\t * earlier chip revisions\n+\t\t\t\t */\n+} t_fm_port_rate_limit;\n+\n+/*\n+ * @Description   A structure for defining the parameters of\n+ *\t\t  the Rx port performance counters\n+ */\n+typedef struct t_fm_port_performance_cnt {\n+\tuint8_t\ttask_comp_val;\n+\t\t/**< Task compare value */\n+\tuint8_t\tqueue_comp_val;\n+\t\t/**< Rx queue/Tx confirm queue compare value (unused for H/O) */\n+\tuint8_t\tdma_comp_val;\n+\t\t/**< Dma compare value */\n+\tuint32_t\tfifo_comp_val;\n+\t\t\t/**< Fifo compare value (in bytes) */\n+} t_fm_port_performance_cnt;\n+\n+/*\n+ * @Function\t  fm_port_config_num_of_open_dmas\n+ *\n+ * @Description   Calling this routine changes the max number of open DMA's\n+ *\t\t  available for this port. It changes this parameter in the\n+ *\t\t  internal 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]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  p_open_dmas\tA pointer to a structure of parameters defining\n+ *\t\t\t\tthe open DMA allocation.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_num_of_open_dmas(t_handle h_fm_port,\n+\t\t\t\t\t\tt_fm_port_rsrc *p_open_dmas);\n+\n+/*\n+ * @Function\t  fm_port_config_num_of_tasks\n+ *\n+ * @Description   Calling this routine changes the max number of tasks available\n+ *\t\t  for this port. It changes this parameter in the internal\n+ *\t\t  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]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_num_of_tasks\tA pointer to a structure of parameters\n+ *\t\t\t\t\tdefining the tasks allocation.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_num_of_tasks(t_handle h_fm_port,\n+\t\t\t\t\tt_fm_port_rsrc *p_num_of_tasks);\n+\n+/*\n+ * @Function\t  fm_port_config_size_of_fifo\n+ *\n+ * @Description   Calling this routine changes the max FIFO size configured for\n+ *\t\t  this port.\n+ *\n+ *\t\t  This function changes the internal driver data base from its\n+ *\t\t  default configuration. Please refer to the driver's User Guide\n+ *\t\t  for information 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]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_size_of_fifo\tA pointer to a structure of parameters\n+ *\t\t\t\t\tdefining the FIFO allocation.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_size_of_fifo(t_handle h_fm_port,\n+\t\t\t\t\tt_fm_port_rsrc *p_size_of_fifo);\n+\n+/*\n+ * @Function\t  fm_port_config_deq_high_priority\n+ *\n+ * @Description   Calling this routine changes the dequeue priority in the\n+ *\t\t  internal driver data base from its default configuration\n+ *\t\t  1G: [DEFAULT_PORT_deqHighPriority_1G]\n+ *\t\t  10G: [DEFAULT_PORT_deqHighPriority_10G]\n+ *\n+ *\t\t  May be used for Non - Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  high_pri\tTRUE to select high priority, FALSE for normal\n+ *\t\t\t\toperation.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_deq_high_priority(t_handle h_fm_port, bool high_pri);\n+\n+/*\n+ * @Function\t  fm_port_config_deq_type\n+ *\n+ * @Description   Calling this routine changes the dequeue type parameter in the\n+ *\t\t  internal driver data base from its default configuration\n+ *\t\t  [DEFAULT_PORT_deq_type].\n+ *\n+ *\t\t  May be used for Non - Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  deq_type\tAccording to QM definition.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_deq_type(t_handle h_fm_port,\n+\t\t\t\t\te_fm_port_deq_type deq_type);\n+\n+/*\n+ * @Function\t  fm_port_config_deq_prefetch_option\n+ *\n+ * @Description   Calling this routine changes the dequeue prefetch option\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration [DEFAULT_PORT_deq_prefetch_option]\n+ *\t\t  Note: Available for some chips only\n+ *\n+ *\t\t  May be used for Non - Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  deq_prefetch_option\tNew option\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_deq_prefetch_option(t_handle h_fm_port,\n+\t\t\te_fm_port_deq_prefetch_option deq_prefetch_option);\n+\n+/*\n+ * @Function\t  fm_port_config_deq_byte_cnt\n+ *\n+ * @Description   Calling this routine changes the dequeue byte count parameter\n+ *\t\t  in the internal driver data base from its default\n+ *\t\t  configuration.\n+ *\t\t  1G:[DEFAULT_PORT_deq_byte_cnt_1G].\n+ *\t\t  10G:[DEFAULT_PORT_deq_byte_cnt_10G].\n+ *\n+ *\t\t  May be used for Non - Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  deq_byte_cnt\tNew byte count\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_deq_byte_cnt(t_handle h_fm_port,\n+\t\t\t\t\tuint16_t deq_byte_cnt);\n+\n+/*\n+ * @Function\t  fm_port_config_buffer_prefix_content\n+ *\n+ * @Description   Defines the structure, size and content of the application\n+ *\t\t  buffer. The prefix will In Tx ports, if 'pass_prs_result', the\n+ *\t\t  application should set a value to their offsets in the prefix\n+ *\t\t  of the FM will save the first 'priv_data_size', than,\n+ *\t\t  depending on 'pass_prs_result' and 'pass_time_stamp', copy\n+ *\t\t  parse result and timeStamp, and the packet itself (in this\n+ *\t\t  order), to the application buffer, and to offset.\n+ *\t\t  Calling this routine changes the buffer margins definitions in\n+ *\t\t  the internal driver data base from its default configuration:\n+ *\t\t  Data size:  [DEFAULT_PORT_bufferPrefixContent_priv_data_size]\n+ *\t\t  Pass Parser result:\n+ *\t\t  [DEFAULT_PORT_bufferPrefixContent_pass_prs_result].\n+ *\t\t  Pass timestamp:\n+ *\t\t  [DEFAULT_PORT_bufferPrefixContent_pass_time_stamp].\n+ *\n+ *\t\t  May be used for all ports\n+ *\n+ *\n+ * @Param[in]\t\th_fm_port\t\t\tA handle to a FM Port\n+ *\t\t\t\t\t\t\tmodule.\n+ * @Param[in,out]\tp_fm_buffer_prefix_content\tA structure of\n+ *\t\t\t\t\t\t\tparameters describing\n+ *\t\t\t\t\t\t\tthe structure of the\n+ *\t\t\t\t\t\t\tbuffer.\n+ *\t\t\t\t\t\t\tOut parameter: Start\n+ *\t\t\t\t\t\t\tmargin - offset of data\n+ *\t\t\t\t\t\t\tfrom start of external\n+ *\t\t\t\t\t\t\tbuffer.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_buffer_prefix_content(t_handle\th_fm_port,\n+\t\tt_fm_buffer_prefix_content\t*p_fm_buffer_prefix_content);\n+\n+/*\n+ * @Function\t  fm_port_config_checksum_last_bytes_ignore\n+ *\n+ * @Description   Calling this routine changes the number of checksum bytes to\n+ *\t\t  ignore parameter in the internal driver data base from its\n+ *\t\t  default configuration.\n+ *\n+ *\t\t  May be used by Tx & Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\t\tA handle to a FM Port module.\n+ * @Param[in]\t  checksum_last_bytes_ignore\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_checksum_last_bytes_ignore(t_handle h_fm_port,\n+\t\t\tuint8_t checksum_last_bytes_ignore);\n+\n+/*\n+ * @Function\t  fm_port_config_cut_bytes_from_end\n+ *\n+ * @Description   Calling this routine changes the number of bytes to cut from a\n+ *\t\t  frame's end parameter in the internal driver data base\n+ *\t\t  from its default configuration\n+ *\t\t  [DEFAULT_PORT_cut_bytes_from_end]\n+ *\t\t  Note that if the result of (frame length before chop -\n+ *\t\t  cut_bytes_from_end) is less than 14 bytes, the chop operation\n+ *\t\t  is not executed.\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  cut_bytes_from_end\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_cut_bytes_from_end(t_handle h_fm_port,\n+\t\t\tuint8_t cut_bytes_from_end);\n+\n+/*\n+ * @Function\t  fm_port_config_ext_buf_pools\n+ *\n+ * @Description   This routine should be called for OP ports that internally use\n+ *\t\t  BM buffer pools. In such cases, e.g. for fragmentation and\n+ *\t\t  re-assembly, the FM needs new BM buffers. By calling this\n+ *\t\t  routine the user specifies the BM buffer pools that should be\n+ *\t\t  used.\n+ *\n+ *\t\t  Note: Available for some chips only\n+ *\n+ *\t\t  May be used for OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_fm_ext_pools\tA structure of parameters for the\n+ *\t\t\t\t\texternal pools.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_ext_buf_pools(t_handle h_fm_port,\n+\t\t\tt_fm_ext_pools *p_fm_ext_pools);\n+\n+/*\n+ * @Function\t  fm_port_config_backup_pools\n+ *\n+ * @Description   Calling this routine allows the configuration of some of the\n+ *\t\t  BM pools defined for this port as backup pools.\n+ *\t\t  A pool configured to be a backup pool will be used only if all\n+ *\t\t  other enabled non - backup pools are depleted.\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_fm_port_backup_bm_pools\tAn array of pool id's. All pools\n+ *\t\t\t\t\t\tspecified here will be defined\n+ *\t\t\t\t\t\tas backup pools.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_backup_pools(t_handle h_fm_port,\n+\t\t\tt_fm_backup_bm_pools *p_fm_port_backup_bm_pools);\n+\n+/*\n+ * @Function\t  fm_port_config_frm_discard_override\n+ *\n+ * @Description   Calling this routine changes the error frames destination\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration: override =[DEFAULT_PORT_frmDiscardOverride]\n+ *\n+ *\t\t  May be used for Rx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  override\tTRUE to override discarding of error frames and\n+ *\t\t\t\tenqueueing them to error queue.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_frm_discard_override(t_handle h_fm_port,\n+\t\t\tbool override);\n+\n+/*\n+ * @Function\tfm_port_config_errors_to_discard\n+ *\n+ * @Description   Calling this routine changes the behaviour on error parameter\n+ *\t\t  in the internal driver data base from its default\n+ *\t\t  configuration: [DEFAULT_PORT_errorsToDiscard].\n+ *\t\t  If a requested error was previously defined as\n+ *\t\t  \"ErrorsToEnqueue\" it's definition will change and the frame\n+ *\t\t  will be discarded. Errors that were not defined either as\n+ *\t\t  \"ErrorsToEnqueue\" nor as \"ErrorsToDiscard\", will be forwarded\n+ *\t\t  to CPU.\n+ *\n+ *\t\t  May be used for Rx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  errs\t\tA list of errors to discard\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_errors_to_discard(t_handle h_fm_port,\n+\t\tfm_port_frame_err_select_t errs);\n+\n+/*\n+ * @Function\t  fm_port_config_dma_ic_cache_attr\n+ *\n+ * @Description   Calling this routine changes the internal context cache\n+ *\t\t  attribute parameter in the internal driver data base\n+ *\t\t  from its default configuration:\n+ *\t\t  [DEFAULT_PORT_dmaIntContextCacheAttr]\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\t\tA handle to a FM Port module.\n+ * @Param[in]\t  int_context_cache_attr\tNew selection\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_dma_ic_cache_attr(t_handle h_fm_port,\n+\t\te_fm_dma_cache_option int_context_cache_attr);\n+\n+/*\n+ * @Function\t  fm_port_config_dma_hdr_attr\n+ *\n+ * @Description   Calling this routine changes the header cache attribute\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration[DEFAULT_PORT_dmaHeaderCacheAttr]\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  header_cache_attr\tNew selection\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_dma_hdr_attr(t_handle h_fm_port,\n+\t\te_fm_dma_cache_option header_cache_attr);\n+\n+/*\n+ * @Function\tfm_port_config_dma_scatter_gather_attr\n+ *\n+ * @Description   Calling this routine changes the scatter gather cache\n+ *\t\t  attribute parameter in the internal driver data base from its\n+ *\t\t  default configuration[DEFAULT_PORT_dmaScatterGatherCacheAttr]\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\t\tA handle to a FM Port module.\n+ * @Param[in]\t  scatter_gather_cache_attr\tNew selection\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_dma_scatter_gather_attr(t_handle h_fm_port,\n+\t\te_fm_dma_cache_option scatter_gather_cache_attr);\n+\n+/*\n+ * @Function\t  fm_port_config_dma_write_optimize\n+ *\n+ * @Description   Calling this routine changes the write optimization parameter\n+ *\t\t  in the internal driver data base from its default\n+ *\t\t  configuration : By default optimize =\n+ *\t\t  [DEFAULT_PORT_dmaWriteOptimize].\n+ *\t\t  Note:\n+ *\t\t  1. For head optimization, data alignment must be >= 16\n+ *\t\t     (supported by default).\n+ *\n+ *\t\t  2. For tail optimization, note that the optimization is\n+ *\t\t     performed by extending the write transaction of the frame\n+ *\t\t     payload at the tail as needed to achieve optimal bus\n+ *\t\t     transfers, so that the last write is extended to be on\n+ *\t\t     16 / 64 bytes aligned block (chip dependent).\n+ *\n+ *\t\t  Relevant for non - Tx port types\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  optimize\tTRUE to enable optimization, FALSE for normal\n+ *\t\t\t\toperation\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_dma_write_optimize(t_handle h_fm_port,\n+\t\t\t\t\t\tbool optimize);\n+\n+/*\n+ * @Function\t  fm_port_config_no_scather_gather\n+ *\n+ * @Description   Calling this routine changes the no_scather_gather parameter\n+ *\t\t  in internal driver data base from its default configuration.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  no_scather_gather\tTRUE - frame is discarded if can not be\n+ *\t\t\t\t\tstored in single buffer,\n+ *\t\t\t\t\tFALSE - frame can be stored in scatter\n+ *\t\t\t\t\tgather (S / G) format.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_no_scather_gather(t_handle h_fm_port,\n+\t\t\t\t\t\tbool no_scather_gather);\n+\n+/*\n+ * @Function\t  fm_port_config_dflt_color\n+ *\n+ * @Description   Calling this routine changes the internal default color\n+ *\t\t  parameter in the internal driver data base\n+ *\t\t  from its default configuration[DEFAULT_PORT_color]\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  color\t\tNew selection\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_dflt_color(t_handle h_fm_port, e_fm_port_color color);\n+\n+/*\n+ * @Function\t  fm_port_config_sync_req\n+ *\n+ * @Description   Calling this routine changes the synchronization attribute\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration: sync_req =[DEFAULT_PORT_sync_req]\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  sync_req\tTRUE to request synchronization, FALSE\n+ *\t\t\t\totherwise.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_sync_req(t_handle h_fm_port, bool sync_req);\n+\n+/*\n+ * @Function\t  fm_port_config_forward_reuse_int_context\n+ *\n+ * @Description   This routine is relevant for Rx ports that are routed to OP\n+ *\t\t  port. It changes the internal context reuse option in the\n+ *\t\t  internal driver data base from its default configuration:\n+ *\t\t  reuse =[DEFAULT_PORT_forwardIntContextReuse]\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  reuse\t\tTRUE to reuse internal context on frames\n+ *\t\t\t\tforwarded to OP port.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_forward_reuse_int_context(t_handle h_fm_port,\n+\t\t\t\t\t\tbool reuse);\n+\n+/*\n+ * @Function\t  fm_port_config_donot_release_tx_buf_to_bm\n+ *\n+ * @Description   This routine should be called if no Tx confirmation\n+ *\t\t  is done, and yet buffers should not be released to the BM.\n+ *\n+ *\t\t  Normally, buffers are returned using the Tx confirmation\n+ *\t\t  process. When Tx confirmation is not used (defFqid = 0),\n+ *\t\t  buffers are typically released to the BM. This routine\n+ *\t\t  may be called to avoid this behavior and not release the\n+ *\t\t  buffers.\n+ *\n+ *\t\t  May be used for Tx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_donot_release_tx_buf_to_bm(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_config_immax_rx_buf_length\n+ *\n+ * @Description   Changes the maximum receive buffer length from its default\n+ *\t\t  configuration: Closest rounded down power of 2 value of the\n+ *\t\t  data buffer size.\n+ *\n+ *\t\t  The maximum receive buffer length directly affects the\n+ *\t\t  structure of received frames (single- or multi-buffered) and\n+ *\t\t  the performance of both the FM and the driver.\n+ *\n+ *\t\t  The selection between single- or multi-buffered frames should\n+ *\t\t  be done according to the characteristics of the specific\n+ *\t\t  application. The recommended mode is to use a single data\n+ *\t\t  buffer per packet, as this mode provides the best performance.\n+ *\t\t  However, the user can select to use multiple data buffers per\n+ *\t\t  packet.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  new_val\tMaximum receive buffer length (in bytes).\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init(). This routine is to be used only if\n+ *\t\t  Independent-Mode is enabled.\n+ */\n+uint32_t fm_port_config_immax_rx_buf_length(t_handle h_fm_port,\n+\t\t\t\t\t\tuint16_t new_val);\n+\n+/*\n+ * @Function\t  fm_port_config_imrx_bd_ring_length\n+ *\n+ * @Description   Changes the receive BD ring length from its default\n+ *\t\t  configuration:[DEFAULT_PORT_rxBdRingLength]\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  new_val\tThe desired BD ring length.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init(). This routine is to be used only if\n+ *\t\t  Independent-Mode is enabled.\n+ */\n+uint32_t fm_port_config_imrx_bd_ring_length(t_handle h_fm_port,\n+\t\t\t\t\t\tuint16_t new_val);\n+\n+/*\n+ * @Function\tfm_port_config_imtx_bd_ring_length\n+ *\n+ * @Description   Changes the transmit BD ring length from its default\n+ *\t\t  configuration:[DEFAULT_PORT_txBdRingLength]\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  new_val\tThe desired BD ring length.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init(). This routine is to be used only if\n+ *\t\t  Independent-Mode is enabled.\n+ */\n+uint32_t fm_port_config_imtx_bd_ring_length(t_handle h_fm_port,\n+\t\t\t\t\tuint16_t new_val);\n+\n+/*\n+ * @Function\t  fm_port_config_imfman_ctrl_external_structs_memory\n+ *\n+ * @Description   Configures memory partition and attributes for FMan-Controller\n+ *\t\t  data structures (e.g. BD rings).\n+ *\t\t  Calling this routine changes the internal driver data base\n+ *\t\t  from its default configuration\n+ *\t\t  [DEFAULT_PORT_ImfwExtStructsMemId,\n+ *\t\t  DEFAULT_PORT_ImfwExtStructsMemAttr].\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  mem_id\t\tMemory partition ID.\n+ * @Param[in]\t  mem_attributes\tMemory attributes mask (a combination of\n+ *\t\t\t\t\tMEMORY_ATTR_x flags).\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ */\n+uint32_t  fm_port_config_imfman_ctrl_external_structs_memory(t_handle h_fm_port,\n+\t\t\t\tuint8_t mem_id,\n+\t\t\t\tuint32_t mem_attributes);\n+\n+/*\n+ * @Function\t  fm_port_config_impolling\n+ *\n+ * @Description   Changes the Rx flow from interrupt driven (default) to\n+ *\t\t  polling.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ *\t\t  This routine is to be used only if Independent-Mode is\n+ *\t\t  enabled.\n+ */\n+uint32_t fm_port_config_impolling(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_config_max_frame_length\n+ *\n+ * @Description   Changes the definition of the max size of frame that should be\n+ *\t\t  transmitted/received on this port from its default value\n+ *\t\t  [DEFAULT_PORT_maxFrameLength].\n+ *\t\t  This parameter is used for confirmation of the minimum Fifo\n+ *\t\t  size calculations and only for Tx ports or ports working in\n+ *\t\t  independent mode. This should be larger than the maximum\n+ *\t\t  possible MTU that will be used for this port (i.e. its MAC).\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  length\tMax size of frame\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init(). This routine is to be used only if\n+ *\t\t  Independent-Mode is enabled.\n+ */\n+uint32_t fm_port_config_max_frame_length(t_handle h_fm_port,\n+\t\t\t\t\tuint16_t length);\n+\n+/*\n+ * @Function\t  fm_port_config_tx_fifo_min_fill_level\n+ *\n+ * @Description   Calling this routine changes the fifo minimum fill level\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration[DEFAULT_PORT_txFifoMinFillLevel]\n+ *\n+ *\t\t  May be used for Tx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  min_fill_level\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_tx_fifo_min_fill_level(t_handle h_fm_port,\n+\t\t\t\t\tuint32_t min_fill_level);\n+\n+/*\n+ * @Function\t  fm_port_config_fifo_deq_pipeline_depth\n+ *\n+ * @Description   Calling this routine changes the fifo dequeue pipeline depth\n+ *\t\t  parameter in the internal driver data base\n+ *\n+ *\t\t  from its default configuration :\n+ *\t\t  1G ports : [DEFAULT_PORT_fifoDeqPipelineDepth_1G],\n+ *\t\t  10G port : [DEFAULT_PORT_fifoDeqPipelineDepth_10G],\n+ *\t\t  OP port : [DEFAULT_PORT_fifoDeqPipelineDepth_OH]\n+ *\n+ *\t\t  May be used for Tx / OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  deq_pipeline_depth\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_fifo_deq_pipeline_depth(t_handle h_fm_port,\n+\t\t\t\tuint8_t deq_pipeline_depth);\n+\n+/*\n+ * @Function\t  fm_port_config_tx_fifo_low_comf_level\n+ *\n+ * @Description   Calling this routine changes the fifo low comfort level\n+ *\t\t  parameter in internal driver data base from its default\n+ *\t\t  configuration[DEFAULT_PORT_txFifoLowComfLevel]\n+ *\n+ *\t\t  May be used for Tx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  fifo_low_comf_level\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_tx_fifo_low_comf_level(t_handle h_fm_port,\n+\t\t\t\t\tuint32_t fifo_low_comf_level);\n+\n+/*\n+ * @Function\t  fm_port_config_rx_fifo_threshold\n+ *\n+ * @Description   Calling this routine changes the threshold of the FIFO fill\n+ *\t\t  level parameter in the internal driver data base from its\n+ *\t\t  default configuration[DEFAULT_PORT_rxFifoThreshold]\n+ *\n+ *\t\t  If the total number of buffers which are currently in use and\n+ *\t\t  associated with the specific RX port exceed this threshold,\n+ *\t\t  the BMI will signal the MAC to send a pause frame over the\n+ *\t\t  link.\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  fifo_threshold\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_rx_fifo_threshold(t_handle h_fm_port,\n+\t\t\t\t\t\tuint32_t fifo_threshold);\n+\n+/*\n+ * @Function\t  fm_port_config_rx_fifo_pri_elevation_level\n+ *\n+ * @Description   Calling this routine changes the priority elevation level\n+ *\t\t  parameter in the internal driver data base from its default\n+ *\t\t  configuration[DEFAULT_PORT_rxFifoPriElevationLevel]\n+ *\n+ *\t\t  If the total number of buffers which are currently in use and\n+ *\t\t  associated with the specific RX port exceed the amount\n+ *\t\t  specified in pri_elevation_level, BMI will signal the main\n+ *\t\t  FM's DMA to elevate the FM priority on the system bus.\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  pri_elevation_level   New value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_rx_fifo_pri_elevation_level(t_handle h_fm_port,\n+\t\t\t\t\t\tuint32_t pri_elevation_level);\n+\n+#ifdef FM_HEAVY_TRAFFIC_HANG_ERRATA_FMAN_A005669\n+/*\n+ * @Function\t  fm_port_config_bcbworkaround\n+ *\n+ * @Description   Configures BCB errata workaround.\n+ *\n+ *\t\t  When BCB errata is applicable, the workaround is always\n+ *\t\t  performed by FM Controller. Thus, this function does not\n+ *\t\t  actually enable errata workaround but rather allows driver to\n+ *\t\t  perform adjustments required due to errata workaround\n+ *\t\t  execution in FM controller.\n+ *\n+ *\t\t  Applying BCB workaround also configures\n+ *\t\t  FM_PORT_FRM_ERR_PHYSICAL errors to be discarded. Thus\n+ *\t\t  FM_PORT_FRM_ERR_PHYSICAL can't be set by\n+ *\t\t  fm_port_set_errors_route() function.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_bcbworkaround(t_handle h_fm_port);\n+#endif /* FM_HEAVY_TRAFFIC_HANG_ERRATA_FMAN_A005669 */\n+\n+/*\n+ * @Function\t  fm_port_config_internal_buff_offset\n+ *\n+ * @Description   Configures internal buffer offset.\n+ *\n+ *\t\t  May be used for Rx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  val\t\tNew value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_config_internal_buff_offset(t_handle h_fm_port, uint8_t val);\n+\n+/** @} */ /* end of FM_PORT_advanced_init_grp group */\n+/** @} */ /* end of FM_PORT_init_grp group */\n+\n+/*\n+ * @Group\t  FM_PORT_runtime_control_grp FM Port Runtime Control Unit\n+ *\n+ * @Description   FM Port Runtime control unit API functions, definitions and\n+ *\t\t  enums.\n+ *\n+ * @{\n+ */\n+\n+/*\n+ * @Description   enum for defining FM Port counters\n+ */\n+typedef enum e_fm_port_counters {\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/**< 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,\n+\t\t\t/**< BMI deallocate buffer statistics counter */\n+\te_FM_PORT_COUNTERS_RX_BAD_FRAME,\n+\t\t\t/**< BMI Rx only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_LARGE_FRAME,\n+\t\t\t/**< BMI Rx only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_FILTER_FRAME,\n+\t\t\t/**< BMI Rx & OP only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_LIST_DMA_ERR,\n+\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD,\n+\t\t\t/**< BMI Rx, OP & HC statistics counter */\n+\te_FM_PORT_COUNTERS_PREPARE_TO_ENQUEUE_COUNTER,\n+\t\t\t/**< BMI Rx, OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_WRED_DISCARD,\n+\t\t\t/**< BMI OP & HC only statistics counter */\n+\te_FM_PORT_COUNTERS_LENGTH_ERR,\n+\t\t\t/**< BMI non-Rx statistics counter */\n+\te_FM_PORT_COUNTERS_UNSUPPRTED_FORMAT,\n+\t\t\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_fm_port_counters;\n+\n+typedef struct t_fm_port_bmi_stats {\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+} t_fm_port_bmi_stats;\n+\n+/*\n+ * @Description   Structure for Port id parameters.\n+ *\t\t  Fields commented 'IN' are passed by the port module to be used\n+ *\t\t  by the FM module.\n+ *\t\t  Fields commented 'OUT' will be filled by FM before returning\n+ *\t\t  to port.\n+ */\n+typedef struct t_fm_port_congestion_grps {\n+\tuint16_t\tnum_of_congestion_grps_to_consider;\n+\t\t\t/**< The number of required CGs to define the size of\n+\t\t\t * the following array\n+\t\t\t */\n+\tuint8_t\tcongestion_grps_to_consider[FM_NUM_CONG_GRPS];\n+\t\t\t/**< An array of CG indexes; Note that the size of the\n+\t\t\t * array should be 'num_of_congestion_grps_to_consider'.\n+\t\t\t */\n+\tbool\tpfc_prio_enable[FM_NUM_CONG_GRPS][FM_MAX_PFC_PRIO];\n+\t\t\t/**< a matrix that represents the map between the CG ids\n+\t\t\t * defined in 'congestion_grps_to_consider' to the\n+\t\t\t * priorties mapping array.\n+\t\t\t */\n+} t_fm_port_congestion_grps;\n+\n+\n+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))\n+/*\n+ * @Function\t  fm_port_dump_regs\n+ *\n+ * @Description   Dump all regs.\n+ *\n+ *\t\t  Calling this routine invalidates the descriptor.\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_dump_regs(t_handle h_fm_port);\n+#endif /* (defined(DEBUG_ERRORS) && ... */\n+\n+/*\n+ * @Function\t  fm_port_get_buffer_data_offset\n+ *\n+ * @Description   Relevant for Rx ports. Returns the data offset from the\n+ *\t\t  beginning of the data buffer\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ *\n+ * @Return\t  data offset.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_get_buffer_data_offset(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_get_buffer_icinfo\n+ *\n+ * @Description   Returns the Internal Context offset from the beginning of the\n+ *\t\t  data buffer\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ * @Param[in]\t  p_data\tA pointer to the data buffer.\n+ *\n+ * @Return\t  Internal context info pointer on success, NULL if\n+ *\t\t  'allOtherInfo' was not configured for this port.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint8_t *fm_port_get_buffer_icinfo(t_handle h_fm_port, char *p_data);\n+\n+/*\n+ * @Function\t  fm_port_get_buffer_prs_result\n+ *\n+ * @Description   Returns the pointer to the parse result in the data buffer.\n+ *\t\t  In Rx ports this is relevant after reception, if parse result\n+ *\t\t  is configured to be part of the data passed to the\n+ *\t\t  application. For non Rx ports it may be used to get the\n+ *\t\t  pointer of the area in the buffer where parse result should be\n+ *\t\t  initialized - if so configured.\n+ *\t\t  See fm_port_config_buffer_prefix_content for data buffer\n+ *\t\t  prefix configuration.\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ * @Param[in]\t  p_data\tA pointer to the data buffer.\n+ *\n+ * @Return\t  Parse result pointer on success, NULL if parse result was not\n+ *\t\t  configured for this port.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+t_fm_prs_result *fm_port_get_buffer_prs_result(t_handle h_fm_port,\n+\t\t\t\t\t\tchar *p_data);\n+\n+/*\n+ * @Function\t  fm_port_get_buffer_time_stamp\n+ *\n+ * @Description   Returns the time stamp in the data buffer.\n+ *\t\t  Relevant for Rx ports for getting the buffer time stamp.\n+ *\t\t  See fm_port_config_buffer_prefix_content for data buffer\n+ *\t\t  prefix configuration.\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ * @Param[in]\t  p_data\tA pointer to the data buffer.\n+ *\n+ * @Return\t  A pointer to the hash result on success, NULL otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint64_t *fm_port_get_buffer_time_stamp(t_handle h_fm_port, char *p_data);\n+\n+/*\n+ * @Function\t  fm_port_get_buffer_hash_result\n+ *\n+ * @Description   Given a data buffer, on the condition that hash result was\n+ *\t\t  defined as a part of the buffer content(see\n+ *\t\t  fm_port_config_buffer_prefix_content) this routine will return\n+ *\t\t  the pointer to the hash result location in the buffer prefix.\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor\n+ * @Param[in]\t  p_data\tA pointer to the data buffer.\n+ *\n+ * @Return\t  A pointer to the hash result on success, NULL otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint8_t *fm_port_get_buffer_hash_result(t_handle h_fm_port, char *p_data);\n+\n+/*\n+ * @Function\t  fm_port_disable\n+ *\n+ * @Description   Gracefully disable an FM port. The port will not start new\n+ *\t\t  tasks after all tasks associated with the port are terminated.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ *\t\t  This is a blocking routine, it returns after port is\n+ *\t\t  gracefully stopped, i.e. the port will not except new frames,\n+ *\t\t  but it will finish all frames or tasks which were already\n+ *\t\t  began\n+ */\n+uint32_t fm_port_disable(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_enable\n+ *\n+ * @Description   A runtime routine provided to allow disable/enable of port.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_enable(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_set_rate_limit\n+ *\n+ * @Description   Calling this routine enables rate limit algorithm.\n+ *\t\t  By default, this functionality is disabled.\n+ *\n+ *\t\t  Note that rate - limit mechanism uses the FM time stamp.\n+ *\t\t  The selected rate limit specified here would be\n+ *\t\t  rounded DOWN to the nearest 16M.\n+ *\n+ *\t\t  May be used for Tx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  p_rate_limit\tA structure of rate limit parameters\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init(). If rate limit is set\n+ *\t\t  on a port that need to send PFC frames, it might violate the\n+ *\t\t  stop transmit timing.\n+ */\n+uint32_t fm_port_set_rate_limit(t_handle h_fm_port,\n+\t\t\t\tt_fm_port_rate_limit *p_rate_limit);\n+\n+/*\n+ * @Function\t  fm_port_delete_rate_limit\n+ *\n+ * @Description   Calling this routine disables and clears rate limit\n+ *\t\t  initialization.\n+ *\n+ *\t\t  May be used for Tx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_delete_rate_limit(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_set_pfc_priorities_mapping_to_qman_wq\n+\n+ * @Description   Calling this routine maps each PFC received priority to the\n+ *\t\t  transmit WQ. This WQ will be blocked upon receiving a PFC\n+ *\t\t  frame with this priority.\n+ *\n+ *\t\t  May be used for Tx ports only.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  prio\t\tPFC priority (0 - 7).\n+ * @Param[in]\t  wq\t\tWork Queue (0 - 7).\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_pfc_priorities_mapping_to_qman_wq(t_handle h_fm_port,\n+\t\t\t\t\t\tuint8_t prio, uint8_t wq);\n+\n+/*\n+ * @Function\t  fm_port_set_statistics_counters\n+ *\n+ * @Description   Calling this routine enables/disables port's statistics\n+ *\t\t  counters. By default, counters are enabled.\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_statistics_counters(t_handle h_fm_port, bool enable);\n+\n+/*\n+ * @Function\t  fm_port_set_frame_queue_counters\n+ *\n+ * @Description   Calling this routine enables/disables port's enqueue/dequeue\n+ *\t\t  counters. By default, counters are enabled.\n+ *\n+ *\t\t  May be used for all ports\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_frame_queue_counters(t_handle h_fm_port,\n+\t\t\t\t\t\tbool enable);\n+\n+/*\n+ * @Function\t  fm_port_analyze_performance_params\n+ *\n+ * @Description   User may call this routine to so the driver will analyze if\n+ *\t\t  the basic performance parameters are correct and also the\n+ *\t\t  driver may suggest of improvements; The basic parameters are\n+ *\t\t  FIFO sizes, number of DMAs and number of TNUMs for the port.\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_analyze_performance_params(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_set_alloc_buf_counter\n+ *\n+ * @Description   Calling this routine enables/disables BM pool allocate\n+ *\t\t  buffer counters.\n+ *\t\t  By default, counters are enabled.\n+ *\n+ *\t\t  May be used for Rx ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  pool_id\tBM pool id.\n+ * @Param[in]\t  enable\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_alloc_buf_counter(t_handle h_fm_port,\n+\t\t\t\t\t\tuint8_t pool_id, bool enable);\n+\n+/*\n+ * @Function\tfm_port_get_bmi_counters\n+ *\n+ * @Description   Read port's BMI stat counters and place them into\n+ *\t\t  a designated structure of counters.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[out]\t  p_bmi_stats\tcounters structure\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_get_bmi_counters(t_handle h_fm_port,\n+\t\t\t\t\tt_fm_port_bmi_stats *p_bmi_stats);\n+\n+/*\n+ * @Function\t  fm_port_get_counter\n+ *\n+ * @Description   Reads one of the FM PORT counters.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  fm_port_counter\tThe requested counter.\n+ *\n+ * @Return\t  Counter's current value.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ *\t\t  Note that it is user's responsibility to call this routine\n+ *\t\t  only for enabled counters, and there will be no indication if\n+ *\t\t  a disabled counter is accessed.\n+ */\n+uint32_t fm_port_get_counter(t_handle h_fm_port,\n+\t\te_fm_port_counters fm_port_counter);\n+\n+/*\n+ * @Function\t  fm_port_modify_counter\n+ *\n+ * @Description   Sets a value to an enabled counter. Use \"0\" to reset the\n+ *\t\t  counter.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  fm_port_counter\tThe requested counter.\n+ * @Param[in]\t  value\t\t\tThe requested value to be written into\n+ *\t\t\t\t\tthe counter.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_modify_counter(t_handle h_fm_port,\n+\t\te_fm_port_counters fm_port_counter, uint32_t value);\n+\n+/*\n+ * @Function\t  fm_port_get_alloc_buf_counter\n+ *\n+ * @Description   Reads one of the FM PORT buffer counters.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  pool_id\t\tThe requested pool.\n+ *\n+ * @Return\t  Counter's current value.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ *\t\t  Note that it is user's responsibility to call this routine\n+ *\t\t  only for enabled counters, and there will be no indication if\n+ *\t\t  a disabled counter is accessed.\n+ */\n+uint32_t fm_port_get_alloc_buf_counter(t_handle h_fm_port,\n+\t\t\tuint8_t pool_id);\n+\n+/*\n+ * @Function\t  fm_port_modify_alloc_buf_counter\n+ *\n+ * @Description   Sets a value to an enabled counter. Use \"0\" to reset the\n+ *\t\t  counter.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  pool_id\tThe requested pool.\n+ * @Param[in]\t  value\t\tThe requested value to be written into the\n+ *\t\t\t\tcounter.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_modify_alloc_buf_counter(t_handle h_fm_port,\n+\t\t\tuint8_t pool_id, uint32_t value);\n+\n+/*\n+ * @Function\tfm_port_add_congestion_grps\n+ *\n+ * @Description   This routine effects the corresponding Tx port.\n+ *\t\t  It should be called in order to enable pause\n+ *\t\t  frame transmission in case of congestion in one or more\n+ *\t\t  of the congestion groups relevant to this port.\n+ *\t\t  Each call to this routine may add one or more congestion\n+ *\t\t  groups to be considered relevant to this port.\n+ *\n+ *\t\t  May be used for Rx, or RX + OP ports only (depending on chip)\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_congestion_grps\tA pointer to an array of congestion\n+ *\t\t\t\t\tgroups id's to consider.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_add_congestion_grps(t_handle h_fm_port,\n+\t\t\tt_fm_port_congestion_grps *p_congestion_grps);\n+\n+/*\n+ * @Function\t  fm_port_remove_congestion_grps\n+ *\n+ * @Description   This routine effects the corresponding Tx port. It should be\n+ *\t\t  called when congestion groups were defined for this port and\n+ *\t\t  are no longer relevant, or pause frames transmitting is not\n+ *\t\t  required on their behalf.\n+ *\t\t  Each call to this routine may remove one or more congestion\n+ *\t\t  groups to be considered relevant to this port.\n+ *\n+ *\t\t  May be used for Rx, or RX + OP ports only (depending on chip)\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_congestion_grps\tA pointer to an array of congestion\n+ *\t\t\t\t\tgroups id's to consider.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_remove_congestion_grps(t_handle h_fm_port,\n+\t\t\tt_fm_port_congestion_grps *p_congestion_grps);\n+\n+/*\n+ * @Function\t  fm_port_is_stalled\n+ *\n+ * @Description   A routine for checking whether the specified port is stalled.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  TRUE if port is stalled, FALSE otherwise\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+bool fm_port_is_stalled(t_handle h_fm_port);\n+\n+/*\n+ * @Function\tfm_port_release_stalled\n+ *\n+ * @Description   This routine may be called in case the port was stalled and\n+ *\t\t  may now be released.\n+ *\t\t  Note that this routine is available only on older FMan\n+ *\t\t  revisions (FMan v2, DPAA v1.0 only).\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_release_stalled(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_set_rx_l4checksum_verify\n+ *\n+ * @Description   This routine is relevant for Rx ports (1G and 10G). The\n+ *\t\t  routine set / clear the L3 / L4 checksum verification (on RX\n+ *\t\t  side). Note that this takes affect only if hw - parser is\n+ *\t\t  enabled !\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  l_4checksum\tboolean indicates whether to do L3/L4 checksum\n+ *\t\t\t\ton frames or not.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_rx_l4checksum_verify(t_handle h_fm_port,\n+\t\t\tbool l_4checksum);\n+\n+/*\n+ * @Function\t  fm_port_set_errors_route\n+ *\n+ * @Description   Errors selected for this routine will cause a frame with that\n+ *\t\t  error to be enqueued to error queue.\n+ *\t\t  Errors not selected for this routine will cause a frame with\n+ *\t\t  that error to be enqueued to the one of the other port queues.\n+ *\t\t  By default all errors are defined to be enqueued to error\n+ *\t\t  queue. Errors that were configured to be discarded(at\n+ *\t\t  initialization) may not be selected here.\n+ *\n+ *\t\t  May be used for Rx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  errs\t\tA list of errors to enqueue to error queue\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_config() and before\n+ *\t\t  fm_port_init().\n+ */\n+uint32_t fm_port_set_errors_route(t_handle h_fm_port,\n+\t\t\t\tfm_port_frame_err_select_t errs);\n+\n+/*\n+ * @Function\t  fm_port_set_imexceptions\n+ *\n+ * @Description   Calling this routine enables/disables FM PORT interrupts.\n+ *\n+ * @Param[in]\t  h_fm_port\tFM PORT module descriptor.\n+ * @Param[in]\t  exception\tThe exception to be selected.\n+ * @Param[in]\t  enable\tTRUE to enable interrupt, FALSE to mask it.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ *\t\t  This routine should NOT be called from guest-partition\n+ *\t\t  (i.e. guestId != NCSW_PRIMARY_ID)\n+ */\n+uint32_t fm_port_set_imexceptions(t_handle h_fm_port,\n+\t\t\t\te_fm_port_exceptions exception, bool enable);\n+\n+/*\n+ * @Function\t  fm_port_set_performance_counters\n+ *\n+ * @Description   Calling this routine enables/disables port's performance\n+ *\t\t  counters. By default, counters are enabled.\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  enable\t\tTRUE to enable, FALSE to disable.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\tAllowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_performance_counters(t_handle h_fm_port,\n+\t\t\t\t\t\tbool enable);\n+\n+/*\n+ * @Function\t  fm_port_set_performance_counters_params\n+ *\n+ * @Description   Calling this routine defines port's performance counters\n+ *\t\t  parameters.\n+ *\n+ *\t\t  May be used for all port types\n+ *\n+ * @Param[in]\t  h_fm_port\t\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_fm_port_performance_cnt\tA pointer to a structure of\n+ *\t\t\t\t\t\tperformance counters parameters.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_performance_counters_params(t_handle h_fm_port,\n+\t\t\tt_fm_port_performance_cnt *p_fm_port_performance_cnt);\n+\n+/*\n+ * @Group\t  FM_PORT_pcd_runtime_control_grp\n+ *\t\t  FM Port PCD Runtime Control Unit\n+ *\n+ * @Description   FM Port PCD Runtime control unit API functions, definitions\n+ *\t\t  and enums.\n+ *\n+ * @Function\t  fm_port_set_pcd\n+ *\n+ * @Description   Calling this routine defines the port's PCD configuration. It\n+ *\t\t  changes it from its default configuration which is PCD\n+ *\t\t  disabled (BMI to BMI) and configures it according to the\n+ *\t\t  passed parameters.\n+ *\n+ *\t\t  May be used for Rx and OP ports only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  p_fm_port_pcd\tA Structure of parameters defining the port's\n+ *\t\t\t\tPCD configuration.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_set_pcd(t_handle h_fm_port,\n+\t\t\tioc_fm_port_pcd_params_t *p_fm_port_pcd);\n+\n+/*\n+ * @Function\t  fm_port_delete_pcd\n+ *\n+ * @Description   Calling this routine releases the port's PCD configuration.\n+ *\t\t  The port returns to its default configuration which is PCD\n+ *\t\t  disabled (BMI to BMI) and all PCD configuration is removed.\n+ *\n+ *\t\t  May be used for Rx and OP ports which are in PCD mode only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_delete_pcd(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_attach_pcd\n+ *\n+ * @Description   This routine may be called after fm_port_detach_pcd was\n+ *\t\t  called, to return to the originally configured PCD support\n+ *\t\t  flow. The couple of routines are used to allow PCD\n+ *\t\t  configuration changes that demand that PCD will not be used\n+ *\t\t  while changes take place.\n+ *\n+ *\t\t  May be used for Rx and OP ports which are in PCD mode only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init().\n+ */\n+uint32_t fm_port_attach_pcd(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_detach_pcd\n+ *\n+ * @Description   Calling this routine detaches the port from its PCD\n+ *\t\t  functionality. The port returns to its default flow which is\n+ *\t\t  BMI to BMI.\n+ *\n+ *\t\t  May be used for Rx and OP ports which are in PCD mode only\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_attach_pcd().\n+ */\n+uint32_t fm_port_detach_pcd(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_pcd_plcr_alloc_profiles\n+ *\n+ * @Description   This routine may be called only for ports that use the Policer\n+ *\t\t  in order to allocate private policer profiles.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  num_of_profiles\tThe number of required policer profiles\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_pcd_init(), and\n+ *\t\t  before fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_plcr_alloc_profiles(t_handle h_fm_port,\n+\t\t\tuint16_t num_of_profiles);\n+\n+/*\n+ * @Function\t  fm_port_pcd_plcr_free_profiles\n+ *\n+ * @Description   This routine should be called for freeing private policer\n+ *\t\t  profiles.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_pcd_init(), and\n+ *\t\t  before fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_plcr_free_profiles(t_handle h_fm_port);\n+\n+/*\n+ * @Function\t  fm_port_pcd_kg_modify_initial_scheme\n+ *\n+ * @Description   This routine may be called only for ports that use the keygen\n+ *\t\t  in order to change the initial scheme frame should be routed\n+ *\t\t  to. The change may be of a scheme id(in case of direct mode),\n+ *\t\t  from direct to indirect, or from indirect to direct -\n+ *\t\t  specifying the scheme id.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_fm_pcd_kg_scheme\tA structure of parameters for defining\n+ *\t\t\t\t\twhether a scheme is direct / indirect,\n+ *\t\t\t\t\tand if direct - scheme id.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_kg_modify_initial_scheme(t_handle h_fm_port,\n+\t\tioc_fm_pcd_kg_scheme_select_t *p_fm_pcd_kg_scheme);\n+\n+/*\n+ * @Function\t  fm_port_pcd_plcr_modify_initial_profile\n+ *\n+ * @Description   This routine may be called for ports with flows\n+ *\t\t  e_FM_PORT_PCD_SUPPORT_PLCR_ONLY or\n+ *\t\t  e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR only, to change the initial\n+ *\t\t  Policer profile frame should be routed to. The change may be\n+ *\t\t  of a profile and / or absolute / direct mode selection.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  h_profile\t\tPolicer profile handle\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_plcr_modify_initial_profile(t_handle h_fm_port,\n+\t\t\t\t\t\tt_handle h_profile);\n+\n+/*\n+ * @Function\t  fm_port_pcd_cc_modify_tree\n+ *\n+ * @Description   This routine may be called for ports that use coarse\n+ *\t\t  classification tree if the user wishes to replace the tree.\n+ *\t\t  The routine may not be called while port receives packets\n+ *\t\t  using the PCD functionalities, therefore port must be first\n+ *\t\t  detached from the PCD, only than the routine may be called,\n+ *\t\t  and than port be attached to PCD again.\n+ *\n+ * @Param[in]\t  h_fm_port\tA handle to a FM Port module.\n+ * @Param[in]\t  h_cc_tree\tA CC tree that was already built. The tree id as\n+ *\t\t\t\treturned from the BuildTree routine.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init(), fm_port_set_pcd() and\n+ *\t\t  fm_port_detach_pcd()\n+ */\n+uint32_t fm_port_pcd_cc_modify_tree(t_handle h_fm_port, t_handle h_cc_tree);\n+\n+/*\n+ * @Function\t  fm_port_pcd_kg_bind_schemes\n+ *\n+ * @Description   These routines may be called for adding more schemes for the\n+ *\t\t  port to be bound to. The selected schemes are not added, just\n+ *\t\t  this specific port starts using them.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_port_scheme\t\tA structure defining the list of schemes\n+ *\t\t\t\t\tto be added.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_kg_bind_schemes(t_handle h_fm_port,\n+\t\t\tioc_fm_pcd_port_schemes_params_t *p_port_scheme);\n+\n+/*\n+ * @Function\t  fm_port_pcd_kg_unbind_schemes\n+ *\n+ * @Description   These routines may be called for adding more schemes for the\n+ *\t\t  port to be bound to. The selected schemes are not removed or\n+ *\t\t  invalidated, just this specific port stops using them.\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[in]\t  p_port_scheme\t\tA structure defining the list of schemes\n+ *\t\t\t\t\tto be added.\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init() and fm_port_set_pcd().\n+ */\n+uint32_t fm_port_pcd_kg_unbind_schemes(t_handle h_fm_port,\n+\t\t\tioc_fm_pcd_port_schemes_params_t *p_port_scheme);\n+\n+/*\n+ * @Function\t  fm_port_get_ipv_4options_count\n+ *\n+ * @Description   TODO\n+ *\n+ * @Param[in]\t  h_fm_port\t\tA handle to a FM Port module.\n+ * @Param[out]\t  p_ipv_4options_count  will hold the counter value\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise.\n+ *\n+ * @Cautions\t  Allowed only following fm_port_init()\n+ */\n+uint32_t fm_port_get_ipv_4options_count(t_handle h_fm_port,\n+\t\t\t\tuint32_t *p_ipv_4options_count);\n+\n+/** @} */ /* end of FM_PORT_pcd_runtime_control_grp group */\n+/** @} */ /* end of FM_PORT_runtime_control_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..ae5f0c884\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/ncsw_ext.h\n@@ -0,0 +1,158 @@\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+/* phys_address_t should be uintptr_t */\n+typedef uint64_t phys_address_t;\n+\n+/*\n+ * @Description   Possible RxStore callback responses.\n+ */\n+typedef enum e_rx_store_response {\n+\te_RX_STORE_RESPONSE_PAUSE\n+\t\t/**< Pause invoking callback with received data; in polling\n+\t\t * mode, start again invoking callback only next time user\n+\t\t * invokes the receive routine; in interrupt mode, start again\n+\t\t * invoking callback only next time a receive event triggers an\n+\t\t * interrupt; in all cases, received data that are pending are\n+\t\t * not lost, rather, their processing is temporarily deferred;\n+\t\t * in all cases, received data are processed in the order in\n+\t\t * which they were received.\n+\t\t */\n+\t, e_RX_STORE_RESPONSE_CONTINUE\n+\t\t/**< Continue invoking callback with received data. */\n+} e_rx_store_response;\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\t  t_get_buf_function\n+ *\n+ * @Description   User callback function called by driver to get data buffer.\n+ *\n+ *\t\t  User provides this function. Driver invokes it.\n+ *\n+ * @Param[in]\t  h_buffer_pool\t\tA handle to buffer pool manager\n+ * @Param[out]\t  p_buf_context_handle\tReturns the user's private context that\n+ *\t\t\t\t\tshould be associated with the buffer\n+ *\n+ * @Return\t  Pointer to data buffer, NULL if error\n+ */\n+typedef uint8_t * (t_get_buf_function)(t_handle   h_buffer_pool,\n+\t\t\t\t\tt_handle *p_buf_context_handle);\n+\n+/*\n+ * @Function\t  t_put_buf_function\n+ *\n+ * @Description   User callback function called by driver to return data buffer.\n+ *\t\t  User provides this function. Driver invokes it.\n+ *\n+ * @Param[in]\t  h_buffer_pool\t\tA handle to buffer pool manager\n+ * @Param[in]\t  p_buffer\t\tA pointer to buffer to return\n+ * @Param[in]\t  h_buf_context\t\tThe user's private context associated\n+ *\t\t\t\t\twith the returned buffer\n+ *\n+ * @Return\t  E_OK on success; Error code otherwise\n+ */\n+typedef uint32_t (t_put_buf_function)(t_handle h_buffer_pool,\n+\t\t\t\tuint8_t  *p_buffer,\n+\t\t\t\tt_handle h_buf_context);\n+\n+/*\n+ * @Function\t  t_phys_to_virt\n+ *\n+ * @Description   Translates a physical address to the matching virtual address.\n+ *\n+ * @Param[in]\t  addr\t\tThe physical address to translate.\n+ *\n+ * @Return\t  Virtual address.\n+ */\n+typedef void *t_phys_to_virt(phys_address_t addr);\n+\n+/*\n+ * @Function\t  t_virt_to_phys\n+ *\n+ * @Description   Translates a virtual address to the matching physical address.\n+ *\n+ * @Param[in]\t  addr\t\tThe virtual address to translate.\n+ *\n+ * @Return\t  Physical address.\n+ */\n+typedef phys_address_t t_virt_to_phys(void *addr);\n+\n+/*\n+ * @Description   Buffer Pool Information Structure.\n+ */\n+typedef struct t_buffer_pool_info {\n+\tt_handle\t\th_buffer_pool;\n+\t\t/**< A handle to the buffer pool mgr */\n+\tt_get_buf_function\t*f_get_buf;\n+\t\t/**< User callback to get a free buffer */\n+\tt_put_buf_function\t*f_put_buf;\n+\t\t/**< User callback to return a buffer */\n+\tuint16_t\t\tbuffer_size;\n+\t\t/**< Buffer size (in bytes) */\n+\tt_phys_to_virt\t*f_phys_to_virt;\n+\t\t/**< User callback to translate pool buffers physical addresses\n+\t\t * to virtual addresses\n+\t\t */\n+\tt_virt_to_phys\t*f_virt_to_phys;\n+\t\t/**< User callback to translate pool buffers virtual addresses\n+\t\t * to physical addresses\n+\t\t */\n+} t_buffer_pool_info;\n+\n+/*\n+ * @Description   User callback function called by driver with receive data.\n+ *\t\t  User provides this function. Driver invokes it.\n+ *\n+ * @Param[in]\t  h_app\t\tApplication's handle, as was provided to the\n+ *\t\t\t\tdriver by the user\n+ * @Param[in]\t  queue_id\tReceive queue ID\n+ * @Param[in]\t  p_data\tPointer to the buffer with received data\n+ * @Param[in]\t  h_buf_context\tThe user's private context associated with the\n+ *\t\t\t\tgiven data buffer\n+ * @Param[in]\t  length\tLength of received data\n+ * @Param[in]\t  status\tReceive status and errors\n+ * @Param[in]\t  position\tPosition of buffer in frame\n+ * @Param[in]\t  flags\t\tDriver-dependent information\n+ *\n+ * @Retval\t  e_RX_STORE_RESPONSE_CONTINUE\torder the driver to continue Rx\n+ *\t\t\t\t\t\toperation for all ready data.\n+ * @Retval\t  e_RX_STORE_RESPONSE_PAUSE\torder the driver to stop Rx ops.\n+ */\n+typedef e_rx_store_response(t_rx_store_function)(t_handle  h_app,\n+\t\t\t\t\t\tuint32_t  queue_id,\n+\t\t\t\t\t\tuint8_t   *p_data,\n+\t\t\t\t\t\tt_handle  h_buf_context,\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_user_priv;\n+\tuint32_t\towners;\n+} t_device;\n+\n+t_handle create_device(t_handle h_user_priv, t_handle h_dev_id);\n+t_handle get_device_id(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..4cd520931\n--- /dev/null\n+++ b/drivers/net/dpaa/fmlib/net_ext.h\n@@ -0,0 +1,411 @@\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\t\tThis file contains common and general netcomm headers\n+ *\t\t\tdefinitions.\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_pppo_e_ver\t\t(1)\n+#define ioc_net_hf_pppo_e_type\t\t(ioc_net_hf_pppo_e_ver << 1)\n+#define ioc_net_hf_pppo_e_code\t\t(ioc_net_hf_pppo_e_ver << 2)\n+#define ioc_net_hf_pppo_e_sid\t\t(ioc_net_hf_pppo_e_ver << 3)\n+#define ioc_net_hf_pppo_e_len\t\t(ioc_net_hf_pppo_e_ver << 4)\n+#define ioc_net_hf_pppo_e_session\t(ioc_net_hf_pppo_e_ver << 5)\n+#define ioc_net_hf_pppo_e_pid\t\t(ioc_net_hf_pppo_e_ver << 6)\n+#define ioc_net_hf_pppo_e_all_fields\t((ioc_net_hf_pppo_e_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 \\\n+\t\t(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 4)\n+#define IOC_NET_HF_PPPMUX_SUBFRAME_ALL_FIELDS \\\n+\t\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_ipv_4_ver\t\t(1)\n+#define ioc_net_hf_ipv_4_hdr_len\t\t(ioc_net_hf_ipv_4_ver << 1)\n+#define ioc_net_hf_ipv_4_tos\t\t(ioc_net_hf_ipv_4_ver << 2)\n+#define ioc_net_hf_ipv_4_total_len\t(ioc_net_hf_ipv_4_ver << 3)\n+#define ioc_net_hf_ipv_4_id\t\t(ioc_net_hf_ipv_4_ver << 4)\n+#define ioc_net_hf_ipv_4_flag_d\t\t(ioc_net_hf_ipv_4_ver << 5)\n+#define ioc_net_hf_ipv_4_flag_m\t\t(ioc_net_hf_ipv_4_ver << 6)\n+#define ioc_net_hf_ipv_4_offset\t\t(ioc_net_hf_ipv_4_ver << 7)\n+#define ioc_net_hf_ipv_4_ttl\t\t(ioc_net_hf_ipv_4_ver << 8)\n+#define ioc_net_hf_ipv_4_proto\t\t(ioc_net_hf_ipv_4_ver << 9)\n+#define ioc_net_hf_ipv_4_cksum\t\t(ioc_net_hf_ipv_4_ver << 10)\n+#define ioc_net_hf_ipv_4_src_ip\t\t(ioc_net_hf_ipv_4_ver << 11)\n+#define ioc_net_hf_ipv_4_dst_ip\t\t(ioc_net_hf_ipv_4_ver << 12)\n+#define ioc_net_hf_ipv_4_opts\t\t(ioc_net_hf_ipv_4_ver << 13)\n+#define ioc_net_hf_ipv_4_opts_COUNT\t(ioc_net_hf_ipv_4_ver << 14)\n+#define ioc_net_hf_ipv_4_all_fields\t((ioc_net_hf_ipv_4_ver << 15) - 1)\n+\n+#define ioc_net_hf_ipv_4_addr_size\t4\n+#define ioc_net_hf_ipv_4_proto_SIZE\t1\n+\n+typedef uint8_t ioc_header_field_ipv6_t;\n+\n+#define ioc_net_hf_ipv_6_ver\t\t(1)\n+#define ioc_net_hf_ipv_6_tc\t\t(ioc_net_hf_ipv_6_ver << 1)\n+#define ioc_net_hf_ipv_6_src_ip\t\t(ioc_net_hf_ipv_6_ver << 2)\n+#define ioc_net_hf_ipv_6_dst_ip\t\t(ioc_net_hf_ipv_6_ver << 3)\n+#define ioc_net_hf_ipv_6_next_hdr\t(ioc_net_hf_ipv_6_ver << 4)\n+#define ioc_net_hf_ipv_6_fl\t\t(ioc_net_hf_ipv_6_ver << 5)\n+#define ioc_net_hf_ipv_6_hop_limit\t(ioc_net_hf_ipv_6_ver << 6)\n+#define ioc_net_hf_ipv_6_all_fields\t((ioc_net_hf_ipv_6_ver << 7) - 1)\n+\n+#define ioc_net_hf_ipv6_addr_size\t16\n+#define ioc_net_hf_ipv_6_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 \\\n+\t\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 \\\n+\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 1)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_LEN \\\n+\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 2)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_CKSUM \\\n+\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 3)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_SPI \\\n+\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 4)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_SEQUENCE_NUM \\\n+\t\t(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 5)\n+#define IOC_NET_HF_UDP_ENCAP_ESP_ALL_FIELDS \\\n+\t\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 \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 1)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_LENGTH \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 2)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_TSN \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 3)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_ID \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 4)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_SQN \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 5)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_PAYLOAD_PID \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 6)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_UNORDERED \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 7)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_BEGINNING \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 8)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_END \\\n+\t\t(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 9)\n+#define IOC_NET_HF_SCTP_CHUNK_DATA_ALL_FIELDS \\\n+\t\t((IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 10) - 1)\n+\n+#define ioc_net_hf_l2tpv_2_type_bit\t(1)\n+#define ioc_net_hf_l2tpv_2_length_bit\t(ioc_net_hf_l2tpv_2_type_bit << 1)\n+#define ioc_net_hf_l2tpv_2_sequence_bit\t(ioc_net_hf_l2tpv_2_type_bit << 2)\n+#define ioc_net_hf_l2tpv_2_offset_bit\t(ioc_net_hf_l2tpv_2_type_bit << 3)\n+#define ioc_net_hf_l2tpv_2_priority_bit\t(ioc_net_hf_l2tpv_2_type_bit << 4)\n+#define ioc_net_hf_l2tpv_2_version\t(ioc_net_hf_l2tpv_2_type_bit << 5)\n+#define ioc_net_hf_l2tpv_2_len\t\t(ioc_net_hf_l2tpv_2_type_bit << 6)\n+#define ioc_net_hf_l2tpv_2_tunnel_id\t(ioc_net_hf_l2tpv_2_type_bit << 7)\n+#define ioc_net_hf_l2tpv_2_session_id\t(ioc_net_hf_l2tpv_2_type_bit << 8)\n+#define ioc_net_hf_l2tpv_2_ns\t\t(ioc_net_hf_l2tpv_2_type_bit << 9)\n+#define ioc_net_hf_l2tpv_2_nr\t\t(ioc_net_hf_l2tpv_2_type_bit << 10)\n+#define ioc_net_hf_l2tpv_2_offset_size\t(ioc_net_hf_l2tpv_2_type_bit << 11)\n+#define ioc_net_hf_l2tpv_2_first_byte\t(ioc_net_hf_l2tpv_2_type_bit << 12)\n+#define ioc_net_hf_l2tpv_2_all_fields \\\n+\t\t((ioc_net_hf_l2tpv_2_type_bit << 13) - 1)\n+\n+#define ioc_net_hf_l2tpv_3_ctrl_type_bit\t(1)\n+#define ioc_net_hf_l2tpv_3_ctrl_length_bit \\\n+\t\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 1)\n+#define ioc_net_hf_l2tpv_3_ctrl_sequence_bit \\\n+\t\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 2)\n+#define ioc_net_hf_l2tpv_3_ctrl_version\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 3)\n+#define ioc_net_hf_l2tpv_3_ctrl_length\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 4)\n+#define ioc_net_hf_l2tpv_3_ctrl_control\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 5)\n+#define ioc_net_hf_l2tpv_3_ctrl_sent\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 6)\n+#define ioc_net_hf_l2tpv_3_ctrl_recv\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 7)\n+#define ioc_net_hf_l2tpv_3_ctrl_first_byte \\\n+\t\t(ioc_net_hf_l2tpv_3_ctrl_type_bit << 8)\n+#define ioc_net_hf_l2tpv_3_ctrl_all_fields \\\n+\t\t((ioc_net_hf_l2tpv_3_ctrl_type_bit << 9) - 1)\n+\n+#define ioc_net_hf_l2tpv_3_sess_type_bit\t(1)\n+#define ioc_net_hf_l2tpv_3_sess_version\t(ioc_net_hf_l2tpv_3_sess_type_bit << 1)\n+#define ioc_net_hf_l2tpv_3_sess_id\t(ioc_net_hf_l2tpv_3_sess_type_bit << 2)\n+#define ioc_net_hf_l2tpv_3_sess_cookie\t(ioc_net_hf_l2tpv_3_sess_type_bit << 3)\n+#define ioc_net_hf_l2tpv_3_sess_all_fields \\\n+\t\t((ioc_net_hf_l2tpv_3_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_TH\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 \\\n+\t\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 \\\n+\t\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..b2cd555fd 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-2020 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": [
        "v8",
        "1/8"
    ]
}