get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 38429,
    "url": "https://patches.dpdk.org/api/patches/38429/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.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": "<1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com",
    "date": "2018-04-18T17:22:01",
    "name": "[dpdk-dev,RFC] P4 enablement in DPDK",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "16b0e5fed16351ff4ff6ebf22387a7b02cb2f19a",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/38429/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/38429/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 30DA16D81;\n\tWed, 18 Apr 2018 19:22:08 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id C07935F5D\n\tfor <dev@dpdk.org>; Wed, 18 Apr 2018 19:22:05 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Apr 2018 10:22:04 -0700",
            "from silpixa00382658.ir.intel.com ([10.237.223.29])\n\tby orsmga005.jf.intel.com with ESMTP; 18 Apr 2018 10:22:02 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,466,1517904000\"; d=\"scan'208\";a=\"217587983\"",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "dan.daly@intel.com",
        "Date": "Wed, 18 Apr 2018 18:22:01 +0100",
        "Message-Id": "<1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC] P4 enablement 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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "P4 is a language for programming the data plane of network devices [1]. The P4\nlanguage is developed by p4.org which is joining ONF and Linux Foundation [2].\n\nThis API provides a way to program P4 capable devices through DPDK. The purpose\nof this API is to enable P4 compilers [3] to generate high performance DPDK code\nout of P4 programs.\n\nThe main advantage of this approach is that P4 enablement of network devices can\nbe done through DPDK in a unified way:\n\n   1. This API serves as the interface between the P4 compiler front-end (target\n      independent) and the P4 compiler backe-ends (target specific).\n\n   2. Device vendors develop their device drivers as part of DPDK by\n      implementing this API. The device driver is agostic of being called by the\n      P4 front-end. The device driver serves as the P4 compiler taget specific\n      back-end.\n\n   3. The P4 compiler front-end is target independent. The amount of C code it\n      generates is minimized by calling this API directly for every P4 feature\n      as opposed to vendor-specific free-style C code generation.\n\nThis API introduces a pipeline device (PDEV) by using a similar approach to the\nexisting ethdev and eventdev DPDK device-like APIs implemented by the DPDK Poll\nMode Drivers (PMDs). Main features:\n\n   1. Discovery of built-in pipeline devices and their capabilities.\n\n   2. Creation of new pipelines out of input ports, output ports, tables and\n      actions.\n\n   3. Registration of packet protocol header and meta-data fields.\n\n   4. Action definition for input ports, output ports and tables.\n\n   5. Pipeline run-time API for table population, statistics read, etc.\n\nThis API targets P4 capable devices such as NICs, FPGAs, NPUs, ASICs, etc, as\nwell as CPUs. Let’s remember that the first P in P4 stands for Programmable, and\nthe CPUs are arguably the most programmable devices. The implementation for the\nCPU SW target is expected to use the DPDK Packet Framework libraries such as\nlibrte_pipeline, librte_port, librte_table with some expected but moderate API\nand implementation adjustments.\n\nLinks:\n\n   [1] P4-16 language specification:\n       https://p4lang.github.io/p4-spec/docs/P4-16-v1.0.0-spec.pdf\n\n   [2] p4.org to join ONF and LF: https://p4.org/p4/onward-and-upward.html\n\n   [3] p4c: https://github.com/p4lang/p4c\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/librte_pipeline/rte_pdev.h        | 1654 +++++++++++++++++++++++++++++++++\n lib/librte_pipeline/rte_pdev_driver.h |  283 ++++++\n 2 files changed, 1937 insertions(+)\n create mode 100644 lib/librte_pipeline/rte_pdev.h\n create mode 100644 lib/librte_pipeline/rte_pdev_driver.h",
    "diff": "diff --git a/lib/librte_pipeline/rte_pdev.h b/lib/librte_pipeline/rte_pdev.h\nnew file mode 100644\nindex 0000000..7095197\n--- /dev/null\n+++ b/lib/librte_pipeline/rte_pdev.h\n@@ -0,0 +1,1654 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#ifndef __INCLUDE_RTE_PDEV_H__\n+#define __INCLUDE_RTE_PDEV_H__\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * @file\n+ * RTE Pipeline Device (PDEV)\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ */\n+\n+#include <stdint.h>\n+\n+#include <rte_common.h>\n+#include <rte_dev.h>\n+#include <rte_ether.h>\n+\n+/** PDEV device handle data type. */\n+struct rte_pdev;\n+\n+/**\n+ * PDEV Capability API\n+ */\n+\n+/** PDEV capabilities. */\n+struct rte_pdev_capabilities {\n+\t/** Number of built-in pipelines.\n+\t * @see rte_pdev_next_get()\n+\t */\n+\tuint32_t n_pipelines_builtin;\n+\n+\t/** Non-zero when new pipelines can be created, zero otherwise.\n+\t * @see rte_pdev_create()\n+\t */\n+\tint create;\n+};\n+\n+/**\n+ * PDEV capabilities get\n+ *\n+ * @param[in] dev\n+ *   Current device.\n+ * @param[out] cap\n+ *   PDEV capabilities. Must be non-NULL.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_capabilities_get(struct rte_device *dev,\n+\tstruct rte_pdev_capabilities *cap);\n+\n+/**\n+ * PDEV Discovery API\n+ *\n+ */\n+\n+/**\n+ * PDEV get next\n+ *\n+ * This API is used to discover pre-existent pipelines on given device. This is\n+ * typically the case for built-in HW pipelines.\n+ *\n+ * @param[in] dev\n+ *   Current device.\n+ * @param[in] pdev\n+ *   Handle to current PDEV on *dev*. Set to NULL during the first invocation\n+ *   for *dev* device.\n+ * @return\n+ *   When non-NULL, handle to next PDEV, otherwise no more PDEV.\n+ *\n+ * @see struct rte_pdev_capabilities::n_pipelines_builtin\n+ */\n+struct rte_pdev *\n+rte_pdev_next_get(struct rte_device *dev, struct rte_pdev *pdev);\n+\n+/**\n+ * PDEV Create API\n+ */\n+\n+/** PDEV statistics counter type. */\n+enum rte_pdev_stats_type {\n+\t/** Number of packets. */\n+\tRTE_PDEV_STATS_N_PKTS = 1 << 0,\n+\n+\t/** Number of packet bytes. */\n+\tRTE_PDEV_STATS_N_BYTES = 1 << 1,\n+};\n+\n+/** PDEV parameters. */\n+struct rte_pdev_params {\n+\t/** PDEV name. */\n+\tconst char *name;\n+\n+\t/** Statistics counters to be enabled.\n+\t * @see enum rte_pdev_stats_type\n+\t */\n+\tuint64_t stats_mask;\n+};\n+\n+/**\n+ * PDEV create\n+ *\n+ * This API is to be called to create new pipelines on given device. This is\n+ * typically supported by reconfigurable HW devices and SW pipelines.\n+ *\n+ * @param[in] dev\n+ *   Current device.\n+ * @param[in] params\n+ *   PDEV parameters. Must be non-NULL and valid.\n+ * @return\n+ *   When non-NULL, handle to created PDEV, otherwise error.\n+ *\n+ * @see struct rte_pdev_capabilities::create\n+ */\n+struct rte_pdev *\n+rte_pdev_create(struct rte_device *dev,\n+\tstruct rte_pdev_params *params);\n+\n+/**\n+ * PDEV free\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_free(struct rte_pdev *pdev);\n+\n+/**\n+ * PDEV start\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_start(struct rte_pdev *pdev);\n+\n+/** PDEV input port types. */\n+enum rte_pdev_port_in_type {\n+\t/** Builtin device. */\n+\tRTE_PDEV_PORT_IN_BUILTIN = 0,\n+\n+\t/** Ethernet device. */\n+\tRTE_PDEV_PORT_IN_ETHDEV,\n+};\n+\n+/** PDEV input port parameters. */\n+struct rte_pdev_port_in_params {\n+\t/** Type. */\n+\tenum rte_pdev_port_in_type type;\n+\n+\t/** Device specific parameters. */\n+\tunion {\n+\t\t/** Builtin device. */\n+\t\tstruct {\n+\t\t\t/** Builtin device name. */\n+\t\t\tconst char *name;\n+\t\t} builtin;\n+\n+\t\t/** Ethernet device. */\n+\t\tstruct {\n+\t\t\t/** Ethernet device name. */\n+\t\t\tconst char *name;\n+\n+\t\t\t/** Reception side queue ID. */\n+\t\t\tuint32_t rx_queue_id;\n+\n+\t\t\t/** Burst size. */\n+\t\t\tuint32_t burst_size;\n+\t\t} ethdev;\n+\t} dev;\n+};\n+\n+/**\n+ * PDEV input port create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV input port ID. Must not be used by any existing *pdev* input port.\n+ * @params[in] params\n+ *   Input port parameters. Must be non-NULL and valid.\n+ * @params[in] enable\n+ *   When non-zero, the new input port is initially enabled, otherwise disabled.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_create(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_in_params *params,\n+\tint enable);\n+\n+/**\n+ * PDEV input port connect to table\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   Input port ID.\n+ * @params[in] table_id\n+ *   Table ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_connect(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tuint32_t table_id);\n+\n+/** PDEV table match type. */\n+enum rte_pdev_table_match_type {\n+\t/**  Wildcard match. */\n+\tRTE_PDEV_TABLE_MATCH_WILDCARD = 0,\n+\n+\t/** Exact match. */\n+\tRTE_PDEV_TABLE_MATCH_EXACT,\n+\n+\t/** Longest Prefix Match (LPM). */\n+\tRTE_PDEV_TABLE_MATCH_LPM,\n+\n+\t/** Index match. */\n+\tRTE_PDEV_TABLE_MATCH_INDEX,\n+\n+\t/** Stub match. No real match process: the default rule is always hit. */\n+\tRTE_PDEV_TABLE_MATCH_STUB,\n+};\n+\n+/** PDEV table match parameters. */\n+struct rte_pdev_table_match_params {\n+\t/** Packet field or packet meta-data field name at match offset 0. */\n+\tconst char *start;\n+\n+\t/** Match size (in bits).\n+\t *\n+\t * For LPM match type, typical values are 32 bits to match a single IPv4\n+\t * address and 128 bits to match a single IPv6 address, but other values\n+\t * are possible, for example for Virtual Routing and Forwarding (VRF).\n+\t *\n+\t * For INDEX match type, the maximum allowed value is 32 bits.\n+\t */\n+\tuint32_t size;\n+\n+\t/** Match mask (*size* bits are used and must be valid).\n+\t *\n+\t * For LPM match type, this parameter is ignored, as *size* implicitly\n+\t * defines *mask* as *size* bits of 1.\n+\t */\n+\tuint8_t *mask;\n+};\n+\n+/** PDEV exact match table parameters. */\n+struct rte_pdev_table_exact_match_params {\n+\t/** Number of hash table buckets. This parameter represents a hint that\n+\t * the underlying implementation may ignore.\n+\t */\n+\tuint32_t n_buckets;\n+\n+\t/** Hash table type. Non-zero for extendable bucket hash table, zero for\n+\t * Least Recently Used (LRU) hash table.\n+\t */\n+\tint extendable_bucket;\n+};\n+\n+/** PDEV table parameters. */\n+struct rte_pdev_table_params {\n+\t/** Match type. */\n+\tenum rte_pdev_table_match_type match_type;\n+\n+\t/** Match parameters. Ignored for STUB match type. */\n+\tstruct rte_pdev_table_match_params match;\n+\n+\t/** Match type specific parameters. */\n+\tRTE_STD_C11\n+\tunion {\n+\t\t/** Exact match table specific parameters. */\n+\t\tstruct rte_pdev_table_exact_match_params exact;\n+\t};\n+\n+\t/** Maximum number of rules to be stored in the current table. */\n+\tuint32_t n_rules;\n+};\n+\n+/**\n+ * PDEV table create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] table_id\n+ *   PDEV table ID. Must not be used by any existing *pdev* table.\n+ * @params[in] params\n+ *   Table parameters. Must be non-NULL and valid.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_create(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_table_params *params);\n+\n+/** PDEV output port type. */\n+enum rte_pdev_port_out_type {\n+\t/** Builtin device. */\n+\tRTE_PDEV_PORT_OUT_BUILTIN = 0,\n+\n+\t/** Ethernet device. */\n+\tRTE_PDEV_PORT_OUT_ETHDEV,\n+\n+\t/** Drop all packets device. */\n+\tRTE_PDEV_PORT_OUT_DROP,\n+};\n+\n+/** PDEV output port parameters. */\n+struct rte_pdev_port_out_params {\n+\t/** Type. */\n+\tenum rte_pdev_port_out_type type;\n+\n+\t/** Device specific parameters. */\n+\tunion {\n+\t\t/** Builtin device. */\n+\t\tstruct {\n+\t\t\t/** Builtin device name. */\n+\t\t\tconst char *name;\n+\t\t} builtin;\n+\n+\t\t/** Ethernet device. */\n+\t\tstruct {\n+\t\t\t/** Ethernet device name. */\n+\t\t\tconst char *name;\n+\n+\t\t\t/** Transmission side queue ID. */\n+\t\t\tuint32_t tx_queue_id;\n+\n+\t\t\t/** Burst size. */\n+\t\t\tuint32_t burst_size;\n+\t\t} ethdev;\n+\t} dev;\n+};\n+\n+/**\n+ * PDEV output port create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV output port ID. Must not be used by any existing *pdev* output port.\n+ * @params[in] params\n+ *   Output port parameters. Must be non-NULL and valid.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_create(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_out_params *params);\n+\n+/**\n+ * PDEV meta-data definition API\n+ */\n+\n+/**\n+ * PDEV packet field registration.\n+ *\n+ * Create symbolic alias for a protocol header or header field in the input\n+ * packet. This alias can then be used as part of assignment actions registered\n+ * for PDEV input ports, tables or output ports, either as left hand side value\n+ * or as one of the right hand side expression operands, as appropriate. The\n+ * packet field registered with the name of \"x\" is used as \"pkt.x\".\n+ *\n+ * This alias is typically translated to its offset and size, which are then\n+ * used during the execution of assignment actions to access the associated data\n+ * bytes within the packet.\n+ *\n+ * The scope of the packet field aliases is the PDEV instance. The attributes\n+ * such as offset or size cannot be changed after the alias registration. This\n+ * approach assumes the input packet type is known in advance, as opposed to\n+ * having each input packet parsed to detect its type. This is a reasonable\n+ * assumption, given that NIC capabilities to filter each packet type to a\n+ * different RX queue are quite common; the NIC is configured transparently to\n+ * the PDEV, with each NIC RX queue mapped as different PDEV input port.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] name\n+ *   Symbolic alias for the input packet header or header field.\n+ * @params[in] offset\n+ *   Byte offset within the input packet. Offset 0 points to the first byte of\n+ *   the packet.\n+ * @params[in] size\n+ *   Field size (in bytes).\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_pkt_field_register(struct rte_pdev *pdev,\n+\tconst char *name,\n+\tuint32_t offset,\n+\tuint32_t size);\n+\n+/**\n+ * PDEV packet meta-data field registration.\n+ *\n+ * Reserve field into the packet meta-data and assign a symbolic alias to it.\n+ * This alias can then be used as part of assignment actions registered for PDEV\n+ * input ports, tables and output ports, either as left hand side value or as\n+ * one of the right hand side expression operands, as appropriate. The packet\n+ * meta-data field registered with the name of \"x\" is used as \"meta.x\".\n+ *\n+ * Each input packet has its own private memory area reserved to store its\n+ * meta-data, which is valid for the lifetime of the packet within the PDEV.\n+ * This alias is typically translated to its offset and size, which are then\n+ * used during the execution of assignment actions to access the associated\n+ * packet meta-data bytes.\n+ *\n+ * The scope of the packet meta-data field aliases is the PDEV instance,\n+ * therefore the meta-data layout is commmon for all the PDEV input packets.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] name\n+ *   Symbolic alias for the packet meta-data field.\n+ * @params[in] size\n+ *   Field size (in bytes).\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_pkt_meta_field_register(struct rte_pdev *pdev,\n+\tconst char *name,\n+\tuint32_t size);\n+\n+/**\n+ * PDEV table rule data field registration.\n+ *\n+ * Reserve field into the table rule data and assign a symbolic alias to it.\n+ * This alias can then be used as part of assignment actions registered for PDEV\n+ * tables, either as left hand side value or as one of the right hand side\n+ * expression operands, as appropriate. The table rule data field registered\n+ * with the name of \"x\" is used as \"table.x\".\n+ *\n+ * This alias is typically translated to its offset and size, which are then\n+ * used during the execution of assignment actions to access the associated\n+ * table rule data bytes.\n+ *\n+ * The table rule data layout is common for all the rules of a given table that\n+ * share the same action profile, therefore the scope of the table rule data\n+ * field alias is its (table, action profile) pair.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] table_id\n+ *   PDEV table ID.\n+ * @params[in] action_profile_id\n+ *   Table action profile ID.\n+ * @params[in] name\n+ *   Symbolic alias for the table rule data field.\n+ * @params[in] size\n+ *   Field size (in bytes).\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_field_register(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t action_profile_id,\n+\tconst char *name,\n+\tuint32_t size);\n+\n+/**\n+ * PDEV input port action API\n+ */\n+enum rte_pdev_port_in_action_type {\n+\t/** Assignment: lvalue = expression. */\n+\tRTE_PDEV_PORT_IN_ACTION_ASSIGN = 0,\n+};\n+\n+/**\n+ * RTE_PDEV_PORT_IN_ACTION_ASSIGN\n+ */\n+struct rte_pdev_port_in_action_assign_config {\n+\t/** Left hand side value for the assignment. Must be one of the\n+\t * pre-registered packet meta-data field symbolic aliases. Packet field\n+\t * and table rule data field symbolic aliases are not allowed.\n+\t */\n+\tconst char *lvalue;\n+\n+\t/** Expression with operands and operators. The operands must be\n+\t * pre-registered packet or packet meta-data field symbolic aliases.\n+\t * Table rule data field aliases are not allowed.\n+\t */\n+\tconst char *expression;\n+};\n+\n+/**\n+ * PDEV input port action profile create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Input port action profile ID. Must not be used by any existing *pdev* input\n+ *   port action profile.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_action_profile_create(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV input port action profile action register\n+ *\n+ * The action registration order is important, as it determines the action\n+ * execution order. The same action type can be registered several times for the\n+ * same profile.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Input port action profile ID.\n+ * @params[in] action_type\n+ *   Input port action type.\n+ * @params[in] action_config\n+ *   Input port action configuration. For input port action X, this parameter\n+ *   needs to point to pre-allocated and valid instance of struct\n+ *   rte_pdev_port_in_action_X_config.\n+ *   Input port action configuration. For input port action X, this parameter\n+ *   must point to valid instance of struct rte_pdev_port_in_action_X_config\n+ *   when this structure is defined by the API or to NULL otherwise.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_action_profile_action_register(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_port_in_action_type action_type,\n+\tvoid *action_config);\n+\n+/**\n+ * PDEV input port action profile freeze\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Input port action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_action_profile_freeze(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV input port action profile register\n+ *\n+ * Zero or at most one action profile can be registered for each input port.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV input port ID.\n+ * @params[in] profile_id\n+ *   Input port action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_action_profile_register(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV table action API\n+ *\n+ * For some actions below (e.g. packet encapsulations, NAT, statistics, etc),\n+ * the same effect can be obtained through a sequence of assignment actions, but\n+ * usually this approach is significantly less performant than using specialized\n+ * actions.\n+ *\n+ * Some of the actions below (e.g. metering, timestamp update, etc) require the\n+ * definition of specialized actions.\n+ */\n+enum rte_pdev_table_action_type {\n+\t/** Assignment: lvalue = expression. */\n+\tRTE_PDEV_TABLE_ACTION_ASSIGN = 0,\n+\n+\t/** Load balancing. */\n+\tRTE_PDEV_TABLE_ACTION_LB,\n+\n+\t/** Traffic metering and policing. */\n+\tRTE_PDEV_TABLE_ACTION_METER,\n+\n+\t/** Packet encapsulation. */\n+\tRTE_PDEV_TABLE_ACTION_ENCAP,\n+\n+\t/** Network Address Translation (NAT). */\n+\tRTE_PDEV_TABLE_ACTION_NAT,\n+\n+\t/** Time to Leave (TTL) update. */\n+\tRTE_PDEV_TABLE_ACTION_TTL,\n+\n+\t/** Statistics per table rule. */\n+\tRTE_PDEV_TABLE_ACTION_STATS,\n+\n+\t/** Time stamp update. */\n+\tRTE_PDEV_TABLE_ACTION_TIME,\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_ASSIGN\n+ */\n+struct rte_pdev_table_action_assign_config {\n+\t/** Left hand side value for the assignment. Must be one of the\n+\t * pre-registered packet, packet meta-data or table field symbolic\n+\t * aliases.\n+\t */\n+\tconst char *lvalue;\n+\n+\t/** Expression with operands and operators. The operands must be\n+\t * pre-registered packet, packet meta-data or table field symbolic\n+\t * aliases.\n+\t */\n+\tconst char *expression;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_LB\n+ */\n+/** Load balance action configuration (per table action profile). */\n+struct rte_pdev_table_action_lb_config {\n+\t/** Hash key parameters. */\n+\tstruct rte_pdev_table_match_params hash_key;\n+\n+\t/** Hash function name. This parameter represents a hint that the\n+\t * underlying implementation may ignore.\n+\t */\n+\tconst char *hash_func;\n+\n+\t/** Hash function seed value. This parameter represents a hint that the\n+\t * underlying implementation may ignore.\n+\t */\n+\tuint64_t hash_seed;\n+\n+\t/** Number of elements in the table storing the output values. */\n+\tuint32_t table_size;\n+\n+\t/** Packet meta-data field name where the output value should be saved. */\n+\tconst char *out;\n+};\n+\n+/** Load balance action parameters (per table rule). */\n+struct rte_pdev_table_action_lb_params {\n+\t/** Table defining the output values and their weights. Needs to be\n+\t * pre-allocated with exactly *table_size* elements. The weights are set\n+\t * in 1 / *table_size* increments. To assign a weight of N / *table_size*\n+\t * to a given output value (0 <= N <= *table_size*), the same output\n+\t * value needs to show up exactly N times in this table.\n+\t */\n+\tuint32_t *table;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_MTR\n+ */\n+/** Packet color. */\n+enum rte_pdev_meter_color {\n+\tRTE_PDEV_METER_COLOR_GREEN = 0, /**< Green. */\n+\tRTE_PDEV_METER_COLOR_YELLOW, /**< Yellow. */\n+\tRTE_PDEV_METER_COLOR_RED, /**< Red. */\n+\tRTE_PDEV_METER_COLORS /**< Number of colors. */\n+};\n+\n+/** Differentiated Services Code Point (DSCP) translation table entry. */\n+struct rte_pdev_dscp_table_entry {\n+\t/** Traffic class ID. Has to be strictly less than *n_tc*. */\n+\tuint32_t tc_id;\n+\n+\t/** Packet input color. Used by the traffic metering algorithm in\n+\t * color aware mode.\n+\t */\n+\tenum rte_pdev_meter_color color;\n+};\n+\n+/** DSCP translation table. */\n+struct rte_pdev_dscp_table {\n+\t/** Array of DSCP table entries */\n+\tstruct rte_pdev_dscp_table_entry entry[64];\n+};\n+\n+/** Supported traffic metering algorithms. */\n+enum rte_pdev_meter_algorithm {\n+\t/** Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */\n+\tRTE_PDEV_METER_SRTCM_RFC2697,\n+\n+\t/** Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */\n+\tRTE_PDEV_METER_TRTCM_RFC2698,\n+\n+\t/** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */\n+\tRTE_PDEV_METER_TRTCM_RFC4115,\n+};\n+\n+/** Traffic metering profile (configuration template). */\n+struct rte_pdev_meter_profile {\n+\t/** Traffic metering algorithm. */\n+\tenum rte_pdev_meter_algorithm alg;\n+\n+\tRTE_STD_C11\n+\tunion {\n+\t\t/** Items only valid when *alg* is set to srTCM - RFC 2697. */\n+\t\tstruct {\n+\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\tuint64_t cir;\n+\n+\t\t\t/** Committed Burst Size (CBS) (bytes). */\n+\t\t\tuint64_t cbs;\n+\n+\t\t\t/** Excess Burst Size (EBS) (bytes). */\n+\t\t\tuint64_t ebs;\n+\t\t} srtcm_rfc2697;\n+\n+\t\t/** Items only valid when *alg* is set to trTCM - RFC 2698. */\n+\t\tstruct {\n+\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\tuint64_t cir;\n+\n+\t\t\t/** Peak Information Rate (PIR) (bytes/second). */\n+\t\t\tuint64_t pir;\n+\n+\t\t\t/** Committed Burst Size (CBS) (byes). */\n+\t\t\tuint64_t cbs;\n+\n+\t\t\t/** Peak Burst Size (PBS) (bytes). */\n+\t\t\tuint64_t pbs;\n+\t\t} trtcm_rfc2698;\n+\n+\t\t/** Items only valid when *alg* is set to trTCM - RFC 4115. */\n+\t\tstruct {\n+\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\tuint64_t cir;\n+\n+\t\t\t/** Excess Information Rate (EIR) (bytes/second). */\n+\t\t\tuint64_t eir;\n+\n+\t\t\t/** Committed Burst Size (CBS) (byes). */\n+\t\t\tuint64_t cbs;\n+\n+\t\t\t/** Excess Burst Size (EBS) (bytes). */\n+\t\t\tuint64_t ebs;\n+\t\t} trtcm_rfc4115;\n+\t};\n+};\n+\n+/** Policer actions. */\n+enum rte_pdev_policer {\n+\t/** Recolor the packet as green. */\n+\tRTE_PDEV_POLICER_COLOR_GREEN = 0,\n+\n+\t/** Recolor the packet as yellow. */\n+\tRTE_PDEV_POLICER_COLOR_YELLOW,\n+\n+\t/** Recolor the packet as red. */\n+\tRTE_PDEV_POLICER_COLOR_RED,\n+\n+\t/** Drop the packet. */\n+\tRTE_PDEV_POLICER_DROP,\n+};\n+\n+/** Meter action configuration per traffic class. */\n+struct rte_pdev_table_action_mtr_tc_params {\n+\t/** Meter profile ID. */\n+\tuint32_t meter_profile_id;\n+\n+\t/** Policer actions. */\n+\tenum rte_pdev_policer policer[RTE_PDEV_METER_COLORS];\n+};\n+\n+/** Meter action statistics counters per traffic class. */\n+struct rte_pdev_table_action_mtr_tc_counters {\n+\t/** Number of packets per color at the output of the traffic metering\n+\t * and before the policer actions are executed. Only valid when\n+\t * *n_packets_valid* is non-zero.\n+\t */\n+\tuint64_t n_packets[RTE_PDEV_METER_COLORS];\n+\n+\t/** Number of packet bytes per color at the output of the traffic\n+\t * metering and before the policer actions are executed. Only valid when\n+\t * *n_bytes_valid* is non-zero.\n+\t */\n+\tuint64_t n_bytes[RTE_PDEV_METER_COLORS];\n+\n+\t/** When non-zero, the *n_packets* field is valid. */\n+\tint n_packets_valid;\n+\n+\t/** When non-zero, the *n_bytes* field is valid. */\n+\tint n_bytes_valid;\n+};\n+\n+/** Meter action configuration (per table action profile). */\n+struct rte_pdev_table_action_mtr_config {\n+\t/** Packet field for IP header. */\n+\tconst char *ip;\n+\n+\t/** IP protocol version. Non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** DSCP translation table. */\n+\tstruct rte_pdev_dscp_table *dscp_table;\n+\n+\t/** Number of traffic classes. Each traffic class has its own traffic\n+\t * meter and policer instances.\n+\t */\n+\tuint32_t n_tc;\n+\n+\t/** Meter algorithm. */\n+\tenum rte_pdev_meter_algorithm alg;\n+\n+\t/** When non-zero, the *n_packets* meter stats counter is enabled,\n+\t * otherwise it is disabled.\n+\t *\n+\t * @see struct rte_pdev_table_action_mtr_tc_counters\n+\t */\n+\tint n_packets_enabled;\n+\n+\t/** When non-zero, the *n_bytes* meter stats counter is enabled,\n+\t * otherwise it is disabled.\n+\t *\n+\t * @see struct rte_pdev_table_action_mtr_tc_counters\n+\t */\n+\tint n_bytes_enabled;\n+};\n+\n+/** Meter action parameters (per table rule). */\n+struct rte_pdev_table_action_mtr_params {\n+\t/** Traffic meter and policer parameters for all traffic classes. Array\n+\t * of *n_tc* elements.\n+\t */\n+\tstruct rte_pdev_table_action_mtr_tc_params *mtr;\n+};\n+\n+/** Meter action statistics counters (per table rule). */\n+struct rte_pdev_table_action_mtr_counters {\n+\t/** Stats counters for all traffic classes. Array of *n_tc* elements. */\n+\tstruct rte_pdev_table_action_mtr_tc_counters *stats;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_ENCAP\n+ */\n+/** Supported packet encapsulation types. */\n+enum rte_pdev_encap_type {\n+\t/** IP -> { Ether | IP } */\n+\tRTE_PDEV_ENCAP_ETHER = 0,\n+\n+\t/** IP -> { Ether | VLAN | IP } */\n+\tRTE_PDEV_ENCAP_VLAN,\n+\n+\t/** IP -> { Ether | S-VLAN | C-VLAN | IP } */\n+\tRTE_PDEV_ENCAP_QINQ,\n+\n+\t/** IP -> { Ether | MPLS | IP } */\n+\tRTE_PDEV_ENCAP_MPLS,\n+\n+\t/** IP -> { Ether | PPPoE | PPP | IP } */\n+\tRTE_PDEV_ENCAP_PPPOE,\n+};\n+\n+/** Pre-computed Ethernet header fields for encapsulation action. */\n+struct rte_pdev_ether_hdr {\n+\tstruct ether_addr da; /**< Destination address. */\n+\tstruct ether_addr sa; /**< Source address. */\n+};\n+\n+/** Pre-computed VLAN header fields for encapsulation action. */\n+struct rte_pdev_vlan_hdr {\n+\tuint8_t pcp; /**< Priority Code Point (PCP). */\n+\tuint8_t dei; /**< Drop Eligibility Indicator (DEI). */\n+\tuint16_t vid; /**< VLAN Identifier (VID). */\n+};\n+\n+/** Pre-computed MPLS header fields for encapsulation action. */\n+struct rte_pdev_mpls_hdr {\n+\tuint32_t label; /**< Label. */\n+\tuint8_t tc; /**< Traffic Class (TC). */\n+\tuint8_t ttl; /**< Time to Live (TTL). */\n+};\n+\n+/** Pre-computed PPPoE header fields for encapsulation action. */\n+struct rte_pdev_pppoe_hdr {\n+\tuint16_t session_id; /**< Session ID. */\n+};\n+\n+/** Ether encap parameters. */\n+struct rte_pdev_encap_ether_params {\n+\tstruct rte_pdev_ether_hdr ether; /**< Ethernet header. */\n+};\n+\n+/** VLAN encap parameters. */\n+struct rte_pdev_encap_vlan_params {\n+\tstruct rte_pdev_ether_hdr ether; /**< Ethernet header. */\n+\tstruct rte_pdev_vlan_hdr vlan; /**< VLAN header. */\n+};\n+\n+/** QinQ encap parameters. */\n+struct rte_pdev_encap_qinq_params {\n+\tstruct rte_pdev_ether_hdr ether; /**< Ethernet header. */\n+\tstruct rte_pdev_vlan_hdr svlan; /**< Service VLAN header. */\n+\tstruct rte_pdev_vlan_hdr cvlan; /**< Customer VLAN header. */\n+};\n+\n+/** Max number of MPLS labels per output packet for MPLS encapsulation. */\n+#ifndef RTE_PDEV_MPLS_LABELS_MAX\n+#define RTE_PDEV_MPLS_LABELS_MAX                            4\n+#endif\n+\n+/** MPLS encap parameters. */\n+struct rte_pdev_encap_mpls_params {\n+\t/** Ethernet header. */\n+\tstruct rte_pdev_ether_hdr ether;\n+\n+\t/** MPLS header. */\n+\tstruct rte_pdev_mpls_hdr mpls[RTE_PDEV_MPLS_LABELS_MAX];\n+\n+\t/** Number of MPLS labels in MPLS header. */\n+\tuint32_t mpls_count;\n+\n+\t/** Non-zero for MPLS unicast, zero for MPLS multicast. */\n+\tint unicast;\n+};\n+\n+/** PPPoE encap parameters. */\n+struct rte_pdev_encap_pppoe_params {\n+\tstruct rte_pdev_ether_hdr ether; /**< Ethernet header. */\n+\tstruct rte_pdev_pppoe_hdr pppoe; /**< PPPoE/PPP headers. */\n+};\n+\n+/** Encap action configuration (per table action profile). */\n+struct rte_pdev_table_action_encap_config {\n+\t/** Packet field for IP header. */\n+\tconst char *ip;\n+\n+\t/** IP protocol version. Non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** Bit mask defining the set of packet encapsulations enabled for the\n+\t * current table action profile. If bit (1 << N) is set in *encap_mask*,\n+\t * then packet encapsulation N is enabled, otherwise it is disabled.\n+\t *\n+\t * @see enum rte_pdev_encap_type\n+\t */\n+\tuint64_t encap_mask;\n+};\n+\n+/** Encap action parameters (per table rule). */\n+struct rte_pdev_table_action_encap_params {\n+\t/** Encapsulation type. */\n+\tenum rte_pdev_encap_type type;\n+\n+\tRTE_STD_C11\n+\tunion {\n+\t\t/** Only valid when *type* is set to Ether. */\n+\t\tstruct rte_pdev_encap_ether_params ether;\n+\n+\t\t/** Only valid when *type* is set to VLAN. */\n+\t\tstruct rte_pdev_encap_vlan_params vlan;\n+\n+\t\t/** Only valid when *type* is set to QinQ. */\n+\t\tstruct rte_pdev_encap_qinq_params qinq;\n+\n+\t\t/** Only valid when *type* is set to MPLS. */\n+\t\tstruct rte_pdev_encap_mpls_params mpls;\n+\n+\t\t/** Only valid when *type* is set to PPPoE. */\n+\t\tstruct rte_pdev_encap_pppoe_params pppoe;\n+\t};\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_NAT\n+ */\n+/** NAT action configuration (per table action profile). */\n+struct rte_pdev_table_action_nat_config {\n+\t/** Packet field for IP header. */\n+\tconst char *ip;\n+\n+\t/** IP protocol version. Non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** When non-zero, the IP source address and L4 protocol source port are\n+\t * translated. When zero, the IP destination address and L4 protocol\n+\t * destination port are translated.\n+\t */\n+\tint source_nat;\n+\n+\t/** Layer 4 protocol, for example TCP (0x06) or UDP (0x11). The checksum\n+\t * field is computed differently and placed at different header offset\n+\t * by each layer 4 protocol.\n+\t */\n+\tuint8_t proto;\n+};\n+\n+/** NAT action parameters (per table rule). */\n+struct rte_pdev_table_action_nat_params {\n+\t/** IP version for *addr*: non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** IP address. */\n+\tunion {\n+\t\t/** IPv4 address; only valid when *ip_version* is IPv4. */\n+\t\tuint32_t ipv4;\n+\n+\t\t/** IPv6 address; only valid when *ip_version* is IPv6. */\n+\t\tuint8_t ipv6[16];\n+\t} addr;\n+\n+\t/** Port. */\n+\tuint16_t port;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_TTL\n+ */\n+/** TTL action configuration (per table action profile). */\n+struct rte_pdev_table_action_ttl_config {\n+\t/** Packet field for IP header. */\n+\tconst char *ip;\n+\n+\t/** IP protocol version. Non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** Packet meta-data field to be set to *port_out_id* when the updated\n+\t * IPv4 Time to Live (TTL) field or IPv6 Hop Limit (HL) field is zero.\n+\t */\n+\tconst char *port_out;\n+\n+\t/** Output port ID to be stored into *port_out* packet meta-data field\n+\t * when the updated IPv4 TTL field or IPv6 HL field is zero.\n+\t */\n+\tuint32_t port_out_id;\n+\n+\t/** When non-zero, the *n_packets* stats counter for TTL action is\n+\t * enabled, otherwise disabled.\n+\t *\n+\t * @see struct rte_pdev_table_action_ttl_counters\n+\t */\n+\tint n_packets_enabled;\n+};\n+\n+/** TTL action parameters (per table rule). */\n+struct rte_pdev_table_action_ttl_params {\n+\t/** When non-zero, decrement the IPv4 TTL field and update the checksum\n+\t * field, or decrement the IPv6 HL field. When zero, the IPv4 TTL field\n+\t * or the IPv6 HL field is not changed.\n+\t */\n+\tint decrement;\n+};\n+\n+/** TTL action statistics packets (per table rule). */\n+struct rte_pdev_table_action_ttl_counters {\n+\t/** Number of IPv4 packets whose updated TTL field is zero or IPv6\n+\t * packets whose updated HL field is zero.\n+\t */\n+\tuint64_t n_packets;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_STATS\n+ */\n+/** Stats action configuration (per table action profile). */\n+struct rte_pdev_table_action_stats_config {\n+\t/** Packet field for IP header. */\n+\tconst char *ip;\n+\n+\t/** IP protocol version. Non-zero for IPv4, zero for IPv6. */\n+\tint ip_version;\n+\n+\t/** When non-zero, the *n_packets* stats counter is enabled, otherwise\n+\t * disabled.\n+\t *\n+\t * @see struct rte_pdev_table_action_stats_counters\n+\t */\n+\tint n_packets_enabled;\n+\n+\t/** When non-zero, the *n_bytes* stats counter is enabled, otherwise\n+\t * disabled.\n+\t *\n+\t * @see struct rte_pdev_table_action_stats_counters\n+\t */\n+\tint n_bytes_enabled;\n+};\n+\n+/** Stats action parameters (per table rule). */\n+struct rte_pdev_table_action_stats_params {\n+\t/** Initial value for the *n_packets* stats counter. Typically set to 0.\n+\t *\n+\t * @see struct rte_pdev_table_action_stats_counters\n+\t */\n+\tuint64_t n_packets;\n+\n+\t/** Initial value for the *n_bytes* stats counter. Typically set to 0.\n+\t *\n+\t * @see struct rte_pdev_table_action_stats_counters\n+\t */\n+\tuint64_t n_bytes;\n+};\n+\n+/** Stats action counters (per table rule). */\n+struct rte_pdev_table_action_stats_counters {\n+\t/** Number of packets. Valid only when *n_packets_valid* is non-zero. */\n+\tuint64_t n_packets;\n+\n+\t/** Number of bytes. Valid only when *n_bytes_valid* is non-zero. */\n+\tuint64_t n_bytes;\n+\n+\t/** When non-zero, the *n_packets* field is valid, otherwise invalid. */\n+\tint n_packets_valid;\n+\n+\t/** When non-zero, the *n_bytes* field is valid, otherwise invalid. */\n+\tint n_bytes_valid;\n+};\n+\n+/**\n+ * RTE_PDEV_TABLE_ACTION_TIME\n+ */\n+/** Timestamp action parameters (per table rule). */\n+struct rte_pdev_table_action_time_params {\n+\t/** Initial timestamp value. Typically set to current time. */\n+\tuint64_t time;\n+};\n+\n+/**\n+ * PDEV table action profile create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Table action profile ID. Must not be used by any existing *pdev* table\n+ *   action profile.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_action_profile_create(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV table action profile action register\n+ *\n+ * The action registration order is important, as it determines the action\n+ * execution order. The same action type can be registered several times for the\n+ * same profile. \n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Table action profile ID.\n+ * @params[in] action_type\n+ *   Table action type.\n+ * @params[in] action_config\n+ *   Table action configuration. For table action X, this parameter must point\n+ *   to valid instance of struct rte_pdev_table_action_X_config when this\n+ *   structure is defined by the API or to NULL otherwise.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_action_profile_action_register(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_table_action_type action_type,\n+\tvoid *action_config);\n+\n+/**\n+ * PDEV table action profile freeze\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Table action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_action_profile_freeze(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV table action profile register\n+ *\n+ * Zero or several action profiles can be registered for each table.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] table_id\n+ *   PDEV table ID.\n+ * @params[in] profile_id\n+ *   Table action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_action_profile_register(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV output port action API\n+ */\n+enum rte_pdev_port_out_action_type {\n+\t/** Assignment: lvalue = expression. */\n+\tRTE_PDEV_PORT_OUT_ACTION_ASSIGN = 0,\n+};\n+\n+/**\n+ * RTE_PDEV_PORT_OUT_ACTION_ASSIGN\n+ */\n+struct rte_pdev_port_out_action_assign_config {\n+\t/** Left hand side value for the assignment. Must be one of the\n+\t * pre-registered packet field symbolic aliases. Packet meta-data field\n+\t * and table rule data field aliases are not allowed.\n+\t */\n+\tconst char *lvalue;\n+\n+\t/** Expression with operands and operators. The operands must be\n+\t * pre-registered packet or packet meta-data field symbolic aliases.\n+\t * Table rule data field aliases are not allowed.\n+\t */\n+\tconst char *expression;\n+};\n+\n+/**\n+ * PDEV output port action profile create\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Output port action profile ID. Must not be used by any existing *pdev*\n+ *   output port action profile.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_action_profile_create(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV output port action profile action register\n+ *\n+ * The action registration order is important, as it determines the action\n+ * execution order. The same action type can be registered several times for the\n+ * same profile. \n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Output port action profile ID.\n+ * @params[in] action_type\n+ *   Output port action type.\n+ * @params[in] action_config\n+ *   Output port action configuration. For output port action X, this parameter\n+ *   must point to valid instance of struct rte_pdev_port_out_action_X_config\n+ *   when this structure is defined by the API or to NULL otherwise. \n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_action_profile_action_register(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_port_out_action_type action_type,\n+\tvoid *action_config);\n+\n+/**\n+ * PDEV output port action profile freeze\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] profile_id\n+ *   Output port action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_action_profile_freeze(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV output port action profile register\n+ *\n+ * Zero or at most one action profile can be registered for each output port.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV output port ID.\n+ * @params[in] profile_id\n+ *   Output port action profile ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_action_profile_register(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t profile_id);\n+\n+/**\n+ * PDEV input port run-time API\n+ */\n+\n+/**\n+ * PDEV input port enable\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV input port ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_enable(struct rte_pdev *pdev,\n+\tuint32_t port_id);\n+\n+/**\n+ * PDEV input port disable\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV input port ID.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_disable(struct rte_pdev *pdev,\n+\tuint32_t port_id);\n+\n+/** PDEV input port statistics counters. */\n+struct rte_pdev_port_in_stats {\n+\t/** Number of packets read from this input port. */\n+\tuint64_t n_packets;\n+\n+\t/** Number of bytes associated with *n_packets*. */\n+\tuint64_t n_bytes;\n+};\n+\n+/**\n+ * PDEV input port statistics counters read\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV input port ID.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_in_stats_read(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_in_stats *stats,\n+\tint clear);\n+\n+/**\n+ * PDEV table run-time API\n+ */\n+\n+/**\n+ * PDEV table rule add.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] match\n+ *   Rule match. For any match type, the NULL value indicates the default rule.\n+ * @param[in] match_mask\n+ *   Rule match bit-mask. Ignored when *match* is set to NULL. Ignored when\n+ *   *table_id* match type is not WILDCARD or LPM.\n+ * @param[in] match_priority\n+ *   Rule match priority. Ignored when *match* is set to NULL. Ignored when\n+ *   *table_id* match type is not WILDCARD.\n+ * @param[in] action_profile_id\n+ *   Table action profile ID.\n+ * @param[in] action_params\n+ *   Array of action parameters. The number of elements must be equal to the\n+ *   number of actions registered for the *action_profile_id* table action\n+ *   profile. If X is the N-th action registered for *action_profile_id*, then\n+ *   the N-th element of this array needs to be pointer to valid instance of\n+ *   struct rte_pdev_table_action_X_params when defined by the API or to NULL\n+ *   otherwise.\n+ * @param[out] rule_handle\n+ *   Rule handle.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_add(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint8_t *match,\n+\tuint8_t *match_mask,\n+\tuint32_t match_priority,\n+\tuint32_t action_profile_id,\n+\tvoid **action_params,\n+\tvoid **rule_handle);\n+\n+/**\n+ * PDEV table rule delete.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] match\n+ *   Rule match. For any match type, the NULL value indicates the default rule.\n+ * @param[in] match_mask\n+ *   Rule match bit-mask. Ignored when *match* is set to NULL. Ignored when\n+ *   *table_id* match type is not WILDCARD or LPM.\n+  * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_delete(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint8_t *match,\n+\tuint8_t *match_mask);\n+\n+/**\n+ * PDEV table DSCP table update.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] dscp_table\n+ *   DSCP table. Must be pre-allocated and valid.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_dscp_table_update(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_dscp_table *dscp_table);\n+\n+/**\n+ * PDEV table meter profile add.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] meter_profile_id\n+ *   Meter profile ID. Must not be used by any existing *table_id* meter\n+ *   profile.\n+ * @param[in] profile\n+ *   Meter profile parameters.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_meter_profile_add(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t meter_profile_id,\n+\tstruct rte_pdev_meter_profile *profile);\n+\n+/**\n+ * PDEV table meter profile delete.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] meter_profile_id\n+ *   Meter profile ID. Must be one of the existing *table_id* meter profiles.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_meter_profile_delete(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t meter_profile_id);\n+\n+/**\n+ * PDEV table rule meter statistics counters read.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] rule_handle\n+ *   Rule handle.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_meter_read(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_mtr_counters *stats,\n+\tint clear);\n+\n+/**\n+ * PDEV table rule TTL statistics counters read.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] rule_handle\n+ *   Rule handle.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_ttl_read(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_ttl_counters *stats,\n+\tint clear);\n+\n+/**\n+ * PDEV table rule statistics counters read.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] rule_handle\n+ *   Rule handle.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_stats_read(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_stats_counters *stats,\n+\tint clear);\n+\n+/**\n+ * PDEV table rule timestamp read.\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @param[in] table_id\n+ *   PDEV table ID.\n+ * @param[in] rule_handle\n+ *   Rule handle.\n+ * @param[out] timestamp\n+ *   Current timestamp value. Must be non-NULL.\n+ * @return\n+ *   Zero on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_rule_timestamp_read(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tuint64_t *timestamp);\n+\n+/** PDEV table statistics counters. */\n+struct rte_pdev_table_stats {\n+\t/** Number of packets looked up in this table. */\n+\tuint64_t n_packets;\n+\n+\t/** Number of bytes associated with *n_packets*. */\n+\tuint64_t n_bytes;\t\n+};\n+\n+/**\n+ * PDEV table statistics counters read\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] table_id\n+ *   PDEV table ID.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_table_stats_read(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_table_stats *stats,\n+\tint clear);\n+\n+/**\n+ * PDEV output port run-time API\n+ */\n+\n+/** PDEV output port statistics counters. */\n+struct rte_pdev_port_out_stats {\n+\t/** Number of packets written to this output port. */\n+\tuint64_t n_packets;\n+\n+\t/** Number of bytes associated with *n_packets*. */\n+\tuint64_t n_bytes;\n+};\n+\n+/**\n+ * PDEV output port statistics counters read\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ * @params[in] port_id\n+ *   PDEV output port ID.\n+ * @params[out] stats\n+ *   When non-NULL, the statistics counters are read and saved here.\n+ * @params[in] clear\n+ *   When non-zero, the statistics counters are cleared after read, otherwise\n+ *   they are not modified.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+int\n+rte_pdev_port_out_stats_read(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_out_stats *stats,\n+\tint clear);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif\ndiff --git a/lib/librte_pipeline/rte_pdev_driver.h b/lib/librte_pipeline/rte_pdev_driver.h\nnew file mode 100644\nindex 0000000..4b97784\n--- /dev/null\n+++ b/lib/librte_pipeline/rte_pdev_driver.h\n@@ -0,0 +1,283 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#ifndef __INCLUDE_RTE_PDEV_DRIVER_H__\n+#define __INCLUDE_RTE_PDEV_DRIVER_H__\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * @file\n+ * RTE Pipeline Device (PDEV) - Device Driver Interface\n+ */\n+\n+#include <stdint.h>\n+\n+#include \"rte_pdev.h\"\n+\n+/** @internal PDEV create */\n+typedef struct rte_pdev * (*rte_pdev_create_t)(struct rte_device *dev,\n+\tstruct rte_pdev_params *params);\n+\n+/** @internal PDEV free */\n+typedef int (*rte_pdev_free_t)(struct rte_pdev *pdev);\n+\n+/** @internal PDEV start */\n+typedef int (*rte_pdev_start_t)(struct rte_pdev *pdev);\n+\n+/** @internal PDEV input port create */\n+typedef int (*rte_pdev_port_in_create_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_in_params *params,\n+\tint enable);\n+\n+/** @internal PDEV input port connect */\n+typedef int (*rte_pdev_port_in_connect_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tuint32_t table_id);\n+\n+/** @internal PDEV table create */\n+typedef int (*rte_pdev_table_create_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_table_params *params);\n+\n+/** @internal PDEV output port create */\n+typedef int (*rte_pdev_port_out_create_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_out_params *params);\n+\n+/** @internal PDEV packet field register */\n+typedef int (*rte_pdev_pkt_field_register_t)(struct rte_pdev *pdev,\n+\tconst char *name,\n+\tuint32_t offset,\n+\tuint32_t size);\n+\n+/** @internal PDEV packet meta-data field register */\n+typedef int (*rte_pdev_pkt_meta_field_register_t)(struct rte_pdev *pdev,\n+\tconst char *name,\n+\tuint32_t size);\n+\n+/** @internal PDEV table rule data field register */\n+typedef int (*rte_pdev_table_field_register_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t action_profile_id,\n+\tconst char *name,\n+\tuint32_t size);\n+\n+/** @internal PDEV input port action profile create */\n+typedef int (*rte_pdev_port_in_action_profile_create_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV input port action profile action register */\n+typedef int (*rte_pdev_port_in_action_profile_action_register_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_port_in_action_type action_type,\n+\tvoid *action_config);\n+\n+/** @internal PDEV input port action profile freeze */\n+typedef int (*rte_pdev_port_in_action_profile_freeze_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV input port action profile register */\n+typedef int (*rte_pdev_port_in_action_profile_register_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV table action profile create */\n+typedef int (*rte_pdev_table_action_profile_create_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV table action profile action register */\n+typedef int (*rte_pdev_table_action_profile_action_register_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_table_action_type action_type,\n+\tvoid *action_config);\n+\n+/** @internal PDEV table action profile freeze */\n+typedef int (*rte_pdev_table_action_profile_freeze_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV table action profile register */\n+typedef int (*rte_pdev_table_action_profile_register_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV output port action profile create */\n+typedef int (*rte_pdev_port_out_action_profile_create_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV output port action profile action register */\n+typedef int (*rte_pdev_port_out_action_profile_action_register_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id,\n+\tenum rte_pdev_port_out_action_type action_type,\n+\tvoid *action_config);\n+\n+/** @internal PDEV output port action profile freeze */\n+typedef int (*rte_pdev_port_out_action_profile_freeze_t)(struct rte_pdev *pdev,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV output port action profile register */\n+typedef int (*rte_pdev_port_out_action_profile_register_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t profile_id);\n+\n+/** @internal PDEV input port enable */\n+typedef int (*rte_pdev_port_in_enable_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id);\n+\n+/** @internal PDEV input port disable */\n+typedef int (*rte_pdev_port_in_disable_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id);\n+\n+/** @internal PDEV input port stats read */\n+typedef int (*rte_pdev_port_in_stats_read_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_in_stats *stats,\n+\tint clear);\n+\n+/** @internal PDEV table rule add */\n+typedef int (*rte_pdev_table_rule_add_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint8_t *match,\n+\tuint8_t *match_mask,\n+\tuint32_t match_priority,\n+\tuint32_t action_profile_id,\n+\tvoid **action_params,\n+\tvoid **rule_handle);\n+\n+/** @internal PDEV table rule delete */\n+typedef int (*rte_pdev_table_rule_delete_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint8_t *match,\n+\tuint8_t *match_mask);\n+\n+/** @internal PDEV table DSCP table update */\n+typedef int (*rte_pdev_table_dscp_table_update_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_dscp_table *dscp_table);\n+\n+/** @internal PDEV table meter profile add */\n+typedef int (*rte_pdev_table_meter_profile_add_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t meter_profile_id,\n+\tstruct rte_pdev_meter_profile *profile);\n+\n+/** @internal PDEV table meter profile delete */\n+typedef int (*rte_pdev_table_meter_profile_delete_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tuint32_t meter_profile_id);\n+\n+/** @internal PDEV table rule meter stats read */\n+typedef int (*rte_pdev_table_rule_meter_read_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_mtr_counters *stats,\n+\tint clear);\n+\n+/** @internal PDEV table rule TTL stats read */\n+typedef int (*rte_pdev_table_rule_ttl_read_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_ttl_counters *stats,\n+\tint clear);\n+\n+/** @internal PDEV table rule stats read */\n+typedef int (*rte_pdev_table_rule_stats_read_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tstruct rte_pdev_table_action_stats_counters *stats,\n+\tint clear);\n+\n+/** @internal PDEV table rule tiemstamp read */\n+typedef int (*rte_pdev_table_rule_timestamp_read_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tvoid *rule_handle,\n+\tuint64_t *timestamp);\n+\n+/** @internal PDEV table stats read */\n+typedef int (*rte_pdev_table_stats_read_t)(struct rte_pdev *pdev,\n+\tuint32_t table_id,\n+\tstruct rte_pdev_table_stats *stats,\n+\tint clear);\n+\n+/** @internal PDEV output port stats read */\n+typedef int (*rte_pdev_port_out_stats_read_t)(struct rte_pdev *pdev,\n+\tuint32_t port_id,\n+\tstruct rte_pdev_port_out_stats *stats,\n+\tint clear);\n+\n+/** PDEV ops */\n+struct rte_pdev_ops {\n+\t/** PDEV create API */\n+\trte_pdev_create_t create;\n+\trte_pdev_free_t free;\n+\trte_pdev_start_t start;\n+\trte_pdev_port_in_create_t port_in_create;\n+\trte_pdev_port_in_connect_t port_in_connect;\n+\trte_pdev_table_create_t table_create;\n+\trte_pdev_port_out_create_t port_out_create;\n+\n+\t/** PDEV meta-data API */\n+\trte_pdev_pkt_field_register_t pkt_field_register;\n+\trte_pdev_pkt_meta_field_register_t pkt_meta_field_register;\n+\trte_pdev_table_field_register_t table_field_register;\n+\n+\t/** PDEV input port action API */\n+\trte_pdev_port_in_action_profile_create_t port_in_action_profile_create;\n+\trte_pdev_port_in_action_profile_action_register_t port_in_action_profile_action_register;\n+\trte_pdev_port_in_action_profile_freeze_t port_in_action_profile_freeze;\n+\trte_pdev_port_in_action_profile_register_t port_in_action_profile_register;\n+\n+\t/** PDEV table action API */\n+\trte_pdev_table_action_profile_create_t table_action_profile_create;\n+\trte_pdev_table_action_profile_action_register_t table_action_profile_action_register;\n+\trte_pdev_table_action_profile_freeze_t table_action_profile_freeze;\n+\trte_pdev_table_action_profile_register_t table_action_profile_register;\n+\n+\t/** PDEV output port action API */\n+\trte_pdev_port_out_action_profile_create_t port_out_action_profile_create;\n+\trte_pdev_port_out_action_profile_action_register_t port_out_action_profile_action_register;\n+\trte_pdev_port_out_action_profile_freeze_t port_out_action_profile_freeze;\n+\trte_pdev_port_out_action_profile_register_t port_out_action_profile_register;\n+\n+\t/** PDEV input port run-time API */\n+\trte_pdev_port_in_enable_t port_in_enable;\n+\trte_pdev_port_in_disable_t port_in_disable;\n+\trte_pdev_port_in_stats_read_t port_in_stats_read;\n+\n+\t/** PDEV table run-time API */\n+\trte_pdev_table_rule_add_t table_rule_add;\n+\trte_pdev_table_rule_delete_t table_rule_delete;\n+\trte_pdev_table_dscp_table_update_t table_dscp_table_update;\n+\trte_pdev_table_meter_profile_add_t table_meter_profile_add;\n+\trte_pdev_table_meter_profile_delete_t table_meter_profile_delete;\n+\trte_pdev_table_rule_meter_read_t table_rule_meter_read;\n+\trte_pdev_table_rule_ttl_read_t table_rule_ttl_read;\n+\trte_pdev_table_rule_stats_read_t table_rule_stats_read;\n+\trte_pdev_table_rule_timestamp_read_t table_rule_timestamp_read;\n+\trte_pdev_table_stats_read_t table_stats_read;\n+\n+\t/** PDEV output port run-time API */\n+\trte_pdev_port_out_stats_read_t port_out_stats_read;\t\n+};\n+\n+/**\n+ * Get PDEV ops\n+ *\n+ * @param[in] pdev\n+ *   PDEV handle.\n+ *\n+ * @return\n+ *   PDEV ops on success, NULL otherwise.\n+ */\n+const struct rte_pdev_ops *\n+rte_pdev_ops_get(struct rte_pdev *pdev);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif\n",
    "prefixes": [
        "dpdk-dev",
        "RFC"
    ]
}