get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 3449,
    "url": "https://patches.dpdk.org/api/patches/3449/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1424257369-19130-1-git-send-email-mukawa@igel.co.jp/",
    "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": "<1424257369-19130-1-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1424257369-19130-1-git-send-email-mukawa@igel.co.jp",
    "date": "2015-02-18T11:02:49",
    "name": "[dpdk-dev,RFC] lib/librte_ethdev: Expand port identifier",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "5ad2ba4b00453ad6598363b4d90d795eb1eda7e9",
    "submitter": {
        "id": 64,
        "url": "https://patches.dpdk.org/api/people/64/?format=api",
        "name": "Tetsuya Mukawa",
        "email": "mukawa@igel.co.jp"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1424257369-19130-1-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/3449/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/3449/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 364BEADE8;\n\tWed, 18 Feb 2015 12:03:07 +0100 (CET)",
            "from mail-pa0-f52.google.com (mail-pa0-f52.google.com\n\t[209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 9E333ADC0\n\tfor <dev@dpdk.org>; Wed, 18 Feb 2015 12:03:04 +0100 (CET)",
            "by padfb1 with SMTP id fb1so399077pad.8\n\tfor <dev@dpdk.org>; Wed, 18 Feb 2015 03:03:04 -0800 (PST)",
            "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\ti5sm20577970pat.42.2015.02.18.03.03.00\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 18 Feb 2015 03:03:02 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=VrBnSNBtM7DeE3YLAeRWGfvJ722SwtEwSyZe/sVcimo=;\n\tb=EqqHcRPDfJ1/2Mi9HUDLCa+/pBJOGRi6GTuJU/fRQXzeN/Xd31S7PEky12GVnSDY+K\n\tpTYHOupg7jXwJAo9cYvgZwecjKF3io1YTxoUnfzWQk6CKPud0645EbDqC5cbotqdCz6t\n\tb767hqmmSuUR4gKwtB/6c/ZRSG7ZXW+4lAmg9P+k3BkoEuIFHsdtfm3iPHRt8kbOP4vw\n\tVLz3nSTtGbcEV4eTdcIvrG9LgteD518y+cwOb/5wlQQXsrrgVoHIGYW5x5Z3QMzU/OJZ\n\tyGiPU7vUrC3zg2RyQAe5ysJHaK/0YwlH4XiXtb3SkxDWOZQ/jGGEnF+NBL9q0iNx57Za\n\tsqlQ==",
        "X-Gm-Message-State": "ALoCoQkhYupR/QiqO+rrTRh7xH2SvueqGn82+xUzLo0Z76jwA6CMoOhQqVLvcYGkH6CLLoCZEck0",
        "X-Received": "by 10.68.134.164 with SMTP id pl4mr56553390pbb.128.1424257383902;\n\tWed, 18 Feb 2015 03:03:03 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org,\n\tbruce.richardson@intel.com,\n\tthomas.monjalon@6wind.com",
        "Date": "Wed, 18 Feb 2015 20:02:49 +0900",
        "Message-Id": "<1424257369-19130-1-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "Cc": "nhroman@tuxdriver.com",
        "Subject": "[dpdk-dev] [RFC PATCH] lib/librte_ethdev: Expand port identifier",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "Currently uint8_t is used for port identifier. This patch changes it,\nand use uint16_t as port identifier.\nThis patch only changes ethdev library. ABI of the library will be\nkept even after applying it.\n\nAlso, this patch involves following fixes.\n- Use \"port_id\" as variable name instead of \"port\".\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_ether/rte_ethdev.c          |  212 +-\n lib/librte_ether/rte_ethdev_internal.h | 3672 ++++++++++++++++++++++++++++++++\n 2 files changed, 3778 insertions(+), 106 deletions(-)\n create mode 100644 lib/librte_ether/rte_ethdev_internal.h",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex ea3a1fb..3568e4a 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -68,7 +68,7 @@\n #include <rte_string_fns.h>\n \n #include \"rte_ether.h\"\n-#include \"rte_ethdev.h\"\n+#include \"rte_ethdev_internal.h\"\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n #define PMD_DEBUG_TRACE(fmt, args...) do {                        \\\n@@ -109,7 +109,7 @@\n static const char *MZ_RTE_ETH_DEV_DATA = \"rte_eth_dev_data\";\n struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS];\n static struct rte_eth_dev_data *rte_eth_dev_data = NULL;\n-static uint8_t nb_ports = 0;\n+static uint16_t nb_ports = 0;\n \n /* spinlock for eth device callbacks */\n static rte_spinlock_t rte_eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER;\n@@ -309,14 +309,14 @@ rte_eth_driver_register(struct eth_driver *eth_drv)\n }\n \n int\n-rte_eth_dev_socket_id(uint8_t port_id)\n+rte_eth_dev_socket_id(uint16_t port_id)\n {\n \tif (port_id >= nb_ports)\n \t\treturn -1;\n \treturn rte_eth_devices[port_id].pci_dev->numa_node;\n }\n \n-uint8_t\n+uint16_t\n rte_eth_dev_count(void)\n {\n \treturn (nb_ports);\n@@ -361,7 +361,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n }\n \n int\n-rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)\n+rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -387,7 +387,7 @@ rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)\n }\n \n int\n-rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)\n+rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -413,7 +413,7 @@ rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)\n }\n \n int\n-rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)\n+rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -439,7 +439,7 @@ rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)\n }\n \n int\n-rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)\n+rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -503,7 +503,7 @@ rte_eth_dev_tx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n }\n \n static int\n-rte_eth_dev_check_vf_rss_rxq_num(uint8_t port_id, uint16_t nb_rx_q)\n+rte_eth_dev_check_vf_rss_rxq_num(uint16_t port_id, uint16_t nb_rx_q)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \tswitch (nb_rx_q) {\n@@ -528,7 +528,7 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t port_id, uint16_t nb_rx_q)\n }\n \n static int\n-rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n+rte_eth_dev_check_mq_mode(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t\t      const struct rte_eth_conf *dev_conf)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n@@ -692,7 +692,7 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n }\n \n int\n-rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n+rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t\t      const struct rte_eth_conf *dev_conf)\n {\n \tstruct rte_eth_dev *dev;\n@@ -830,7 +830,7 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n }\n \n static void\n-rte_eth_dev_config_restore(uint8_t port_id)\n+rte_eth_dev_config_restore(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n@@ -879,7 +879,7 @@ rte_eth_dev_config_restore(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_start(uint8_t port_id)\n+rte_eth_dev_start(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \tint diag;\n@@ -915,7 +915,7 @@ rte_eth_dev_start(uint8_t port_id)\n }\n \n void\n-rte_eth_dev_stop(uint8_t port_id)\n+rte_eth_dev_stop(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -943,7 +943,7 @@ rte_eth_dev_stop(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_set_link_up(uint8_t port_id)\n+rte_eth_dev_set_link_up(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -962,7 +962,7 @@ rte_eth_dev_set_link_up(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_set_link_down(uint8_t port_id)\n+rte_eth_dev_set_link_down(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -981,7 +981,7 @@ rte_eth_dev_set_link_down(uint8_t port_id)\n }\n \n void\n-rte_eth_dev_close(uint8_t port_id)\n+rte_eth_dev_close(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1002,7 +1002,7 @@ rte_eth_dev_close(uint8_t port_id)\n }\n \n int\n-rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n+rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\t       uint16_t nb_rx_desc, unsigned int socket_id,\n \t\t       const struct rte_eth_rxconf *rx_conf,\n \t\t       struct rte_mempool *mp)\n@@ -1079,7 +1079,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n }\n \n int\n-rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,\n+rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \t\t       uint16_t nb_tx_desc, unsigned int socket_id,\n \t\t       const struct rte_eth_txconf *tx_conf)\n {\n@@ -1119,7 +1119,7 @@ rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,\n }\n \n void\n-rte_eth_promiscuous_enable(uint8_t port_id)\n+rte_eth_promiscuous_enable(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1135,7 +1135,7 @@ rte_eth_promiscuous_enable(uint8_t port_id)\n }\n \n void\n-rte_eth_promiscuous_disable(uint8_t port_id)\n+rte_eth_promiscuous_disable(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1151,7 +1151,7 @@ rte_eth_promiscuous_disable(uint8_t port_id)\n }\n \n int\n-rte_eth_promiscuous_get(uint8_t port_id)\n+rte_eth_promiscuous_get(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1165,7 +1165,7 @@ rte_eth_promiscuous_get(uint8_t port_id)\n }\n \n void\n-rte_eth_allmulticast_enable(uint8_t port_id)\n+rte_eth_allmulticast_enable(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1181,7 +1181,7 @@ rte_eth_allmulticast_enable(uint8_t port_id)\n }\n \n void\n-rte_eth_allmulticast_disable(uint8_t port_id)\n+rte_eth_allmulticast_disable(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1197,7 +1197,7 @@ rte_eth_allmulticast_disable(uint8_t port_id)\n }\n \n int\n-rte_eth_allmulticast_get(uint8_t port_id)\n+rte_eth_allmulticast_get(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1225,7 +1225,7 @@ rte_eth_dev_atomic_read_link_status(struct rte_eth_dev *dev,\n }\n \n void\n-rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)\n+rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1245,7 +1245,7 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)\n }\n \n void\n-rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)\n+rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1265,7 +1265,7 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)\n }\n \n void\n-rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)\n+rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1282,7 +1282,7 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)\n }\n \n void\n-rte_eth_stats_reset(uint8_t port_id)\n+rte_eth_stats_reset(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1298,7 +1298,7 @@ rte_eth_stats_reset(uint8_t port_id)\n \n /* retrieve ethdev extended statistics */\n int\n-rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstats *xstats,\n+rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstats *xstats,\n \tunsigned n)\n {\n \tstruct rte_eth_stats eth_stats;\n@@ -1372,7 +1372,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstats *xstats,\n \n /* reset ethdev extended statistics */\n void\n-rte_eth_xstats_reset(uint8_t port_id)\n+rte_eth_xstats_reset(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1393,7 +1393,7 @@ rte_eth_xstats_reset(uint8_t port_id)\n }\n \n static int\n-set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,\n+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,\n \t\tuint8_t is_rx)\n {\n \tstruct rte_eth_dev *dev;\n@@ -1411,7 +1411,7 @@ set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,\n \n \n int\n-rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,\n+rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,\n \t\tuint8_t stat_idx)\n {\n \treturn set_queue_stats_mapping(port_id, tx_queue_id, stat_idx,\n@@ -1420,7 +1420,7 @@ rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,\n \n \n int\n-rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,\n+rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,\n \t\tuint8_t stat_idx)\n {\n \treturn set_queue_stats_mapping(port_id, rx_queue_id, stat_idx,\n@@ -1429,7 +1429,7 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,\n \n \n void\n-rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)\n+rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1449,7 +1449,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)\n }\n \n void\n-rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)\n+rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1463,7 +1463,7 @@ rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)\n \n \n int\n-rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)\n+rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1478,7 +1478,7 @@ rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)\n }\n \n int\n-rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)\n+rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)\n {\n \tint ret;\n \tstruct rte_eth_dev *dev;\n@@ -1499,7 +1499,7 @@ rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)\n }\n \n int\n-rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)\n+rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1524,7 +1524,7 @@ rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)\n }\n \n int\n-rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int on)\n+rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1546,7 +1546,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int o\n }\n \n int\n-rte_eth_dev_set_vlan_ether_type(uint8_t port_id, uint16_t tpid)\n+rte_eth_dev_set_vlan_ether_type(uint16_t port_id, uint16_t tpid)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1563,7 +1563,7 @@ rte_eth_dev_set_vlan_ether_type(uint8_t port_id, uint16_t tpid)\n }\n \n int\n-rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)\n+rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)\n {\n \tstruct rte_eth_dev *dev;\n \tint ret = 0;\n@@ -1610,7 +1610,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)\n }\n \n int\n-rte_eth_dev_get_vlan_offload(uint8_t port_id)\n+rte_eth_dev_get_vlan_offload(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \tint ret = 0;\n@@ -1635,7 +1635,7 @@ rte_eth_dev_get_vlan_offload(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)\n+rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1651,7 +1651,7 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)\n }\n \n int\n-rte_eth_dev_fdir_add_signature_filter(uint8_t port_id,\n+rte_eth_dev_fdir_add_signature_filter(uint16_t port_id,\n \t\t\t\t      struct rte_fdir_filter *fdir_filter,\n \t\t\t\t      uint8_t queue)\n {\n@@ -1685,7 +1685,7 @@ rte_eth_dev_fdir_add_signature_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_update_signature_filter(uint8_t port_id,\n+rte_eth_dev_fdir_update_signature_filter(uint16_t port_id,\n \t\t\t\t\t struct rte_fdir_filter *fdir_filter,\n \t\t\t\t\t uint8_t queue)\n {\n@@ -1720,7 +1720,7 @@ rte_eth_dev_fdir_update_signature_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_remove_signature_filter(uint8_t port_id,\n+rte_eth_dev_fdir_remove_signature_filter(uint16_t port_id,\n \t\t\t\t\t struct rte_fdir_filter *fdir_filter)\n {\n \tstruct rte_eth_dev *dev;\n@@ -1752,7 +1752,7 @@ rte_eth_dev_fdir_remove_signature_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_get_infos(uint8_t port_id, struct rte_eth_fdir *fdir)\n+rte_eth_dev_fdir_get_infos(uint16_t port_id, struct rte_eth_fdir *fdir)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1774,7 +1774,7 @@ rte_eth_dev_fdir_get_infos(uint8_t port_id, struct rte_eth_fdir *fdir)\n }\n \n int\n-rte_eth_dev_fdir_add_perfect_filter(uint8_t port_id,\n+rte_eth_dev_fdir_add_perfect_filter(uint16_t port_id,\n \t\t\t\t    struct rte_fdir_filter *fdir_filter,\n \t\t\t\t    uint16_t soft_id, uint8_t queue,\n \t\t\t\t    uint8_t drop)\n@@ -1814,7 +1814,7 @@ rte_eth_dev_fdir_add_perfect_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_update_perfect_filter(uint8_t port_id,\n+rte_eth_dev_fdir_update_perfect_filter(uint16_t port_id,\n \t\t\t\t       struct rte_fdir_filter *fdir_filter,\n \t\t\t\t       uint16_t soft_id, uint8_t queue,\n \t\t\t\t       uint8_t drop)\n@@ -1853,7 +1853,7 @@ rte_eth_dev_fdir_update_perfect_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_remove_perfect_filter(uint8_t port_id,\n+rte_eth_dev_fdir_remove_perfect_filter(uint16_t port_id,\n \t\t\t\t       struct rte_fdir_filter *fdir_filter,\n \t\t\t\t       uint16_t soft_id)\n {\n@@ -1891,7 +1891,7 @@ rte_eth_dev_fdir_remove_perfect_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_fdir_set_masks(uint8_t port_id, struct rte_fdir_masks *fdir_mask)\n+rte_eth_dev_fdir_set_masks(uint16_t port_id, struct rte_fdir_masks *fdir_mask)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1911,7 +1911,7 @@ rte_eth_dev_fdir_set_masks(uint8_t port_id, struct rte_fdir_masks *fdir_mask)\n }\n \n int\n-rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n+rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1927,7 +1927,7 @@ rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n }\n \n int\n-rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n+rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -1947,7 +1947,7 @@ rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n }\n \n int\n-rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc_conf)\n+rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2023,7 +2023,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,\n }\n \n int\n-rte_eth_dev_rss_reta_update(uint8_t port_id,\n+rte_eth_dev_rss_reta_update(uint16_t port_id,\n \t\t\t    struct rte_eth_rss_reta_entry64 *reta_conf,\n \t\t\t    uint16_t reta_size)\n {\n@@ -2053,7 +2053,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_rss_reta_query(uint8_t port_id,\n+rte_eth_dev_rss_reta_query(uint16_t port_id,\n \t\t\t   struct rte_eth_rss_reta_entry64 *reta_conf,\n \t\t\t   uint16_t reta_size)\n {\n@@ -2076,7 +2076,7 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)\n+rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)\n {\n \tstruct rte_eth_dev *dev;\n \tuint16_t rss_hash_protos;\n@@ -2098,7 +2098,7 @@ rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)\n }\n \n int\n-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,\n+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,\n \t\t\t      struct rte_eth_rss_conf *rss_conf)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2113,7 +2113,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n+rte_eth_dev_udp_tunnel_add(uint16_t port_id,\n \t\t\t   struct rte_eth_udp_tunnel *udp_tunnel)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2139,7 +2139,7 @@ rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n+rte_eth_dev_udp_tunnel_delete(uint16_t port_id,\n \t\t\t      struct rte_eth_udp_tunnel *udp_tunnel)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2165,7 +2165,7 @@ rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n }\n \n int\n-rte_eth_led_on(uint8_t port_id)\n+rte_eth_led_on(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2180,7 +2180,7 @@ rte_eth_led_on(uint8_t port_id)\n }\n \n int\n-rte_eth_led_off(uint8_t port_id)\n+rte_eth_led_off(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2199,7 +2199,7 @@ rte_eth_led_off(uint8_t port_id)\n  * an empty spot.\n  */\n static inline int\n-get_mac_addr_index(uint8_t port_id, struct ether_addr *addr)\n+get_mac_addr_index(uint16_t port_id, struct ether_addr *addr)\n {\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n@@ -2217,7 +2217,7 @@ get_mac_addr_index(uint8_t port_id, struct ether_addr *addr)\n static struct ether_addr null_mac_addr = {{0, 0, 0, 0, 0, 0}};\n \n int\n-rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,\n+rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *addr,\n \t\t\tuint32_t pool)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2270,7 +2270,7 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,\n }\n \n int\n-rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)\n+rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *addr)\n {\n \tstruct rte_eth_dev *dev;\n \tint index;\n@@ -2302,7 +2302,7 @@ rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)\n }\n \n int\n-rte_eth_dev_set_vf_rxmode(uint8_t port_id,  uint16_t vf,\n+rte_eth_dev_set_vf_rxmode(uint16_t port_id,  uint16_t vf,\n \t\t\t\tuint16_t rx_mode, uint8_t on)\n {\n \tuint16_t num_vfs;\n@@ -2338,7 +2338,7 @@ rte_eth_dev_set_vf_rxmode(uint8_t port_id,  uint16_t vf,\n  * an empty spot.\n  */\n static inline int\n-get_hash_mac_addr_index(uint8_t port_id, struct ether_addr *addr)\n+get_hash_mac_addr_index(uint16_t port_id, struct ether_addr *addr)\n {\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n@@ -2357,7 +2357,7 @@ get_hash_mac_addr_index(uint8_t port_id, struct ether_addr *addr)\n }\n \n int\n-rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,\n+rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,\n \t\t\t\tuint8_t on)\n {\n \tint index;\n@@ -2413,7 +2413,7 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,\n }\n \n int\n-rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)\n+rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2430,7 +2430,7 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)\n }\n \n int\n-rte_eth_dev_set_vf_rx(uint8_t port_id,uint16_t vf, uint8_t on)\n+rte_eth_dev_set_vf_rx(uint16_t port_id,uint16_t vf, uint8_t on)\n {\n \tuint16_t num_vfs;\n \tstruct rte_eth_dev *dev;\n@@ -2456,7 +2456,7 @@ rte_eth_dev_set_vf_rx(uint8_t port_id,uint16_t vf, uint8_t on)\n }\n \n int\n-rte_eth_dev_set_vf_tx(uint8_t port_id,uint16_t vf, uint8_t on)\n+rte_eth_dev_set_vf_tx(uint16_t port_id,uint16_t vf, uint8_t on)\n {\n \tuint16_t num_vfs;\n \tstruct rte_eth_dev *dev;\n@@ -2482,7 +2482,7 @@ rte_eth_dev_set_vf_tx(uint8_t port_id,uint16_t vf, uint8_t on)\n }\n \n int\n-rte_eth_dev_set_vf_vlan_filter(uint8_t port_id, uint16_t vlan_id,\n+rte_eth_dev_set_vf_vlan_filter(uint16_t port_id, uint16_t vlan_id,\n \t\t\t\t uint64_t vf_mask,uint8_t vlan_on)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2511,7 +2511,7 @@ rte_eth_dev_set_vf_vlan_filter(uint8_t port_id, uint16_t vlan_id,\n \t\t\t\t\t\tvf_mask,vlan_on);\n }\n \n-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,\n+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \t\t\t\t\tuint16_t tx_rate)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2545,7 +2545,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,\n \treturn (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate);\n }\n \n-int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate,\n+int rte_eth_set_vf_rate_limit(uint16_t port_id, uint16_t vf, uint16_t tx_rate,\n \t\t\t\tuint64_t q_msk)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2583,7 +2583,7 @@ int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate,\n }\n \n int\n-rte_eth_mirror_rule_set(uint8_t port_id,\n+rte_eth_mirror_rule_set(uint16_t port_id,\n \t\t\tstruct rte_eth_vmdq_mirror_conf *mirror_conf,\n \t\t\tuint8_t rule_id, uint8_t on)\n {\n@@ -2626,7 +2626,7 @@ rte_eth_mirror_rule_set(uint8_t port_id,\n }\n \n int\n-rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)\n+rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \n@@ -2650,7 +2650,7 @@ rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n uint16_t\n-rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,\n+rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n \t\t struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2670,7 +2670,7 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,\n }\n \n uint16_t\n-rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,\n+rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\n \t\t struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2691,7 +2691,7 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,\n }\n \n uint32_t\n-rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)\n+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2705,7 +2705,7 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)\n }\n \n int\n-rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)\n+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2721,7 +2721,7 @@ rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)\n #endif\n \n int\n-rte_eth_dev_callback_register(uint8_t port_id,\n+rte_eth_dev_callback_register(uint16_t port_id,\n \t\t\tenum rte_eth_event_type event,\n \t\t\trte_eth_dev_cb_fn cb_fn, void *cb_arg)\n {\n@@ -2760,7 +2760,7 @@ rte_eth_dev_callback_register(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_callback_unregister(uint8_t port_id,\n+rte_eth_dev_callback_unregister(uint16_t port_id,\n \t\t\tenum rte_eth_event_type event,\n \t\t\trte_eth_dev_cb_fn cb_fn, void *cb_arg)\n {\n@@ -2826,7 +2826,7 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,\n \trte_spinlock_unlock(&rte_eth_dev_cb_lock);\n }\n #ifdef RTE_NIC_BYPASS\n-int rte_eth_dev_bypass_init(uint8_t port_id)\n+int rte_eth_dev_bypass_init(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2846,7 +2846,7 @@ int rte_eth_dev_bypass_init(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_bypass_state_show(uint8_t port_id, uint32_t *state)\n+rte_eth_dev_bypass_state_show(uint16_t port_id, uint32_t *state)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2865,7 +2865,7 @@ rte_eth_dev_bypass_state_show(uint8_t port_id, uint32_t *state)\n }\n \n int\n-rte_eth_dev_bypass_state_set(uint8_t port_id, uint32_t *new_state)\n+rte_eth_dev_bypass_state_set(uint16_t port_id, uint32_t *new_state)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2885,7 +2885,7 @@ rte_eth_dev_bypass_state_set(uint8_t port_id, uint32_t *new_state)\n }\n \n int\n-rte_eth_dev_bypass_event_show(uint8_t port_id, uint32_t event, uint32_t *state)\n+rte_eth_dev_bypass_event_show(uint16_t port_id, uint32_t event, uint32_t *state)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2905,7 +2905,7 @@ rte_eth_dev_bypass_event_show(uint8_t port_id, uint32_t event, uint32_t *state)\n }\n \n int\n-rte_eth_dev_bypass_event_store(uint8_t port_id, uint32_t event, uint32_t state)\n+rte_eth_dev_bypass_event_store(uint16_t port_id, uint32_t event, uint32_t state)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2925,7 +2925,7 @@ rte_eth_dev_bypass_event_store(uint8_t port_id, uint32_t event, uint32_t state)\n }\n \n int\n-rte_eth_dev_wd_timeout_store(uint8_t port_id, uint32_t timeout)\n+rte_eth_dev_wd_timeout_store(uint16_t port_id, uint32_t timeout)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2945,7 +2945,7 @@ rte_eth_dev_wd_timeout_store(uint8_t port_id, uint32_t timeout)\n }\n \n int\n-rte_eth_dev_bypass_ver_show(uint8_t port_id, uint32_t *ver)\n+rte_eth_dev_bypass_ver_show(uint16_t port_id, uint32_t *ver)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2965,7 +2965,7 @@ rte_eth_dev_bypass_ver_show(uint8_t port_id, uint32_t *ver)\n }\n \n int\n-rte_eth_dev_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)\n+rte_eth_dev_bypass_wd_timeout_show(uint16_t port_id, uint32_t *wd_timeout)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -2985,7 +2985,7 @@ rte_eth_dev_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)\n }\n \n int\n-rte_eth_dev_bypass_wd_reset(uint8_t port_id)\n+rte_eth_dev_bypass_wd_reset(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3006,7 +3006,7 @@ rte_eth_dev_bypass_wd_reset(uint8_t port_id)\n #endif\n \n int\n-rte_eth_dev_add_syn_filter(uint8_t port_id,\n+rte_eth_dev_add_syn_filter(uint16_t port_id,\n \t\t\tstruct rte_syn_filter *filter, uint16_t rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3022,7 +3022,7 @@ rte_eth_dev_add_syn_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_remove_syn_filter(uint8_t port_id)\n+rte_eth_dev_remove_syn_filter(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3037,7 +3037,7 @@ rte_eth_dev_remove_syn_filter(uint8_t port_id)\n }\n \n int\n-rte_eth_dev_get_syn_filter(uint8_t port_id,\n+rte_eth_dev_get_syn_filter(uint16_t port_id,\n \t\t\tstruct rte_syn_filter *filter, uint16_t *rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3056,7 +3056,7 @@ rte_eth_dev_get_syn_filter(uint8_t port_id,\n }\n \n int\n-rte_eth_dev_add_2tuple_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_add_2tuple_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_2tuple_filter *filter, uint16_t rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3079,7 +3079,7 @@ rte_eth_dev_add_2tuple_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_remove_2tuple_filter(uint8_t port_id, uint16_t index)\n+rte_eth_dev_remove_2tuple_filter(uint16_t port_id, uint16_t index)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3094,7 +3094,7 @@ rte_eth_dev_remove_2tuple_filter(uint8_t port_id, uint16_t index)\n }\n \n int\n-rte_eth_dev_get_2tuple_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_get_2tuple_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_2tuple_filter *filter, uint16_t *rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3113,7 +3113,7 @@ rte_eth_dev_get_2tuple_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_add_5tuple_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_add_5tuple_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_5tuple_filter *filter, uint16_t rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3137,7 +3137,7 @@ rte_eth_dev_add_5tuple_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_remove_5tuple_filter(uint8_t port_id, uint16_t index)\n+rte_eth_dev_remove_5tuple_filter(uint16_t port_id, uint16_t index)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3152,7 +3152,7 @@ rte_eth_dev_remove_5tuple_filter(uint8_t port_id, uint16_t index)\n }\n \n int\n-rte_eth_dev_get_5tuple_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_get_5tuple_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_5tuple_filter *filter, uint16_t *rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3172,7 +3172,7 @@ rte_eth_dev_get_5tuple_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_add_flex_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_add_flex_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_flex_filter *filter, uint16_t rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3188,7 +3188,7 @@ rte_eth_dev_add_flex_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_remove_flex_filter(uint8_t port_id, uint16_t index)\n+rte_eth_dev_remove_flex_filter(uint16_t port_id, uint16_t index)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3203,7 +3203,7 @@ rte_eth_dev_remove_flex_filter(uint8_t port_id, uint16_t index)\n }\n \n int\n-rte_eth_dev_get_flex_filter(uint8_t port_id, uint16_t index,\n+rte_eth_dev_get_flex_filter(uint16_t port_id, uint16_t index,\n \t\t\tstruct rte_flex_filter *filter, uint16_t *rx_queue)\n {\n \tstruct rte_eth_dev *dev;\n@@ -3223,7 +3223,7 @@ rte_eth_dev_get_flex_filter(uint8_t port_id, uint16_t index,\n }\n \n int\n-rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)\n+rte_eth_dev_filter_supported(uint16_t port_id, enum rte_filter_type filter_type)\n {\n \tstruct rte_eth_dev *dev;\n \n@@ -3239,7 +3239,7 @@ rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)\n }\n \n int\n-rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,\n+rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,\n \t\t       enum rte_filter_op filter_op, void *arg)\n {\n \tstruct rte_eth_dev *dev;\ndiff --git a/lib/librte_ether/rte_ethdev_internal.h b/lib/librte_ether/rte_ethdev_internal.h\nnew file mode 100644\nindex 0000000..06068ad\n--- /dev/null\n+++ b/lib/librte_ether/rte_ethdev_internal.h\n@@ -0,0 +1,3672 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _RTE_ETHDEV_H_\n+#define _RTE_ETHDEV_H_\n+\n+/**\n+ * @file\n+ *\n+ * RTE Ethernet Device API\n+ *\n+ * The Ethernet Device API is composed of two parts:\n+ *\n+ * - The application-oriented Ethernet API that includes functions to setup\n+ *   an Ethernet device (configure it, setup its RX and TX queues and start it),\n+ *   to get its MAC address, the speed and the status of its physical link,\n+ *   to receive and to transmit packets, and so on.\n+ *\n+ * - The driver-oriented Ethernet API that exports a function allowing\n+ *   an Ethernet Poll Mode Driver (PMD) to simultaneously register itself as\n+ *   an Ethernet device driver and as a PCI driver for a set of matching PCI\n+ *   [Ethernet] devices classes.\n+ *\n+ * By default, all the functions of the Ethernet Device API exported by a PMD\n+ * are lock-free functions which assume to not be invoked in parallel on\n+ * different logical cores to work on the same target object.  For instance,\n+ * the receive function of a PMD cannot be invoked in parallel on two logical\n+ * cores to poll the same RX queue [of the same port]. Of course, this function\n+ * can be invoked in parallel by different logical cores on different RX queues.\n+ * It is the responsibility of the upper level application to enforce this rule.\n+ *\n+ * If needed, parallel accesses by multiple logical cores to shared queues\n+ * shall be explicitly protected by dedicated inline lock-aware functions\n+ * built on top of their corresponding lock-free functions of the PMD API.\n+ *\n+ * In all functions of the Ethernet API, the Ethernet device is\n+ * designated by an integer >= 0 named the device port identifier.\n+ *\n+ * At the Ethernet driver level, Ethernet devices are represented by a generic\n+ * data structure of type *rte_eth_dev*.\n+ *\n+ * Ethernet devices are dynamically registered during the PCI probing phase\n+ * performed at EAL initialization time.\n+ * When an Ethernet device is being probed, an *rte_eth_dev* structure and\n+ * a new port identifier are allocated for that device. Then, the eth_dev_init()\n+ * function supplied by the Ethernet driver matching the probed PCI\n+ * device is invoked to properly initialize the device.\n+ *\n+ * The role of the device init function consists of resetting the hardware,\n+ * checking access to Non-volatile Memory (NVM), reading the MAC address\n+ * from NVM etc.\n+ *\n+ * If the device init operation is successful, the correspondence between\n+ * the port identifier assigned to the new device and its associated\n+ * *rte_eth_dev* structure is effectively registered.\n+ * Otherwise, both the *rte_eth_dev* structure and the port identifier are\n+ * freed.\n+ *\n+ * The functions exported by the application Ethernet API to setup a device\n+ * designated by its port identifier must be invoked in the following order:\n+ *     - rte_eth_dev_configure()\n+ *     - rte_eth_tx_queue_setup()\n+ *     - rte_eth_rx_queue_setup()\n+ *     - rte_eth_dev_start()\n+ *\n+ * Then, the network application can invoke, in any order, the functions\n+ * exported by the Ethernet API to get the MAC address of a given device, to\n+ * get the speed and the status of a device physical link, to receive/transmit\n+ * [burst of] packets, and so on.\n+ *\n+ * If the application wants to change the configuration (i.e. call\n+ * rte_eth_dev_configure(), rte_eth_tx_queue_setup(), or\n+ * rte_eth_rx_queue_setup()), it must call rte_eth_dev_stop() first to stop the\n+ * device and then do the reconfiguration before calling rte_eth_dev_start()\n+ * again. The tramsit and receive functions should not be invoked when the\n+ * device is stopped.\n+ *\n+ * Please note that some configuration is not stored between calls to\n+ * rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration will\n+ * be retained:\n+ *\n+ *     - flow control settings\n+ *     - receive mode configuration (promiscuous mode, hardware checksum mode,\n+ *       RSS/VMDQ settings etc.)\n+ *     - VLAN filtering configuration\n+ *     - MAC addresses supplied to MAC address array\n+ *     - flow director filtering mode (but not filtering rules)\n+ *     - NIC queue statistics mappings\n+ *\n+ * Any other configuration will not be stored and will need to be re-entered\n+ * after a call to rte_eth_dev_start().\n+ *\n+ * Finally, a network application can close an Ethernet device by invoking the\n+ * rte_eth_dev_close() function.\n+ *\n+ * Each function of the application Ethernet API invokes a specific function\n+ * of the PMD that controls the target device designated by its port\n+ * identifier.\n+ * For this purpose, all device-specific functions of an Ethernet driver are\n+ * supplied through a set of pointers contained in a generic structure of type\n+ * *eth_dev_ops*.\n+ * The address of the *eth_dev_ops* structure is stored in the *rte_eth_dev*\n+ * structure by the device init function of the Ethernet driver, which is\n+ * invoked during the PCI probing phase, as explained earlier.\n+ *\n+ * In other words, each function of the Ethernet API simply retrieves the\n+ * *rte_eth_dev* structure associated with the device port identifier and\n+ * performs an indirect invocation of the corresponding driver function\n+ * supplied in the *eth_dev_ops* structure of the *rte_eth_dev* structure.\n+ *\n+ * For performance reasons, the address of the burst-oriented RX and TX\n+ * functions of the Ethernet driver are not contained in the *eth_dev_ops*\n+ * structure. Instead, they are directly stored at the beginning of the\n+ * *rte_eth_dev* structure to avoid an extra indirect memory access during\n+ * their invocation.\n+ *\n+ * RTE ethernet device drivers do not use interrupts for transmitting or\n+ * receiving. Instead, Ethernet drivers export Poll-Mode receive and transmit\n+ * functions to applications.\n+ * Both receive and transmit functions are packet-burst oriented to minimize\n+ * their cost per packet through the following optimizations:\n+ *\n+ * - Sharing among multiple packets the incompressible cost of the\n+ *   invocation of receive/transmit functions.\n+ *\n+ * - Enabling receive/transmit functions to take advantage of burst-oriented\n+ *   hardware features (L1 cache, prefetch instructions, NIC head/tail\n+ *   registers) to minimize the number of CPU cycles per packet, for instance,\n+ *   by avoiding useless read memory accesses to ring descriptors, or by\n+ *   systematically using arrays of pointers that exactly fit L1 cache line\n+ *   boundaries and sizes.\n+ *\n+ * The burst-oriented receive function does not provide any error notification,\n+ * to avoid the corresponding overhead. As a hint, the upper-level application\n+ * might check the status of the device link once being systematically returned\n+ * a 0 value by the receive function of the driver for a given number of tries.\n+ */\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <stdint.h>\n+\n+#include <rte_log.h>\n+#include <rte_interrupts.h>\n+#include <rte_pci.h>\n+#include <rte_mbuf.h>\n+#include \"rte_ether.h\"\n+#include \"rte_eth_ctrl.h\"\n+\n+/**\n+ * A structure used to retrieve statistics for an Ethernet port.\n+ */\n+struct rte_eth_stats {\n+\tuint64_t ipackets;  /**< Total number of successfully received packets. */\n+\tuint64_t opackets;  /**< Total number of successfully transmitted packets.*/\n+\tuint64_t ibytes;    /**< Total number of successfully received bytes. */\n+\tuint64_t obytes;    /**< Total number of successfully transmitted bytes. */\n+\tuint64_t imissed;   /**< Total of RX missed packets (e.g full FIFO). */\n+\tuint64_t ibadcrc;   /**< Total of RX packets with CRC error. */\n+\tuint64_t ibadlen;   /**< Total of RX packets with bad length. */\n+\tuint64_t ierrors;   /**< Total number of erroneous received packets. */\n+\tuint64_t oerrors;   /**< Total number of failed transmitted packets. */\n+\tuint64_t imcasts;   /**< Total number of multicast received packets. */\n+\tuint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */\n+\tuint64_t fdirmatch; /**< Total number of RX packets matching a filter. */\n+\tuint64_t fdirmiss;  /**< Total number of RX packets not matching any filter. */\n+\tuint64_t tx_pause_xon;  /**< Total nb. of XON pause frame sent. */\n+\tuint64_t rx_pause_xon;  /**< Total nb. of XON pause frame received. */\n+\tuint64_t tx_pause_xoff; /**< Total nb. of XOFF pause frame sent. */\n+\tuint64_t rx_pause_xoff; /**< Total nb. of XOFF pause frame received. */\n+\tuint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];\n+\t/**< Total number of queue RX packets. */\n+\tuint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];\n+\t/**< Total number of queue TX packets. */\n+\tuint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];\n+\t/**< Total number of successfully received queue bytes. */\n+\tuint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];\n+\t/**< Total number of successfully transmitted queue bytes. */\n+\tuint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS];\n+\t/**< Total number of queue packets received that are dropped. */\n+\tuint64_t ilbpackets;\n+\t/**< Total number of good packets received from loopback,VF Only */\n+\tuint64_t olbpackets;\n+\t/**< Total number of good packets transmitted to loopback,VF Only */\n+\tuint64_t ilbbytes;\n+\t/**< Total number of good bytes received from loopback,VF Only */\n+\tuint64_t olbbytes;\n+\t/**< Total number of good bytes transmitted to loopback,VF Only */\n+};\n+\n+/**\n+ * A structure used to retrieve link-level information of an Ethernet port.\n+ */\n+struct rte_eth_link {\n+\tuint16_t link_speed;      /**< ETH_LINK_SPEED_[10, 100, 1000, 10000] */\n+\tuint16_t link_duplex;     /**< ETH_LINK_[HALF_DUPLEX, FULL_DUPLEX] */\n+\tuint8_t  link_status : 1; /**< 1 -> link up, 0 -> link down */\n+}__attribute__((aligned(8)));     /**< aligned for atomic64 read/write */\n+\n+#define ETH_LINK_SPEED_AUTONEG  0       /**< Auto-negotiate link speed. */\n+#define ETH_LINK_SPEED_10       10      /**< 10 megabits/second. */\n+#define ETH_LINK_SPEED_100      100     /**< 100 megabits/second. */\n+#define ETH_LINK_SPEED_1000     1000    /**< 1 gigabits/second. */\n+#define ETH_LINK_SPEED_10000    10000   /**< 10 gigabits/second. */\n+#define ETH_LINK_SPEED_10G      10000   /**< alias of 10 gigabits/second. */\n+#define ETH_LINK_SPEED_20G      20000   /**< 20 gigabits/second. */\n+#define ETH_LINK_SPEED_40G      40000   /**< 40 gigabits/second. */\n+\n+#define ETH_LINK_AUTONEG_DUPLEX 0       /**< Auto-negotiate duplex. */\n+#define ETH_LINK_HALF_DUPLEX    1       /**< Half-duplex connection. */\n+#define ETH_LINK_FULL_DUPLEX    2       /**< Full-duplex connection. */\n+\n+/**\n+ * A structure used to configure the ring threshold registers of an RX/TX\n+ * queue for an Ethernet port.\n+ */\n+struct rte_eth_thresh {\n+\tuint8_t pthresh; /**< Ring prefetch threshold. */\n+\tuint8_t hthresh; /**< Ring host threshold. */\n+\tuint8_t wthresh; /**< Ring writeback threshold. */\n+};\n+\n+/**\n+ *  Simple flags are used for rte_eth_conf.rxmode.mq_mode.\n+ */\n+#define ETH_MQ_RX_RSS_FLAG  0x1\n+#define ETH_MQ_RX_DCB_FLAG  0x2\n+#define ETH_MQ_RX_VMDQ_FLAG 0x4\n+\n+/**\n+ *  A set of values to identify what method is to be used to route\n+ *  packets to multiple queues.\n+ */\n+enum rte_eth_rx_mq_mode {\n+\t/** None of DCB,RSS or VMDQ mode */\n+\tETH_MQ_RX_NONE = 0,\n+\n+\t/** For RX side, only RSS is on */\n+\tETH_MQ_RX_RSS = ETH_MQ_RX_RSS_FLAG,\n+\t/** For RX side,only DCB is on. */\n+\tETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG,\n+\t/** Both DCB and RSS enable */\n+\tETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG,\n+\n+\t/** Only VMDQ, no RSS nor DCB */\n+\tETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG,\n+\t/** RSS mode with VMDQ */\n+\tETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG,\n+\t/** Use VMDQ+DCB to route traffic to queues */\n+\tETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG,\n+\t/** Enable both VMDQ and DCB in VMDq */\n+\tETH_MQ_RX_VMDQ_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG |\n+\t\t\t\t ETH_MQ_RX_VMDQ_FLAG,\n+};\n+\n+/**\n+ * for rx mq mode backward compatible\n+ */\n+#define ETH_RSS                       ETH_MQ_RX_RSS\n+#define VMDQ_DCB                      ETH_MQ_RX_VMDQ_DCB\n+#define ETH_DCB_RX                    ETH_MQ_RX_DCB\n+\n+/**\n+ * A set of values to identify what method is to be used to transmit\n+ * packets using multi-TCs.\n+ */\n+enum rte_eth_tx_mq_mode {\n+\tETH_MQ_TX_NONE    = 0,  /**< It is in neither DCB nor VT mode. */\n+\tETH_MQ_TX_DCB,          /**< For TX side,only DCB is on. */\n+\tETH_MQ_TX_VMDQ_DCB,\t/**< For TX side,both DCB and VT is on. */\n+\tETH_MQ_TX_VMDQ_ONLY,    /**< Only VT on, no DCB */\n+};\n+\n+/**\n+ * for tx mq mode backward compatible\n+ */\n+#define ETH_DCB_NONE                ETH_MQ_TX_NONE\n+#define ETH_VMDQ_DCB_TX             ETH_MQ_TX_VMDQ_DCB\n+#define ETH_DCB_TX                  ETH_MQ_TX_DCB\n+\n+/**\n+ * A structure used to configure the RX features of an Ethernet port.\n+ */\n+struct rte_eth_rxmode {\n+\t/** The multi-queue packet distribution mode to be used, e.g. RSS. */\n+\tenum rte_eth_rx_mq_mode mq_mode;\n+\tuint32_t max_rx_pkt_len;  /**< Only used if jumbo_frame enabled. */\n+\tuint16_t split_hdr_size;  /**< hdr buf size (header_split enabled).*/\n+\tuint8_t header_split : 1, /**< Header Split enable. */\n+\t\thw_ip_checksum   : 1, /**< IP/UDP/TCP checksum offload enable. */\n+\t\thw_vlan_filter   : 1, /**< VLAN filter enable. */\n+\t\thw_vlan_strip    : 1, /**< VLAN strip enable. */\n+\t\thw_vlan_extend   : 1, /**< Extended VLAN enable. */\n+\t\tjumbo_frame      : 1, /**< Jumbo Frame Receipt enable. */\n+\t\thw_strip_crc     : 1, /**< Enable CRC stripping by hardware. */\n+\t\tenable_scatter   : 1; /**< Enable scatter packets rx handler */\n+};\n+\n+/**\n+ * A structure used to configure the Receive Side Scaling (RSS) feature\n+ * of an Ethernet port.\n+ * If not NULL, the *rss_key* pointer of the *rss_conf* structure points\n+ * to an array holding the RSS key to use for hashing specific header\n+ * fields of received packets. The length of this array should be indicated\n+ * by *rss_key_len* below. Otherwise, a default random hash key is used by\n+ * the device driver.\n+ *\n+ * The *rss_key_len* field of the *rss_conf* structure indicates the length\n+ * in bytes of the array pointed by *rss_key*. To be compatible, this length\n+ * will be checked in i40e only. Others assume 40 bytes to be used as before.\n+ *\n+ * The *rss_hf* field of the *rss_conf* structure indicates the different\n+ * types of IPv4/IPv6 packets to which the RSS hashing must be applied.\n+ * Supplying an *rss_hf* equal to zero disables the RSS feature.\n+ */\n+struct rte_eth_rss_conf {\n+\tuint8_t *rss_key;    /**< If not NULL, 40-byte hash key. */\n+\tuint8_t rss_key_len; /**< hash key length in bytes. */\n+\tuint64_t rss_hf;     /**< Hash functions to apply - see below. */\n+};\n+\n+/* Supported RSS offloads */\n+/* for 1G & 10G */\n+#define ETH_RSS_IPV4_SHIFT                    0\n+#define ETH_RSS_IPV4_TCP_SHIFT                1\n+#define ETH_RSS_IPV6_SHIFT                    2\n+#define ETH_RSS_IPV6_EX_SHIFT                 3\n+#define ETH_RSS_IPV6_TCP_SHIFT                4\n+#define ETH_RSS_IPV6_TCP_EX_SHIFT             5\n+#define ETH_RSS_IPV4_UDP_SHIFT                6\n+#define ETH_RSS_IPV6_UDP_SHIFT                7\n+#define ETH_RSS_IPV6_UDP_EX_SHIFT             8\n+/* for 40G only */\n+#define ETH_RSS_NONF_IPV4_UDP_SHIFT           31\n+#define ETH_RSS_NONF_IPV4_TCP_SHIFT           33\n+#define ETH_RSS_NONF_IPV4_SCTP_SHIFT          34\n+#define ETH_RSS_NONF_IPV4_OTHER_SHIFT         35\n+#define ETH_RSS_FRAG_IPV4_SHIFT               36\n+#define ETH_RSS_NONF_IPV6_UDP_SHIFT           41\n+#define ETH_RSS_NONF_IPV6_TCP_SHIFT           43\n+#define ETH_RSS_NONF_IPV6_SCTP_SHIFT          44\n+#define ETH_RSS_NONF_IPV6_OTHER_SHIFT         45\n+#define ETH_RSS_FRAG_IPV6_SHIFT               46\n+#define ETH_RSS_FCOE_OX_SHIFT                 48\n+#define ETH_RSS_FCOE_RX_SHIFT                 49\n+#define ETH_RSS_FCOE_OTHER_SHIFT              50\n+#define ETH_RSS_L2_PAYLOAD_SHIFT              63\n+\n+/* for 1G & 10G */\n+#define ETH_RSS_IPV4                    (1 << ETH_RSS_IPV4_SHIFT)\n+#define ETH_RSS_IPV4_TCP                (1 << ETH_RSS_IPV4_TCP_SHIFT)\n+#define ETH_RSS_IPV6                    (1 << ETH_RSS_IPV6_SHIFT)\n+#define ETH_RSS_IPV6_EX                 (1 << ETH_RSS_IPV6_EX_SHIFT)\n+#define ETH_RSS_IPV6_TCP                (1 << ETH_RSS_IPV6_TCP_SHIFT)\n+#define ETH_RSS_IPV6_TCP_EX             (1 << ETH_RSS_IPV6_TCP_EX_SHIFT)\n+#define ETH_RSS_IPV4_UDP                (1 << ETH_RSS_IPV4_UDP_SHIFT)\n+#define ETH_RSS_IPV6_UDP                (1 << ETH_RSS_IPV6_UDP_SHIFT)\n+#define ETH_RSS_IPV6_UDP_EX             (1 << ETH_RSS_IPV6_UDP_EX_SHIFT)\n+/* for 40G only */\n+#define ETH_RSS_NONF_IPV4_UDP           (1ULL << ETH_RSS_NONF_IPV4_UDP_SHIFT)\n+#define ETH_RSS_NONF_IPV4_TCP           (1ULL << ETH_RSS_NONF_IPV4_TCP_SHIFT)\n+#define ETH_RSS_NONF_IPV4_SCTP          (1ULL << ETH_RSS_NONF_IPV4_SCTP_SHIFT)\n+#define ETH_RSS_NONF_IPV4_OTHER         (1ULL << ETH_RSS_NONF_IPV4_OTHER_SHIFT)\n+#define ETH_RSS_FRAG_IPV4               (1ULL << ETH_RSS_FRAG_IPV4_SHIFT)\n+#define ETH_RSS_NONF_IPV6_UDP           (1ULL << ETH_RSS_NONF_IPV6_UDP_SHIFT)\n+#define ETH_RSS_NONF_IPV6_TCP           (1ULL << ETH_RSS_NONF_IPV6_TCP_SHIFT)\n+#define ETH_RSS_NONF_IPV6_SCTP          (1ULL << ETH_RSS_NONF_IPV6_SCTP_SHIFT)\n+#define ETH_RSS_NONF_IPV6_OTHER         (1ULL << ETH_RSS_NONF_IPV6_OTHER_SHIFT)\n+#define ETH_RSS_FRAG_IPV6               (1ULL << ETH_RSS_FRAG_IPV6_SHIFT)\n+/* FCOE relevant should not be used */\n+#define ETH_RSS_FCOE_OX                 (1ULL << ETH_RSS_FCOE_OX_SHIFT)\n+#define ETH_RSS_FCOE_RX                 (1ULL << ETH_RSS_FCOE_RX_SHIFT)\n+#define ETH_RSS_FCOE_OTHER              (1ULL << ETH_RSS_FCOE_OTHER_SHIFT)\n+#define ETH_RSS_L2_PAYLOAD              (1ULL << ETH_RSS_L2_PAYLOAD_SHIFT)\n+\n+#define ETH_RSS_IP ( \\\n+\t\tETH_RSS_IPV4 | \\\n+\t\tETH_RSS_IPV6 | \\\n+\t\tETH_RSS_NONF_IPV4_OTHER | \\\n+\t\tETH_RSS_FRAG_IPV4 | \\\n+\t\tETH_RSS_NONF_IPV6_OTHER | \\\n+\t\tETH_RSS_FRAG_IPV6)\n+#define ETH_RSS_UDP ( \\\n+\t\tETH_RSS_IPV4 | \\\n+\t\tETH_RSS_IPV6 | \\\n+\t\tETH_RSS_IPV4_UDP | \\\n+\t\tETH_RSS_IPV6_UDP | \\\n+\t\tETH_RSS_IPV6_UDP_EX | \\\n+\t\tETH_RSS_NONF_IPV4_UDP | \\\n+\t\tETH_RSS_NONF_IPV6_UDP)\n+/**< Mask of valid RSS hash protocols */\n+#define ETH_RSS_PROTO_MASK ( \\\n+\t\tETH_RSS_IPV4 | \\\n+\t\tETH_RSS_IPV4_TCP | \\\n+\t\tETH_RSS_IPV6 | \\\n+\t\tETH_RSS_IPV6_EX | \\\n+\t\tETH_RSS_IPV6_TCP | \\\n+\t\tETH_RSS_IPV6_TCP_EX | \\\n+\t\tETH_RSS_IPV4_UDP | \\\n+\t\tETH_RSS_IPV6_UDP | \\\n+\t\tETH_RSS_IPV6_UDP_EX | \\\n+\t\tETH_RSS_NONF_IPV4_UDP | \\\n+\t\tETH_RSS_NONF_IPV4_TCP | \\\n+\t\tETH_RSS_NONF_IPV4_SCTP | \\\n+\t\tETH_RSS_NONF_IPV4_OTHER | \\\n+\t\tETH_RSS_FRAG_IPV4 | \\\n+\t\tETH_RSS_NONF_IPV6_UDP | \\\n+\t\tETH_RSS_NONF_IPV6_TCP | \\\n+\t\tETH_RSS_NONF_IPV6_SCTP | \\\n+\t\tETH_RSS_NONF_IPV6_OTHER | \\\n+\t\tETH_RSS_FRAG_IPV6 | \\\n+\t\tETH_RSS_L2_PAYLOAD)\n+\n+/*\n+ * Definitions used for redirection table entry size.\n+ * Some RSS RETA sizes may not be supported by some drivers, check the\n+ * documentation or the description of relevant functions for more details.\n+ */\n+#define ETH_RSS_RETA_SIZE_64  64\n+#define ETH_RSS_RETA_SIZE_128 128\n+#define ETH_RSS_RETA_SIZE_512 512\n+#define RTE_RETA_GROUP_SIZE   64\n+\n+/* Definitions used for VMDQ and DCB functionality */\n+#define ETH_VMDQ_MAX_VLAN_FILTERS   64 /**< Maximum nb. of VMDQ vlan filters. */\n+#define ETH_DCB_NUM_USER_PRIORITIES 8  /**< Maximum nb. of DCB priorities. */\n+#define ETH_VMDQ_DCB_NUM_QUEUES     128 /**< Maximum nb. of VMDQ DCB queues. */\n+#define ETH_DCB_NUM_QUEUES          128 /**< Maximum nb. of DCB queues. */\n+\n+/* DCB capability defines */\n+#define ETH_DCB_PG_SUPPORT      0x00000001 /**< Priority Group(ETS) support. */\n+#define ETH_DCB_PFC_SUPPORT     0x00000002 /**< Priority Flow Control support. */\n+\n+/* Definitions used for VLAN Offload functionality */\n+#define ETH_VLAN_STRIP_OFFLOAD   0x0001 /**< VLAN Strip  On/Off */\n+#define ETH_VLAN_FILTER_OFFLOAD  0x0002 /**< VLAN Filter On/Off */\n+#define ETH_VLAN_EXTEND_OFFLOAD  0x0004 /**< VLAN Extend On/Off */\n+\n+/* Definitions used for mask VLAN setting */\n+#define ETH_VLAN_STRIP_MASK   0x0001 /**< VLAN Strip  setting mask */\n+#define ETH_VLAN_FILTER_MASK  0x0002 /**< VLAN Filter  setting mask*/\n+#define ETH_VLAN_EXTEND_MASK  0x0004 /**< VLAN Extend  setting mask*/\n+#define ETH_VLAN_ID_MAX       0x0FFF /**< VLAN ID is in lower 12 bits*/\n+\n+/* Definitions used for receive MAC address   */\n+#define ETH_NUM_RECEIVE_MAC_ADDR  128 /**< Maximum nb. of receive mac addr. */\n+\n+/* Definitions used for unicast hash  */\n+#define ETH_VMDQ_NUM_UC_HASH_ARRAY  128 /**< Maximum nb. of UC hash array. */\n+\n+/* Definitions used for VMDQ pool rx mode setting */\n+#define ETH_VMDQ_ACCEPT_UNTAG   0x0001 /**< accept untagged packets. */\n+#define ETH_VMDQ_ACCEPT_HASH_MC 0x0002 /**< accept packets in multicast table . */\n+#define ETH_VMDQ_ACCEPT_HASH_UC 0x0004 /**< accept packets in unicast table. */\n+#define ETH_VMDQ_ACCEPT_BROADCAST   0x0008 /**< accept broadcast packets. */\n+#define ETH_VMDQ_ACCEPT_MULTICAST   0x0010 /**< multicast promiscuous. */\n+\n+/* Definitions used for VMDQ mirror rules setting */\n+#define ETH_VMDQ_NUM_MIRROR_RULE     4 /**< Maximum nb. of mirror rules. . */\n+\n+#define ETH_VMDQ_POOL_MIRROR    0x0001 /**< Virtual Pool Mirroring. */\n+#define ETH_VMDQ_UPLINK_MIRROR  0x0002 /**< Uplink Port Mirroring. */\n+#define ETH_VMDQ_DOWNLIN_MIRROR 0x0004 /**< Downlink Port Mirroring. */\n+#define ETH_VMDQ_VLAN_MIRROR    0x0008 /**< VLAN Mirroring. */\n+\n+/**\n+ * A structure used to configure VLAN traffic mirror of an Ethernet port.\n+ */\n+struct rte_eth_vlan_mirror {\n+\tuint64_t vlan_mask; /**< mask for valid VLAN ID. */\n+\tuint16_t vlan_id[ETH_VMDQ_MAX_VLAN_FILTERS];\n+\t/** VLAN ID list for vlan mirror. */\n+};\n+\n+/**\n+ * A structure used to configure traffic mirror of an Ethernet port.\n+ */\n+struct rte_eth_vmdq_mirror_conf {\n+\tuint8_t rule_type_mask; /**< Mirroring rule type mask we want to set */\n+\tuint8_t dst_pool; /**< Destination pool for this mirror rule. */\n+\tuint64_t pool_mask; /**< Bitmap of pool for pool mirroring */\n+\tstruct rte_eth_vlan_mirror vlan; /**< VLAN ID setting for VLAN mirroring */\n+};\n+\n+/**\n+ * A structure used to configure 64 entries of Redirection Table of the\n+ * Receive Side Scaling (RSS) feature of an Ethernet port. To configure\n+ * more than 64 entries supported by hardware, an array of this structure\n+ * is needed.\n+ */\n+struct rte_eth_rss_reta_entry64 {\n+\tuint64_t mask;\n+\t/**< Mask bits indicate which entries need to be updated/queried. */\n+\tuint8_t reta[RTE_RETA_GROUP_SIZE];\n+\t/**< Group of 64 redirection table entries. */\n+};\n+\n+/**\n+ * This enum indicates the possible number of traffic classes\n+ * in DCB configratioins\n+ */\n+enum rte_eth_nb_tcs {\n+\tETH_4_TCS = 4, /**< 4 TCs with DCB. */\n+\tETH_8_TCS = 8  /**< 8 TCs with DCB. */\n+};\n+\n+/**\n+ * This enum indicates the possible number of queue pools\n+ * in VMDQ configurations.\n+ */\n+enum rte_eth_nb_pools {\n+\tETH_8_POOLS = 8,    /**< 8 VMDq pools. */\n+\tETH_16_POOLS = 16,  /**< 16 VMDq pools. */\n+\tETH_32_POOLS = 32,  /**< 32 VMDq pools. */\n+\tETH_64_POOLS = 64   /**< 64 VMDq pools. */\n+};\n+\n+/* This structure may be extended in future. */\n+struct rte_eth_dcb_rx_conf {\n+\tenum rte_eth_nb_tcs nb_tcs; /**< Possible DCB TCs, 4 or 8 TCs */\n+\tuint8_t dcb_queue[ETH_DCB_NUM_USER_PRIORITIES];\n+\t/**< Possible DCB queue,4 or 8. */\n+};\n+\n+struct rte_eth_vmdq_dcb_tx_conf {\n+\tenum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools. */\n+\tuint8_t dcb_queue[ETH_DCB_NUM_USER_PRIORITIES];\n+\t/**< Possible DCB queue,4 or 8. */\n+};\n+\n+struct rte_eth_dcb_tx_conf {\n+\tenum rte_eth_nb_tcs nb_tcs; /**< Possible DCB TCs, 4 or 8 TCs. */\n+\tuint8_t dcb_queue[ETH_DCB_NUM_USER_PRIORITIES];\n+\t/**< Possible DCB queue,4 or 8. */\n+};\n+\n+struct rte_eth_vmdq_tx_conf {\n+\tenum rte_eth_nb_pools nb_queue_pools; /**< VMDq mode, 64 pools. */\n+};\n+\n+/**\n+ * A structure used to configure the VMDQ+DCB feature\n+ * of an Ethernet port.\n+ *\n+ * Using this feature, packets are routed to a pool of queues, based\n+ * on the vlan id in the vlan tag, and then to a specific queue within\n+ * that pool, using the user priority vlan tag field.\n+ *\n+ * A default pool may be used, if desired, to route all traffic which\n+ * does not match the vlan filter rules.\n+ */\n+struct rte_eth_vmdq_dcb_conf {\n+\tenum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools */\n+\tuint8_t enable_default_pool; /**< If non-zero, use a default pool */\n+\tuint8_t default_pool; /**< The default pool, if applicable */\n+\tuint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */\n+\tstruct {\n+\t\tuint16_t vlan_id; /**< The vlan id of the received frame */\n+\t\tuint64_t pools;   /**< Bitmask of pools for packet rx */\n+\t} pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */\n+\tuint8_t dcb_queue[ETH_DCB_NUM_USER_PRIORITIES];\n+\t/**< Selects a queue in a pool */\n+};\n+\n+struct rte_eth_vmdq_rx_conf {\n+\tenum rte_eth_nb_pools nb_queue_pools; /**< VMDq only mode, 8 or 64 pools */\n+\tuint8_t enable_default_pool; /**< If non-zero, use a default pool */\n+\tuint8_t default_pool; /**< The default pool, if applicable */\n+\tuint8_t enable_loop_back; /**< Enable VT loop back */\n+\tuint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */\n+\tuint32_t rx_mode; /**< Flags from ETH_VMDQ_ACCEPT_* */\n+\tstruct {\n+\t\tuint16_t vlan_id; /**< The vlan id of the received frame */\n+\t\tuint64_t pools;   /**< Bitmask of pools for packet rx */\n+\t} pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */\n+};\n+\n+/**\n+ * A structure used to configure the TX features of an Ethernet port.\n+ */\n+struct rte_eth_txmode {\n+\tenum rte_eth_tx_mq_mode mq_mode; /**< TX multi-queues mode. */\n+\n+\t/* For i40e specifically */\n+\tuint16_t pvid;\n+\tuint8_t hw_vlan_reject_tagged : 1,\n+\t\t/**< If set, reject sending out tagged pkts */\n+\t\thw_vlan_reject_untagged : 1,\n+\t\t/**< If set, reject sending out untagged pkts */\n+\t\thw_vlan_insert_pvid : 1;\n+\t\t/**< If set, enable port based VLAN insertion */\n+};\n+\n+/**\n+ * A structure used to configure an RX ring of an Ethernet port.\n+ */\n+struct rte_eth_rxconf {\n+\tstruct rte_eth_thresh rx_thresh; /**< RX ring threshold registers. */\n+\tuint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */\n+\tuint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */\n+\tuint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */\n+};\n+\n+#define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */\n+#define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 /**< refcnt can be ignored */\n+#define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 /**< all bufs come from same mempool */\n+#define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 /**< disable VLAN offload */\n+#define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 /**< disable SCTP checksum offload */\n+#define ETH_TXQ_FLAGS_NOXSUMUDP  0x0400 /**< disable UDP checksum offload */\n+#define ETH_TXQ_FLAGS_NOXSUMTCP  0x0800 /**< disable TCP checksum offload */\n+#define ETH_TXQ_FLAGS_NOOFFLOADS \\\n+\t\t(ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \\\n+\t\t ETH_TXQ_FLAGS_NOXSUMUDP  | ETH_TXQ_FLAGS_NOXSUMTCP)\n+/**\n+ * A structure used to configure a TX ring of an Ethernet port.\n+ */\n+struct rte_eth_txconf {\n+\tstruct rte_eth_thresh tx_thresh; /**< TX ring threshold registers. */\n+\tuint16_t tx_rs_thresh; /**< Drives the setting of RS bit on TXDs. */\n+\tuint16_t tx_free_thresh; /**< Drives the freeing of TX buffers. */\n+\tuint32_t txq_flags; /**< Set flags for the Tx queue */\n+\tuint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */\n+};\n+\n+/**\n+ * This enum indicates the flow control mode\n+ */\n+enum rte_eth_fc_mode {\n+\tRTE_FC_NONE = 0, /**< Disable flow control. */\n+\tRTE_FC_RX_PAUSE, /**< RX pause frame, enable flowctrl on TX side. */\n+\tRTE_FC_TX_PAUSE, /**< TX pause frame, enable flowctrl on RX side. */\n+\tRTE_FC_FULL      /**< Enable flow control on both side. */\n+};\n+\n+/**\n+ * A structure used to configure Ethernet flow control parameter.\n+ * These parameters will be configured into the register of the NIC.\n+ * Please refer to the corresponding data sheet for proper value.\n+ */\n+struct rte_eth_fc_conf {\n+\tuint32_t high_water;  /**< High threshold value to trigger XOFF */\n+\tuint32_t low_water;   /**< Low threshold value to trigger XON */\n+\tuint16_t pause_time;  /**< Pause quota in the Pause frame */\n+\tuint16_t send_xon;    /**< Is XON frame need be sent */\n+\tenum rte_eth_fc_mode mode;  /**< Link flow control mode */\n+\tuint8_t mac_ctrl_frame_fwd; /**< Forward MAC control frames */\n+\tuint8_t autoneg;      /**< Use Pause autoneg */\n+};\n+\n+/**\n+ * A structure used to configure Ethernet priority flow control parameter.\n+ * These parameters will be configured into the register of the NIC.\n+ * Please refer to the corresponding data sheet for proper value.\n+ */\n+struct rte_eth_pfc_conf {\n+\tstruct rte_eth_fc_conf fc; /**< General flow control parameter. */\n+\tuint8_t priority;          /**< VLAN User Priority. */\n+};\n+\n+/**\n+ *  Memory space that can be configured to store Flow Director filters\n+ *  in the board memory.\n+ */\n+enum rte_fdir_pballoc_type {\n+\tRTE_FDIR_PBALLOC_64K = 0,  /**< 64k. */\n+\tRTE_FDIR_PBALLOC_128K,     /**< 128k. */\n+\tRTE_FDIR_PBALLOC_256K,     /**< 256k. */\n+};\n+\n+/**\n+ *  Select report mode of FDIR hash information in RX descriptors.\n+ */\n+enum rte_fdir_status_mode {\n+\tRTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */\n+\tRTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */\n+\tRTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */\n+};\n+\n+/**\n+ * A structure used to configure the Flow Director (FDIR) feature\n+ * of an Ethernet port.\n+ *\n+ * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.\n+ */\n+struct rte_fdir_conf {\n+\tenum rte_fdir_mode mode; /**< Flow Director mode. */\n+\tenum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */\n+\tenum rte_fdir_status_mode status;  /**< How to report FDIR hash. */\n+\t/** Offset of flexbytes field in RX packets (in 16-bit word units). */\n+\tuint8_t flexbytes_offset;\n+\t/** RX queue of packets matching a \"drop\" filter in perfect mode. */\n+\tuint8_t drop_queue;\n+\tstruct rte_eth_fdir_flex_conf flex_conf;\n+\t/**< Flex payload configuration. */\n+};\n+\n+/**\n+ * UDP tunneling configuration.\n+ */\n+struct rte_eth_udp_tunnel {\n+\tuint16_t udp_port;\n+\tuint8_t prot_type;\n+};\n+\n+/**\n+ *  Possible l4type of FDIR filters.\n+ */\n+enum rte_l4type {\n+\tRTE_FDIR_L4TYPE_NONE = 0,       /**< None. */\n+\tRTE_FDIR_L4TYPE_UDP,            /**< UDP. */\n+\tRTE_FDIR_L4TYPE_TCP,            /**< TCP. */\n+\tRTE_FDIR_L4TYPE_SCTP,           /**< SCTP. */\n+};\n+\n+/**\n+ *  Select IPv4 or IPv6 FDIR filters.\n+ */\n+enum rte_iptype {\n+\tRTE_FDIR_IPTYPE_IPV4 = 0,     /**< IPv4. */\n+\tRTE_FDIR_IPTYPE_IPV6 ,        /**< IPv6. */\n+};\n+\n+/**\n+ *  A structure used to define a FDIR packet filter.\n+ */\n+struct rte_fdir_filter {\n+\tuint16_t flex_bytes; /**< Flex bytes value to match. */\n+\tuint16_t vlan_id; /**< VLAN ID value to match, 0 otherwise. */\n+\tuint16_t port_src; /**< Source port to match, 0 otherwise. */\n+\tuint16_t port_dst; /**< Destination port to match, 0 otherwise. */\n+\tunion {\n+\t\tuint32_t ipv4_addr; /**< IPv4 source address to match. */\n+\t\tuint32_t ipv6_addr[4]; /**< IPv6 source address to match. */\n+\t} ip_src; /**< IPv4/IPv6 source address to match (union of above). */\n+\tunion {\n+\t\tuint32_t ipv4_addr; /**< IPv4 destination address to match. */\n+\t\tuint32_t ipv6_addr[4]; /**< IPv6 destination address to match */\n+\t} ip_dst; /**< IPv4/IPv6 destination address to match (union of above). */\n+\tenum rte_l4type l4type; /**< l4type to match: NONE/UDP/TCP/SCTP. */\n+\tenum rte_iptype iptype; /**< IP packet type to match: IPv4 or IPv6. */\n+};\n+\n+/**\n+ *  A structure used to configure FDIR masks that are used by the device\n+ *  to match the various fields of RX packet headers.\n+ *  @note The only_ip_flow field has the opposite meaning compared to other\n+ *  masks!\n+ */\n+struct rte_fdir_masks {\n+\t/** When set to 1, packet l4type is \\b NOT relevant in filters, and\n+\t   source and destination port masks must be set to zero. */\n+\tuint8_t only_ip_flow;\n+\t/** If set to 1, vlan_id is relevant in filters. */\n+\tuint8_t vlan_id;\n+\t/** If set to 1, vlan_prio is relevant in filters. */\n+\tuint8_t vlan_prio;\n+\t/** If set to 1, flexbytes is relevant in filters. */\n+\tuint8_t flexbytes;\n+\t/** If set to 1, set the IPv6 masks. Otherwise set the IPv4 masks. */\n+\tuint8_t set_ipv6_mask;\n+\t/** When set to 1, comparison of destination IPv6 address with IP6AT\n+\t    registers is meaningful. */\n+\tuint8_t comp_ipv6_dst;\n+\t/** Mask of Destination IPv4 Address. All bits set to 1 define the\n+\t    relevant bits to use in the destination address of an IPv4 packet\n+\t    when matching it against FDIR filters. */\n+\tuint32_t dst_ipv4_mask;\n+\t/** Mask of Source IPv4 Address. All bits set to 1 define\n+\t    the relevant bits to use in the source address of an IPv4 packet\n+\t    when matching it against FDIR filters. */\n+\tuint32_t src_ipv4_mask;\n+\t/** Mask of Source IPv6 Address. All bits set to 1 define the\n+\t    relevant BYTES to use in the source address of an IPv6 packet\n+\t    when matching it against FDIR filters. */\n+\tuint16_t dst_ipv6_mask;\n+\t/** Mask of Destination IPv6 Address. All bits set to 1 define the\n+\t    relevant BYTES to use in the destination address of an IPv6 packet\n+\t    when matching it against FDIR filters. */\n+\tuint16_t src_ipv6_mask;\n+\t/** Mask of Source Port. All bits set to 1 define the relevant\n+\t    bits to use in the source port of an IP packets when matching it\n+\t    against FDIR filters. */\n+\tuint16_t src_port_mask;\n+\t/** Mask of Destination Port. All bits set to 1 define the relevant\n+\t    bits to use in the destination port of an IP packet when matching it\n+\t    against FDIR filters. */\n+\tuint16_t dst_port_mask;\n+};\n+\n+/**\n+ *  A structure used to report the status of the flow director filters in use.\n+ */\n+struct rte_eth_fdir {\n+\t/** Number of filters with collision indication. */\n+\tuint16_t collision;\n+\t/** Number of free (non programmed) filters. */\n+\tuint16_t free;\n+\t/** The Lookup hash value of the added filter that updated the value\n+\t   of the MAXLEN field */\n+\tuint16_t maxhash;\n+\t/** Longest linked list of filters in the table. */\n+\tuint8_t maxlen;\n+\t/** Number of added filters. */\n+\tuint64_t add;\n+\t/** Number of removed filters. */\n+\tuint64_t remove;\n+\t/** Number of failed added filters (no more space in device). */\n+\tuint64_t f_add;\n+\t/** Number of failed removed filters. */\n+\tuint64_t f_remove;\n+};\n+\n+/**\n+ * A structure used to enable/disable specific device interrupts.\n+ */\n+struct rte_intr_conf {\n+\t/** enable/disable lsc interrupt. 0 (default) - disable, 1 enable */\n+\tuint16_t lsc;\n+};\n+\n+/**\n+ * A structure used to configure an Ethernet port.\n+ * Depending upon the RX multi-queue mode, extra advanced\n+ * configuration settings may be needed.\n+ */\n+struct rte_eth_conf {\n+\tuint16_t link_speed;\n+\t/**< ETH_LINK_SPEED_10[0|00|000], or 0 for autonegotation */\n+\tuint16_t link_duplex;\n+\t/**< ETH_LINK_[HALF_DUPLEX|FULL_DUPLEX], or 0 for autonegotation */\n+\tstruct rte_eth_rxmode rxmode; /**< Port RX configuration. */\n+\tstruct rte_eth_txmode txmode; /**< Port TX configuration. */\n+\tuint32_t lpbk_mode; /**< Loopback operation mode. By default the value\n+\t\t\t         is 0, meaning the loopback mode is disabled.\n+\t\t\t\t Read the datasheet of given ethernet controller\n+\t\t\t\t for details. The possible values of this field\n+\t\t\t\t are defined in implementation of each driver. */\n+\tstruct {\n+\t\tstruct rte_eth_rss_conf rss_conf; /**< Port RSS configuration */\n+\t\tstruct rte_eth_vmdq_dcb_conf vmdq_dcb_conf;\n+\t\t/**< Port vmdq+dcb configuration. */\n+\t\tstruct rte_eth_dcb_rx_conf dcb_rx_conf;\n+\t\t/**< Port dcb RX configuration. */\n+\t\tstruct rte_eth_vmdq_rx_conf vmdq_rx_conf;\n+\t\t/**< Port vmdq RX configuration. */\n+\t} rx_adv_conf; /**< Port RX filtering configuration (union). */\n+\tunion {\n+\t\tstruct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;\n+\t\t/**< Port vmdq+dcb TX configuration. */\n+\t\tstruct rte_eth_dcb_tx_conf dcb_tx_conf;\n+\t\t/**< Port dcb TX configuration. */\n+\t\tstruct rte_eth_vmdq_tx_conf vmdq_tx_conf;\n+\t\t/**< Port vmdq TX configuration. */\n+\t} tx_adv_conf; /**< Port TX DCB configuration (union). */\n+\t/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC\n+\t    is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */\n+\tuint32_t dcb_capability_en;\n+\tstruct rte_fdir_conf fdir_conf; /**< FDIR configuration. */\n+\tstruct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */\n+};\n+\n+/**\n+ * A structure used to retrieve the contextual information of\n+ * an Ethernet device, such as the controlling driver of the device,\n+ * its PCI context, etc...\n+ */\n+\n+/**\n+ * RX offload capabilities of a device.\n+ */\n+#define DEV_RX_OFFLOAD_VLAN_STRIP  0x00000001\n+#define DEV_RX_OFFLOAD_IPV4_CKSUM  0x00000002\n+#define DEV_RX_OFFLOAD_UDP_CKSUM   0x00000004\n+#define DEV_RX_OFFLOAD_TCP_CKSUM   0x00000008\n+#define DEV_RX_OFFLOAD_TCP_LRO     0x00000010\n+\n+/**\n+ * TX offload capabilities of a device.\n+ */\n+#define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001\n+#define DEV_TX_OFFLOAD_IPV4_CKSUM  0x00000002\n+#define DEV_TX_OFFLOAD_UDP_CKSUM   0x00000004\n+#define DEV_TX_OFFLOAD_TCP_CKSUM   0x00000008\n+#define DEV_TX_OFFLOAD_SCTP_CKSUM  0x00000010\n+#define DEV_TX_OFFLOAD_TCP_TSO     0x00000020\n+#define DEV_TX_OFFLOAD_UDP_TSO     0x00000040\n+#define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080 /**< Used for tunneling packet. */\n+\n+struct rte_eth_dev_info {\n+\tstruct rte_pci_device *pci_dev; /**< Device PCI information. */\n+\tconst char *driver_name; /**< Device Driver name. */\n+\tunsigned int if_index; /**< Index to bound host interface, or 0 if none.\n+\t\tUse if_indextoname() to translate into an interface name. */\n+\tuint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */\n+\tuint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */\n+\tuint16_t max_rx_queues; /**< Maximum number of RX queues. */\n+\tuint16_t max_tx_queues; /**< Maximum number of TX queues. */\n+\tuint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */\n+\tuint32_t max_hash_mac_addrs;\n+\t/** Maximum number of hash MAC addresses for MTA and UTA. */\n+\tuint16_t max_vfs; /**< Maximum number of VFs. */\n+\tuint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */\n+\tuint32_t rx_offload_capa; /**< Device RX offload capabilities. */\n+\tuint32_t tx_offload_capa; /**< Device TX offload capabilities. */\n+\tuint16_t reta_size;\n+\t/**< Device redirection table size, the total number of entries. */\n+\tstruct rte_eth_rxconf default_rxconf; /**< Default RX configuration */\n+\tstruct rte_eth_txconf default_txconf; /**< Default TX configuration */\n+\tuint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */\n+\tuint16_t vmdq_queue_num;  /**< Queue number for VMDQ pools. */\n+\tuint16_t vmdq_pool_base;  /**< First ID of VMDQ pools. */\n+};\n+\n+/** Maximum name length for extended statistics counters */\n+#define RTE_ETH_XSTATS_NAME_SIZE 64\n+\n+/**\n+ * An Ethernet device extended statistic structure\n+ *\n+ * This structure is used by ethdev->eth_xstats_get() to provide\n+ * statistics that are not provided in the generic rte_eth_stats\n+ * structure.\n+ */\n+struct rte_eth_xstats {\n+\tchar name[RTE_ETH_XSTATS_NAME_SIZE];\n+\tuint64_t value;\n+};\n+\n+struct rte_eth_dev;\n+\n+struct rte_eth_dev_callback;\n+/** @internal Structure to keep track of registered callbacks */\n+TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);\n+\n+#define TCP_UGR_FLAG 0x20\n+#define TCP_ACK_FLAG 0x10\n+#define TCP_PSH_FLAG 0x08\n+#define TCP_RST_FLAG 0x04\n+#define TCP_SYN_FLAG 0x02\n+#define TCP_FIN_FLAG 0x01\n+#define TCP_FLAG_ALL 0x3F\n+\n+/**\n+ *  A structure used to define an syn filter.\n+ */\n+struct rte_syn_filter {\n+\tuint8_t hig_pri; /**< 1 means higher pri than 2tuple, 5tupe,\n+\t\t\t      and flex filter, 0 means lower pri. */\n+};\n+\n+/**\n+ *  A structure used to define a 2tuple filter.\n+ */\n+struct rte_2tuple_filter {\n+\tuint16_t dst_port;        /**< big endian. */\n+\tuint8_t protocol;\n+\tuint8_t tcp_flags;\n+\tuint16_t priority;        /**< used when more than one filter matches. */\n+\tuint8_t dst_port_mask:1,  /**< if mask is 1b, means not compare. */\n+\t\tprotocol_mask:1;\n+};\n+\n+/**\n+ *  A structure used to define a flex filter.\n+ */\n+struct rte_flex_filter {\n+\tuint16_t len;\n+\tuint32_t dwords[32];  /**< flex bytes in big endian. */\n+\tuint8_t mask[16];     /**< if mask bit is 1b, do not compare\n+\t\t\t\t   corresponding byte in dwords. */\n+\tuint8_t priority;\n+};\n+\n+/**\n+ *  A structure used to define a 5tuple filter.\n+ */\n+struct rte_5tuple_filter {\n+\tuint32_t dst_ip;         /**< destination IP address in big endian. */\n+\tuint32_t src_ip;         /**< source IP address in big endian. */\n+\tuint16_t dst_port;       /**< destination port in big endian. */\n+\tuint16_t src_port;       /**< source Port big endian. */\n+\tuint8_t protocol;        /**< l4 protocol. */\n+\tuint8_t tcp_flags;       /**< tcp flags. */\n+\tuint16_t priority;       /**< seven evels (001b-111b), 111b is highest,\n+\t\t\t\t      used when more than one filter matches. */\n+\tuint8_t dst_ip_mask:1,   /**< if mask is 1b, do not compare dst ip. */\n+\t\tsrc_ip_mask:1,   /**< if mask is 1b, do not compare src ip. */\n+\t\tdst_port_mask:1, /**< if mask is 1b, do not compare dst port. */\n+\t\tsrc_port_mask:1, /**< if mask is 1b, do not compare src port. */\n+\t\tprotocol_mask:1; /**< if mask is 1b, do not compare protocol. */\n+};\n+\n+/*\n+ * Definitions of all functions exported by an Ethernet driver through the\n+ * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*\n+ * structure associated with an Ethernet device.\n+ */\n+\n+typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);\n+/**< @internal Ethernet device configuration. */\n+\n+typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to start a configured Ethernet device. */\n+\n+typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to stop a configured Ethernet device. */\n+\n+typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to link up a configured Ethernet device. */\n+\n+typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to link down a configured Ethernet device. */\n+\n+typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to close a configured Ethernet device. */\n+\n+typedef void (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to enable the RX promiscuous mode of an Ethernet device. */\n+\n+typedef void (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to disable the RX promiscuous mode of an Ethernet device. */\n+\n+typedef void (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);\n+/**< @internal Enable the receipt of all multicast packets by an Ethernet device. */\n+\n+typedef void (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);\n+/**< @internal Disable the receipt of all multicast packets by an Ethernet device. */\n+\n+typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,\n+\t\t\t\tint wait_to_complete);\n+/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */\n+\n+typedef void (*eth_stats_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_stats *igb_stats);\n+/**< @internal Get global I/O statistics of an Ethernet device. */\n+\n+typedef void (*eth_stats_reset_t)(struct rte_eth_dev *dev);\n+/**< @internal Reset global I/O statistics of an Ethernet device to 0. */\n+\n+typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,\n+\tstruct rte_eth_xstats *stats, unsigned n);\n+/**< @internal Get extended stats of an Ethernet device. */\n+\n+typedef void (*eth_xstats_reset_t)(struct rte_eth_dev *dev);\n+/**< @internal Reset extended stats of an Ethernet device. */\n+\n+typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t     uint16_t queue_id,\n+\t\t\t\t\t     uint8_t stat_idx,\n+\t\t\t\t\t     uint8_t is_rx);\n+/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */\n+\n+typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    struct rte_eth_dev_info *dev_info);\n+/**< @internal Get specific informations of an Ethernet device. */\n+\n+typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t queue_id);\n+/**< @internal Start rx and tx of a queue of an Ethernet device. */\n+\n+typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t queue_id);\n+/**< @internal Stop rx and tx of a queue of an Ethernet device. */\n+\n+typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t rx_queue_id,\n+\t\t\t\t    uint16_t nb_rx_desc,\n+\t\t\t\t    unsigned int socket_id,\n+\t\t\t\t    const struct rte_eth_rxconf *rx_conf,\n+\t\t\t\t    struct rte_mempool *mb_pool);\n+/**< @internal Set up a receive queue of an Ethernet device. */\n+\n+typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t tx_queue_id,\n+\t\t\t\t    uint16_t nb_tx_desc,\n+\t\t\t\t    unsigned int socket_id,\n+\t\t\t\t    const struct rte_eth_txconf *tx_conf);\n+/**< @internal Setup a transmit queue of an Ethernet device. */\n+\n+typedef void (*eth_queue_release_t)(void *queue);\n+/**< @internal Release memory resources allocated by given RX/TX queue. */\n+\n+typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t uint16_t rx_queue_id);\n+/**< @Get number of available descriptors on a receive queue of an Ethernet device. */\n+\n+typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n+/**< @Check DD bit of specific RX descriptor */\n+\n+typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);\n+/**< @internal Set MTU. */\n+\n+typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint16_t vlan_id,\n+\t\t\t\t  int on);\n+/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */\n+\n+typedef void (*vlan_tpid_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint16_t tpid);\n+/**< @internal set the outer VLAN-TPID by an Ethernet device. */\n+\n+typedef void (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);\n+/**< @internal set VLAN offload function by an Ethernet device. */\n+\n+typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,\n+\t\t\t       uint16_t vlan_id,\n+\t\t\t       int on);\n+/**< @internal set port based TX VLAN insertion by an Ethernet device. */\n+\n+typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint16_t rx_queue_id,\n+\t\t\t\t  int on);\n+/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */\n+\n+typedef uint16_t (*eth_rx_burst_t)(void *rxq,\n+\t\t\t\t   struct rte_mbuf **rx_pkts,\n+\t\t\t\t   uint16_t nb_pkts);\n+/**< @internal Retrieve input packets from a receive queue of an Ethernet device. */\n+\n+typedef uint16_t (*eth_tx_burst_t)(void *txq,\n+\t\t\t\t   struct rte_mbuf **tx_pkts,\n+\t\t\t\t   uint16_t nb_pkts);\n+/**< @internal Send output packets on a transmit queue of an Ethernet device. */\n+\n+typedef int (*fdir_add_signature_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t   struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t   uint8_t rx_queue);\n+/**< @internal Setup a new signature filter rule on an Ethernet device */\n+\n+typedef int (*fdir_update_signature_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t      struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t      uint8_t rx_queue);\n+/**< @internal Update a signature filter rule on an Ethernet device */\n+\n+typedef int (*fdir_remove_signature_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t      struct rte_fdir_filter *fdir_ftr);\n+/**< @internal Remove a  signature filter rule on an Ethernet device */\n+\n+typedef void (*fdir_infos_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_eth_fdir *fdir);\n+/**< @internal Get information about fdir status */\n+\n+typedef int (*fdir_add_perfect_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t uint16_t soft_id, uint8_t rx_queue,\n+\t\t\t\t\t uint8_t drop);\n+/**< @internal Setup a new perfect filter rule on an Ethernet device */\n+\n+typedef int (*fdir_update_perfect_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t    struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t    uint16_t soft_id, uint8_t rx_queue,\n+\t\t\t\t\t    uint8_t drop);\n+/**< @internal Update a perfect filter rule on an Ethernet device */\n+\n+typedef int (*fdir_remove_perfect_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t    struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t    uint16_t soft_id);\n+/**< @internal Remove a perfect filter rule on an Ethernet device */\n+\n+typedef int (*fdir_set_masks_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_fdir_masks *fdir_masks);\n+/**< @internal Setup flow director masks on an Ethernet device */\n+\n+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,\n+\t\t\t       struct rte_eth_fc_conf *fc_conf);\n+/**< @internal Get current flow control parameter on an Ethernet device */\n+\n+typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,\n+\t\t\t       struct rte_eth_fc_conf *fc_conf);\n+/**< @internal Setup flow control parameter on an Ethernet device */\n+\n+typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_pfc_conf *pfc_conf);\n+/**< @internal Setup priority flow control parameter on an Ethernet device */\n+\n+typedef int (*reta_update_t)(struct rte_eth_dev *dev,\n+\t\t\t     struct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\t     uint16_t reta_size);\n+/**< @internal Update RSS redirection table on an Ethernet device */\n+\n+typedef int (*reta_query_t)(struct rte_eth_dev *dev,\n+\t\t\t    struct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\t    uint16_t reta_size);\n+/**< @internal Query RSS redirection table on an Ethernet device */\n+\n+typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_eth_rss_conf *rss_conf);\n+/**< @internal Update RSS hash configuration of an Ethernet device */\n+\n+typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\t   struct rte_eth_rss_conf *rss_conf);\n+/**< @internal Get current RSS hash configuration of an Ethernet device */\n+\n+typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);\n+/**< @internal Turn on SW controllable LED on an Ethernet device */\n+\n+typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);\n+/**< @internal Turn off SW controllable LED on an Ethernet device */\n+\n+typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);\n+/**< @internal Remove MAC address from receive address register */\n+\n+typedef void (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct ether_addr *mac_addr,\n+\t\t\t\t  uint32_t index,\n+\t\t\t\t  uint32_t vmdq);\n+/**< @internal Set a MAC address into Receive Address Address Register */\n+\n+typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct ether_addr *mac_addr,\n+\t\t\t\t  uint8_t on);\n+/**< @internal Set a Unicast Hash bitmap */\n+\n+typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint8_t on);\n+/**< @internal Set all Unicast Hash bitmap */\n+\n+typedef int (*eth_set_vf_rx_mode_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint16_t vf,\n+\t\t\t\t  uint16_t rx_mode,\n+\t\t\t\t  uint8_t on);\n+/**< @internal Set a VF receive mode */\n+\n+typedef int (*eth_set_vf_rx_t)(struct rte_eth_dev *dev,\n+\t\t\t\tuint16_t vf,\n+\t\t\t\tuint8_t on);\n+/**< @internal Set a VF receive  mode */\n+\n+typedef int (*eth_set_vf_tx_t)(struct rte_eth_dev *dev,\n+\t\t\t\tuint16_t vf,\n+\t\t\t\tuint8_t on);\n+/**< @internal Enable or disable a VF transmit   */\n+\n+typedef int (*eth_set_vf_vlan_filter_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint16_t vlan,\n+\t\t\t\t  uint64_t vf_mask,\n+\t\t\t\t  uint8_t vlan_on);\n+/**< @internal Set VF VLAN pool filter */\n+\n+typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,\n+\t\t\t\tuint16_t queue_idx,\n+\t\t\t\tuint16_t tx_rate);\n+/**< @internal Set queue TX rate */\n+\n+typedef int (*eth_set_vf_rate_limit_t)(struct rte_eth_dev *dev,\n+\t\t\t\tuint16_t vf,\n+\t\t\t\tuint16_t tx_rate,\n+\t\t\t\tuint64_t q_msk);\n+/**< @internal Set VF TX rate */\n+\n+typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct rte_eth_vmdq_mirror_conf *mirror_conf,\n+\t\t\t\t  uint8_t rule_id,\n+\t\t\t\t  uint8_t on);\n+/**< @internal Add a traffic mirroring rule on an Ethernet device */\n+\n+typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  uint8_t rule_id);\n+/**< @internal Remove a traffic mirroring rule on an Ethernet device */\n+\n+typedef int (*eth_udp_tunnel_add_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Add tunneling UDP info */\n+\n+typedef int (*eth_udp_tunnel_del_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Delete tunneling UDP info */\n+\n+\n+#ifdef RTE_NIC_BYPASS\n+\n+enum {\n+\tRTE_BYPASS_MODE_NONE,\n+\tRTE_BYPASS_MODE_NORMAL,\n+\tRTE_BYPASS_MODE_BYPASS,\n+\tRTE_BYPASS_MODE_ISOLATE,\n+\tRTE_BYPASS_MODE_NUM,\n+};\n+\n+#define\tRTE_BYPASS_MODE_VALID(x)\t\\\n+\t((x) > RTE_BYPASS_MODE_NONE && (x) < RTE_BYPASS_MODE_NUM)\n+\n+enum {\n+\tRTE_BYPASS_EVENT_NONE,\n+\tRTE_BYPASS_EVENT_START,\n+\tRTE_BYPASS_EVENT_OS_ON = RTE_BYPASS_EVENT_START,\n+\tRTE_BYPASS_EVENT_POWER_ON,\n+\tRTE_BYPASS_EVENT_OS_OFF,\n+\tRTE_BYPASS_EVENT_POWER_OFF,\n+\tRTE_BYPASS_EVENT_TIMEOUT,\n+\tRTE_BYPASS_EVENT_NUM\n+};\n+\n+#define\tRTE_BYPASS_EVENT_VALID(x)\t\\\n+\t((x) > RTE_BYPASS_EVENT_NONE && (x) < RTE_BYPASS_MODE_NUM)\n+\n+enum {\n+\tRTE_BYPASS_TMT_OFF,     /* timeout disabled. */\n+\tRTE_BYPASS_TMT_1_5_SEC, /* timeout for 1.5 seconds */\n+\tRTE_BYPASS_TMT_2_SEC,   /* timeout for 2 seconds */\n+\tRTE_BYPASS_TMT_3_SEC,   /* timeout for 3 seconds */\n+\tRTE_BYPASS_TMT_4_SEC,   /* timeout for 4 seconds */\n+\tRTE_BYPASS_TMT_8_SEC,   /* timeout for 8 seconds */\n+\tRTE_BYPASS_TMT_16_SEC,  /* timeout for 16 seconds */\n+\tRTE_BYPASS_TMT_32_SEC,  /* timeout for 32 seconds */\n+\tRTE_BYPASS_TMT_NUM\n+};\n+\n+#define\tRTE_BYPASS_TMT_VALID(x)\t\\\n+\t((x) == RTE_BYPASS_TMT_OFF || \\\n+\t((x) > RTE_BYPASS_TMT_OFF && (x) < RTE_BYPASS_TMT_NUM))\n+\n+typedef void (*bypass_init_t)(struct rte_eth_dev *dev);\n+typedef int32_t (*bypass_state_set_t)(struct rte_eth_dev *dev, uint32_t *new_state);\n+typedef int32_t (*bypass_state_show_t)(struct rte_eth_dev *dev, uint32_t *state);\n+typedef int32_t (*bypass_event_set_t)(struct rte_eth_dev *dev, uint32_t state, uint32_t event);\n+typedef int32_t (*bypass_event_show_t)(struct rte_eth_dev *dev, uint32_t event_shift, uint32_t *event);\n+typedef int32_t (*bypass_wd_timeout_set_t)(struct rte_eth_dev *dev, uint32_t timeout);\n+typedef int32_t (*bypass_wd_timeout_show_t)(struct rte_eth_dev *dev, uint32_t *wd_timeout);\n+typedef int32_t (*bypass_ver_show_t)(struct rte_eth_dev *dev, uint32_t *ver);\n+typedef int32_t (*bypass_wd_reset_t)(struct rte_eth_dev *dev);\n+#endif\n+\n+typedef int (*eth_add_syn_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_syn_filter *filter, uint16_t rx_queue);\n+/**< @internal add syn filter rule on an Ethernet device */\n+\n+typedef int (*eth_remove_syn_filter_t)(struct rte_eth_dev *dev);\n+/**< @internal remove syn filter rule on an Ethernet device */\n+\n+typedef int (*eth_get_syn_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_syn_filter *filter, uint16_t *rx_queue);\n+/**< @internal Get syn filter rule on an Ethernet device */\n+\n+typedef int (*eth_add_2tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_2tuple_filter *filter,\n+\t\t\tuint16_t rx_queue);\n+/**< @internal Setup a new 2tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_remove_2tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index);\n+/**< @internal Remove a 2tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_get_2tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_2tuple_filter *filter,\n+\t\t\tuint16_t *rx_queue);\n+/**< @internal Get a 2tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_add_5tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_5tuple_filter *filter,\n+\t\t\tuint16_t rx_queue);\n+/**< @internal Setup a new 5tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_remove_5tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index);\n+/**< @internal Remove a 5tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_get_5tuple_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_5tuple_filter *filter,\n+\t\t\tuint16_t *rx_queue);\n+/**< @internal Get a 5tuple filter rule on an Ethernet device */\n+\n+typedef int (*eth_add_flex_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_flex_filter *filter,\n+\t\t\tuint16_t rx_queue);\n+/**< @internal Setup a new flex filter rule on an Ethernet device */\n+\n+typedef int (*eth_remove_flex_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index);\n+/**< @internal Remove a flex filter rule on an Ethernet device */\n+\n+typedef int (*eth_get_flex_filter_t)(struct rte_eth_dev *dev,\n+\t\t\tuint16_t index, struct rte_flex_filter *filter,\n+\t\t\tuint16_t *rx_queue);\n+/**< @internal Get a flex filter rule on an Ethernet device */\n+\n+typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,\n+\t\t\t\t enum rte_filter_type filter_type,\n+\t\t\t\t enum rte_filter_op filter_op,\n+\t\t\t\t void *arg);\n+/**< @internal Take operations to assigned filter type on an Ethernet device */\n+\n+/**\n+ * @internal A structure containing the functions exported by an Ethernet driver.\n+ */\n+struct eth_dev_ops {\n+\teth_dev_configure_t        dev_configure; /**< Configure device. */\n+\teth_dev_start_t            dev_start;     /**< Start device. */\n+\teth_dev_stop_t             dev_stop;      /**< Stop device. */\n+\teth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */\n+\teth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */\n+\teth_dev_close_t            dev_close;     /**< Close device. */\n+\teth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */\n+\teth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */\n+\teth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */\n+\teth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OF. */\n+\teth_link_update_t          link_update;   /**< Get device link state. */\n+\teth_stats_get_t            stats_get;     /**< Get generic device statistics. */\n+\teth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */\n+\teth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */\n+\teth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */\n+\teth_queue_stats_mapping_set_t queue_stats_mapping_set;\n+\t/**< Configure per queue stat counter mapping. */\n+\teth_dev_infos_get_t        dev_infos_get; /**< Get device info. */\n+\tmtu_set_t                  mtu_set; /**< Set MTU. */\n+\tvlan_filter_set_t          vlan_filter_set;  /**< Filter VLAN Setup. */\n+\tvlan_tpid_set_t            vlan_tpid_set;      /**< Outer VLAN TPID Setup. */\n+\tvlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */\n+\tvlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */\n+\tvlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion */\n+\teth_queue_start_t          rx_queue_start;/**< Start RX for a queue.*/\n+\teth_queue_stop_t           rx_queue_stop;/**< Stop RX for a queue.*/\n+\teth_queue_start_t          tx_queue_start;/**< Start TX for a queue.*/\n+\teth_queue_stop_t           tx_queue_stop;/**< Stop TX for a queue.*/\n+\teth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue.*/\n+\teth_queue_release_t        rx_queue_release;/**< Release RX queue.*/\n+\teth_rx_queue_count_t       rx_queue_count; /**< Get Rx queue count. */\n+\teth_rx_descriptor_done_t   rx_descriptor_done;  /**< Check rxd DD bit */\n+\teth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue.*/\n+\teth_queue_release_t        tx_queue_release;/**< Release TX queue.*/\n+\teth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */\n+\teth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */\n+\tflow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */\n+\tflow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */\n+\tpriority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control.*/\n+\teth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address */\n+\teth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address */\n+\teth_uc_hash_table_set_t    uc_hash_table_set;  /**< Set Unicast Table Array */\n+\teth_uc_all_hash_table_set_t uc_all_hash_table_set;  /**< Set Unicast hash bitmap */\n+\teth_mirror_rule_set_t\t   mirror_rule_set;  /**< Add a traffic mirror rule.*/\n+\teth_mirror_rule_reset_t\t   mirror_rule_reset;  /**< reset a traffic mirror rule.*/\n+\teth_set_vf_rx_mode_t       set_vf_rx_mode;   /**< Set VF RX mode */\n+\teth_set_vf_rx_t            set_vf_rx;  /**< enable/disable a VF receive */\n+\teth_set_vf_tx_t            set_vf_tx;  /**< enable/disable a VF transmit */\n+\teth_set_vf_vlan_filter_t   set_vf_vlan_filter;  /**< Set VF VLAN filter */\n+\teth_udp_tunnel_add_t       udp_tunnel_add;\n+\teth_udp_tunnel_del_t       udp_tunnel_del;\n+\teth_set_queue_rate_limit_t set_queue_rate_limit;   /**< Set queue rate limit */\n+\teth_set_vf_rate_limit_t    set_vf_rate_limit;   /**< Set VF rate limit */\n+\n+\t/** Add a signature filter. */\n+\tfdir_add_signature_filter_t fdir_add_signature_filter;\n+\t/** Update a signature filter. */\n+\tfdir_update_signature_filter_t fdir_update_signature_filter;\n+\t/** Remove a signature filter. */\n+\tfdir_remove_signature_filter_t fdir_remove_signature_filter;\n+\t/** Get information about FDIR status. */\n+\tfdir_infos_get_t fdir_infos_get;\n+\t/** Add a perfect filter. */\n+\tfdir_add_perfect_filter_t fdir_add_perfect_filter;\n+\t/** Update a perfect filter. */\n+\tfdir_update_perfect_filter_t fdir_update_perfect_filter;\n+\t/** Remove a perfect filter. */\n+\tfdir_remove_perfect_filter_t fdir_remove_perfect_filter;\n+\t/** Setup masks for FDIR filtering. */\n+\tfdir_set_masks_t fdir_set_masks;\n+\t/** Update redirection table. */\n+\treta_update_t reta_update;\n+\t/** Query redirection table. */\n+\treta_query_t reta_query;\n+  /* bypass control */\n+#ifdef RTE_NIC_BYPASS\n+  bypass_init_t bypass_init;\n+  bypass_state_set_t bypass_state_set;\n+  bypass_state_show_t bypass_state_show;\n+  bypass_event_set_t bypass_event_set;\n+  bypass_event_show_t bypass_event_show;\n+  bypass_wd_timeout_set_t bypass_wd_timeout_set;\n+  bypass_wd_timeout_show_t bypass_wd_timeout_show;\n+  bypass_ver_show_t bypass_ver_show;\n+  bypass_wd_reset_t bypass_wd_reset;\n+#endif\n+\n+\t/** Configure RSS hash protocols. */\n+\trss_hash_update_t rss_hash_update;\n+\t/** Get current RSS hash configuration. */\n+\trss_hash_conf_get_t rss_hash_conf_get;\n+\teth_add_syn_filter_t           add_syn_filter;       /**< add syn filter. */\n+\teth_remove_syn_filter_t        remove_syn_filter;    /**< remove syn filter. */\n+\teth_get_syn_filter_t           get_syn_filter;       /**< get syn filter. */\n+\teth_add_2tuple_filter_t        add_2tuple_filter;    /**< add 2tuple filter. */\n+\teth_remove_2tuple_filter_t     remove_2tuple_filter; /**< remove 2tuple filter. */\n+\teth_get_2tuple_filter_t        get_2tuple_filter;    /**< get 2tuple filter. */\n+\teth_add_5tuple_filter_t        add_5tuple_filter;    /**< add 5tuple filter. */\n+\teth_remove_5tuple_filter_t     remove_5tuple_filter; /**< remove 5tuple filter. */\n+\teth_get_5tuple_filter_t        get_5tuple_filter;    /**< get 5tuple filter. */\n+\teth_add_flex_filter_t          add_flex_filter;      /**< add flex filter. */\n+\teth_remove_flex_filter_t       remove_flex_filter;   /**< remove flex filter. */\n+\teth_get_flex_filter_t          get_flex_filter;      /**< get flex filter. */\n+\teth_filter_ctrl_t              filter_ctrl;          /**< common filter control*/\n+};\n+\n+/**\n+ * @internal\n+ * The generic data structure associated with each ethernet device.\n+ *\n+ * Pointers to burst-oriented packet receive and transmit functions are\n+ * located at the beginning of the structure, along with the pointer to\n+ * where all the data elements for the particular device are stored in shared\n+ * memory. This split allows the function pointer and driver data to be per-\n+ * process, while the actual configuration data for the device is shared.\n+ */\n+struct rte_eth_dev {\n+\teth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */\n+\teth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */\n+\tstruct rte_eth_dev_data *data;  /**< Pointer to device data */\n+\tconst struct eth_driver *driver;/**< Driver for this device */\n+\tstruct eth_dev_ops *dev_ops;    /**< Functions exported by PMD */\n+\tstruct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */\n+\tstruct rte_eth_dev_cb_list callbacks; /**< User application callbacks */\n+};\n+\n+struct rte_eth_dev_sriov {\n+\tuint8_t active;               /**< SRIOV is active with 16, 32 or 64 pools */\n+\tuint8_t nb_q_per_pool;        /**< rx queue number per pool */\n+\tuint16_t def_vmdq_idx;        /**< Default pool num used for PF */\n+\tuint16_t def_pool_q_idx;      /**< Default pool queue start reg index */\n+};\n+#define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)\n+\n+#define RTE_ETH_NAME_MAX_LEN (32)\n+\n+/**\n+ * @internal\n+ * The data part, with no function pointers, associated with each ethernet device.\n+ *\n+ * This structure is safe to place in shared memory to be common among different\n+ * processes in a multi-process configuration.\n+ */\n+struct rte_eth_dev_data {\n+\tchar name[RTE_ETH_NAME_MAX_LEN]; /**< Unique identifier name */\n+\n+\tvoid **rx_queues; /**< Array of pointers to RX queues. */\n+\tvoid **tx_queues; /**< Array of pointers to TX queues. */\n+\tuint16_t nb_rx_queues; /**< Number of RX queues. */\n+\tuint16_t nb_tx_queues; /**< Number of TX queues. */\n+\n+\tstruct rte_eth_dev_sriov sriov;    /**< SRIOV data */\n+\n+\tvoid *dev_private;              /**< PMD-specific private data */\n+\n+\tstruct rte_eth_link dev_link;\n+\t/**< Link-level information & status */\n+\n+\tstruct rte_eth_conf dev_conf;   /**< Configuration applied to device. */\n+\tuint16_t mtu;                   /**< Maximum Transmission Unit. */\n+\n+\tuint32_t min_rx_buf_size;\n+\t/**< Common rx buffer size handled by all queues */\n+\n+\tuint64_t rx_mbuf_alloc_failed; /**< RX ring mbuf allocation failures. */\n+\tstruct ether_addr* mac_addrs;/**< Device Ethernet Link address. */\n+\tuint64_t mac_pool_sel[ETH_NUM_RECEIVE_MAC_ADDR];\n+\t/** bitmap array of associating Ethernet MAC addresses to pools */\n+\tstruct ether_addr* hash_mac_addrs;\n+\t/** Device Ethernet MAC addresses of hash filtering. */\n+\tuint16_t port_id;           /**< Device [external] port identifier. */\n+\tuint8_t promiscuous   : 1, /**< RX promiscuous mode ON(1) / OFF(0). */\n+\t\tscattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */\n+\t\tall_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */\n+\t\tdev_started : 1;   /**< Device state: STARTED(1) / STOPPED(0). */\n+};\n+\n+/**\n+ * @internal\n+ * The pool of *rte_eth_dev* structures. The size of the pool\n+ * is configured at compile-time in the <rte_ethdev.c> file.\n+ */\n+extern struct rte_eth_dev rte_eth_devices[];\n+\n+/**\n+ * Get the total number of Ethernet devices that have been successfully\n+ * initialized by the [matching] Ethernet driver during the PCI probing phase.\n+ * All devices whose port identifier is in the range\n+ * [0,  rte_eth_dev_count() - 1] can be operated on by network applications.\n+ *\n+ * @return\n+ *   - The total number of usable Ethernet devices.\n+ */\n+extern uint16_t rte_eth_dev_count(void);\n+\n+/**\n+ * Function for internal use by dummy drivers primarily, e.g. ring-based\n+ * driver.\n+ * Allocates a new ethdev slot for an ethernet device and returns the pointer\n+ * to that slot for the driver to use.\n+ *\n+ * @param\tname\tUnique identifier name for each Ethernet device\n+ * @return\n+ *   - Slot in the rte_dev_devices array for a new device;\n+ */\n+struct rte_eth_dev *rte_eth_dev_allocate(const char *name);\n+\n+struct eth_driver;\n+/**\n+ * @internal\n+ * Initialization function of an Ethernet driver invoked for each matching\n+ * Ethernet PCI device detected during the PCI probing phase.\n+ *\n+ * @param eth_drv\n+ *   The pointer to the [matching] Ethernet driver structure supplied by\n+ *   the PMD when it registered itself.\n+ * @param eth_dev\n+ *   The *eth_dev* pointer is the address of the *rte_eth_dev* structure\n+ *   associated with the matching device and which have been [automatically]\n+ *   allocated in the *rte_eth_devices* array.\n+ *   The *eth_dev* structure is supplied to the driver initialization function\n+ *   with the following fields already initialized:\n+ *\n+ *   - *pci_dev*: Holds the pointers to the *rte_pci_device* structure which\n+ *     contains the generic PCI information of the matching device.\n+ *\n+ *   - *dev_private*: Holds a pointer to the device private data structure.\n+ *\n+ *   - *mtu*: Contains the default Ethernet maximum frame length (1500).\n+ *\n+ *   - *port_id*: Contains the port index of the device (actually the index\n+ *     of the *eth_dev* structure in the *rte_eth_devices* array).\n+ *\n+ * @return\n+ *   - 0: Success, the device is properly initialized by the driver.\n+ *        In particular, the driver MUST have set up the *dev_ops* pointer\n+ *        of the *eth_dev* structure.\n+ *   - <0: Error code of the device initialization failure.\n+ */\n+typedef int (*eth_dev_init_t)(struct eth_driver  *eth_drv,\n+\t\t\t      struct rte_eth_dev *eth_dev);\n+\n+/**\n+ * @internal\n+ * The structure associated with a PMD Ethernet driver.\n+ *\n+ * Each Ethernet driver acts as a PCI driver and is represented by a generic\n+ * *eth_driver* structure that holds:\n+ *\n+ * - An *rte_pci_driver* structure (which must be the first field).\n+ *\n+ * - The *eth_dev_init* function invoked for each matching PCI device.\n+ *\n+ * - The size of the private data to allocate for each matching device.\n+ */\n+struct eth_driver {\n+\tstruct rte_pci_driver pci_drv;    /**< The PMD is also a PCI driver. */\n+\teth_dev_init_t eth_dev_init;      /**< Device init function. */\n+\tunsigned int dev_private_size;    /**< Size of device private data. */\n+};\n+\n+/**\n+ * @internal\n+ * A function invoked by the initialization function of an Ethernet driver\n+ * to simultaneously register itself as a PCI driver and as an Ethernet\n+ * Poll Mode Driver (PMD).\n+ *\n+ * @param eth_drv\n+ *   The pointer to the *eth_driver* structure associated with\n+ *   the Ethernet driver.\n+ */\n+extern void rte_eth_driver_register(struct eth_driver *eth_drv);\n+\n+/**\n+ * Configure an Ethernet device.\n+ * This function must be invoked first before any other function in the\n+ * Ethernet API. This function can also be re-invoked when a device is in the\n+ * stopped state.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device to configure.\n+ * @param nb_rx_queue\n+ *   The number of receive queues to set up for the Ethernet device.\n+ * @param nb_tx_queue\n+ *   The number of transmit queues to set up for the Ethernet device.\n+ * @param eth_conf\n+ *   The pointer to the configuration data to be used for the Ethernet device.\n+ *   The *rte_eth_conf* structure includes:\n+ *     -  the hardware offload features to activate, with dedicated fields for\n+ *        each statically configurable offload hardware feature provided by\n+ *        Ethernet devices, such as IP checksum or VLAN tag stripping for\n+ *        example.\n+ *     - the Receive Side Scaling (RSS) configuration when using multiple RX\n+ *         queues per port.\n+ *\n+ *   Embedding all configuration information in a single data structure\n+ *   is the more flexible method that allows the addition of new features\n+ *   without changing the syntax of the API.\n+ * @return\n+ *   - 0: Success, device configured.\n+ *   - <0: Error code returned by the driver configuration function.\n+ */\n+extern int rte_eth_dev_configure(uint16_t port_id,\n+\t\t\t\t uint16_t nb_rx_queue,\n+\t\t\t\t uint16_t nb_tx_queue,\n+\t\t\t\t const struct rte_eth_conf *eth_conf);\n+\n+/**\n+ * Allocate and set up a receive queue for an Ethernet device.\n+ *\n+ * The function allocates a contiguous block of memory for *nb_rx_desc*\n+ * receive descriptors from a memory zone associated with *socket_id*\n+ * and initializes each receive descriptor with a network buffer allocated\n+ * from the memory pool *mb_pool*.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rx_queue_id\n+ *   The index of the receive queue to set up.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param nb_rx_desc\n+ *   The number of receive descriptors to allocate for the receive ring.\n+ * @param socket_id\n+ *   The *socket_id* argument is the socket identifier in case of NUMA.\n+ *   The value can be *SOCKET_ID_ANY* if there is no NUMA constraint for\n+ *   the DMA memory allocated for the receive descriptors of the ring.\n+ * @param rx_conf\n+ *   The pointer to the configuration data to be used for the receive queue.\n+ *   NULL value is allowed, in which case default RX configuration\n+ *   will be used.\n+ *   The *rx_conf* structure contains an *rx_thresh* structure with the values\n+ *   of the Prefetch, Host, and Write-Back threshold registers of the receive\n+ *   ring.\n+ * @param mb_pool\n+ *   The pointer to the memory pool from which to allocate *rte_mbuf* network\n+ *   memory buffers to populate each descriptor of the receive ring.\n+ * @return\n+ *   - 0: Success, receive queue correctly set up.\n+ *   - -EINVAL: The size of network buffers which can be allocated from the\n+ *      memory pool does not fit the various buffer sizes allowed by the\n+ *      device controller.\n+ *   - -ENOMEM: Unable to allocate the receive ring descriptors or to\n+ *      allocate network memory buffers from the memory pool when\n+ *      initializing receive descriptors.\n+ */\n+extern int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n+\t\t\t\t  uint16_t nb_rx_desc, unsigned int socket_id,\n+\t\t\t\t  const struct rte_eth_rxconf *rx_conf,\n+\t\t\t\t  struct rte_mempool *mb_pool);\n+\n+/**\n+ * Allocate and set up a transmit queue for an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param tx_queue_id\n+ *   The index of the transmit queue to set up.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param nb_tx_desc\n+ *   The number of transmit descriptors to allocate for the transmit ring.\n+ * @param socket_id\n+ *   The *socket_id* argument is the socket identifier in case of NUMA.\n+ *   Its value can be *SOCKET_ID_ANY* if there is no NUMA constraint for\n+ *   the DMA memory allocated for the transmit descriptors of the ring.\n+ * @param tx_conf\n+ *   The pointer to the configuration data to be used for the transmit queue.\n+ *   NULL value is allowed, in which case default RX configuration\n+ *   will be used.\n+ *   The *tx_conf* structure contains the following data:\n+ *   - The *tx_thresh* structure with the values of the Prefetch, Host, and\n+ *     Write-Back threshold registers of the transmit ring.\n+ *     When setting Write-Back threshold to the value greater then zero,\n+ *     *tx_rs_thresh* value should be explicitly set to one.\n+ *   - The *tx_free_thresh* value indicates the [minimum] number of network\n+ *     buffers that must be pending in the transmit ring to trigger their\n+ *     [implicit] freeing by the driver transmit function.\n+ *   - The *tx_rs_thresh* value indicates the [minimum] number of transmit\n+ *     descriptors that must be pending in the transmit ring before setting the\n+ *     RS bit on a descriptor by the driver transmit function.\n+ *     The *tx_rs_thresh* value should be less or equal then\n+ *     *tx_free_thresh* value, and both of them should be less then\n+ *     *nb_tx_desc* - 3.\n+ *   - The *txq_flags* member contains flags to pass to the TX queue setup\n+ *     function to configure the behavior of the TX queue. This should be set\n+ *     to 0 if no special configuration is required.\n+ *\n+ *     Note that setting *tx_free_thresh* or *tx_rs_thresh* value to 0 forces\n+ *     the transmit function to use default values.\n+ * @return\n+ *   - 0: Success, the transmit queue is correctly set up.\n+ *   - -ENOMEM: Unable to allocate the transmit ring descriptors.\n+ */\n+extern int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n+\t\t\t\t  uint16_t nb_tx_desc, unsigned int socket_id,\n+\t\t\t\t  const struct rte_eth_txconf *tx_conf);\n+\n+/*\n+ * Return the NUMA socket to which an Ethernet device is connected\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @return\n+ *   The NUMA socket id to which the Ethernet device is connected or\n+ *   a default of zero if the socket could not be determined.\n+ *   -1 is returned is the port_id value is out of range.\n+ */\n+extern int rte_eth_dev_socket_id(uint16_t port_id);\n+\n+/*\n+ * Allocate mbuf from mempool, setup the DMA physical address\n+ * and then start RX for specified queue of a port. It is used\n+ * when rx_deferred_start flag of the specified queue is true.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @param rx_queue_id\n+ *   The index of the rx queue to update the ring.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - 0: Success, the transmit queue is correctly set up.\n+ *   - -EINVAL: The port_id or the queue_id out of range.\n+ *   - -ENOTSUP: The function not supported in PMD driver.\n+ */\n+extern int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);\n+\n+/*\n+ * Stop specified RX queue of a port\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @param rx_queue_id\n+ *   The index of the rx queue to update the ring.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - 0: Success, the transmit queue is correctly set up.\n+ *   - -EINVAL: The port_id or the queue_id out of range.\n+ *   - -ENOTSUP: The function not supported in PMD driver.\n+ */\n+extern int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);\n+\n+/*\n+ * Start TX for specified queue of a port. It is used when tx_deferred_start\n+ * flag of the specified queue is true.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @param tx_queue_id\n+ *   The index of the tx queue to update the ring.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - 0: Success, the transmit queue is correctly set up.\n+ *   - -EINVAL: The port_id or the queue_id out of range.\n+ *   - -ENOTSUP: The function not supported in PMD driver.\n+ */\n+extern int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);\n+\n+/*\n+ * Stop specified TX queue of a port\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @param tx_queue_id\n+ *   The index of the tx queue to update the ring.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - 0: Success, the transmit queue is correctly set up.\n+ *   - -EINVAL: The port_id or the queue_id out of range.\n+ *   - -ENOTSUP: The function not supported in PMD driver.\n+ */\n+extern int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);\n+\n+\n+\n+/**\n+ * Start an Ethernet device.\n+ *\n+ * The device start step is the last one and consists of setting the configured\n+ * offload features and in starting the transmit and the receive units of the\n+ * device.\n+ * On success, all basic functions exported by the Ethernet API (link status,\n+ * receive/transmit, and so on) can be invoked.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - 0: Success, Ethernet device started.\n+ *   - <0: Error code of the driver device start function.\n+ */\n+extern int rte_eth_dev_start(uint16_t port_id);\n+\n+/**\n+ * Stop an Ethernet device. The device can be restarted with a call to\n+ * rte_eth_dev_start()\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_dev_stop(uint16_t port_id);\n+\n+\n+/**\n+ * Link up an Ethernet device.\n+ *\n+ * Set device link up will re-enable the device rx/tx\n+ * functionality after it is previously set device linked down.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - 0: Success, Ethernet device linked up.\n+ *   - <0: Error code of the driver device link up function.\n+ */\n+extern int rte_eth_dev_set_link_up(uint16_t port_id);\n+\n+/**\n+ * Link down an Ethernet device.\n+ * The device rx/tx functionality will be disabled if success,\n+ * and it can be re-enabled with a call to\n+ * rte_eth_dev_set_link_up()\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern int rte_eth_dev_set_link_down(uint16_t port_id);\n+\n+/**\n+ * Close an Ethernet device. The device cannot be restarted!\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_dev_close(uint16_t port_id);\n+\n+/**\n+ * Enable receipt in promiscuous mode for an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_promiscuous_enable(uint16_t port_id);\n+\n+/**\n+ * Disable receipt in promiscuous mode for an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_promiscuous_disable(uint16_t port_id);\n+\n+/**\n+ * Return the value of promiscuous mode for an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (1) if promiscuous is enabled\n+ *   - (0) if promiscuous is disabled.\n+ *   - (-1) on error\n+ */\n+extern int rte_eth_promiscuous_get(uint16_t port_id);\n+\n+/**\n+ * Enable the receipt of any multicast frame by an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_allmulticast_enable(uint16_t port_id);\n+\n+/**\n+ * Disable the receipt of all multicast frames by an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_allmulticast_disable(uint16_t port_id);\n+\n+/**\n+ * Return the value of allmulticast mode for an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (1) if allmulticast is enabled\n+ *   - (0) if allmulticast is disabled.\n+ *   - (-1) on error\n+ */\n+extern int rte_eth_allmulticast_get(uint16_t port_id);\n+\n+/**\n+ * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX\n+ * or FULL-DUPLEX) of the physical link of an Ethernet device. It might need\n+ * to wait up to 9 seconds in it.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param link\n+ *   A pointer to an *rte_eth_link* structure to be filled with\n+ *   the status, the speed and the mode of the Ethernet device link.\n+ */\n+extern void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);\n+\n+/**\n+ * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX\n+ * or FULL-DUPLEX) of the physical link of an Ethernet device. It is a no-wait\n+ * version of rte_eth_link_get().\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param link\n+ *   A pointer to an *rte_eth_link* structure to be filled with\n+ *   the status, the speed and the mode of the Ethernet device link.\n+ */\n+extern void rte_eth_link_get_nowait(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_link *link);\n+\n+/**\n+ * Retrieve the general I/O statistics of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param stats\n+ *   A pointer to a structure of type *rte_eth_stats* to be filled with\n+ *   the values of device counters for the following set of statistics:\n+ *   - *ipackets* with the total of successfully received packets.\n+ *   - *opackets* with the total of successfully transmitted packets.\n+ *   - *ibytes*   with the total of successfully received bytes.\n+ *   - *obytes*   with the total of successfully transmitted bytes.\n+ *   - *ierrors*  with the total of erroneous received packets.\n+ *   - *oerrors*  with the total of failed transmitted packets.\n+ */\n+extern void rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);\n+\n+/**\n+ * Reset the general I/O statistics of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_stats_reset(uint16_t port_id);\n+\n+/**\n+ * Retrieve extended statistics of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param xstats\n+ *   A pointer to a table of structure of type *rte_eth_xstats*\n+ *   to be filled with device statistics names and values.\n+ *   This parameter can be set to NULL if n is 0.\n+ * @param n\n+ *   The size of the stats table, which should be large enough to store\n+ *   all the statistics of the device.\n+ * @return\n+ *   - positive value lower or equal to n: success. The return value\n+ *     is the number of entries filled in the stats table.\n+ *   - positive value higher than n: error, the given statistics table\n+ *     is too small. The return value corresponds to the size that should\n+ *     be given to succeed. The entries in the table are not valid and\n+ *     shall not be used by the caller.\n+ *   - negative value on error (invalid port id)\n+ */\n+extern int rte_eth_xstats_get(uint16_t port_id,\n+\tstruct rte_eth_xstats *xstats, unsigned n);\n+\n+/**\n+ * Reset extended statistics of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ */\n+extern void rte_eth_xstats_reset(uint16_t port_id);\n+\n+/**\n+ *  Set a mapping for the specified transmit queue to the specified per-queue\n+ *  statistics counter.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param tx_queue_id\n+ *   The index of the transmit queue for which a queue stats mapping is required.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param stat_idx\n+ *   The per-queue packet statistics functionality number that the transmit\n+ *   queue is to be assigned.\n+ *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].\n+ * @return\n+ *   Zero if successful. Non-zero otherwise.\n+ */\n+extern int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,\n+\t\t\t\t\t\t  uint16_t tx_queue_id,\n+\t\t\t\t\t\t  uint8_t stat_idx);\n+\n+/**\n+ *  Set a mapping for the specified receive queue to the specified per-queue\n+ *  statistics counter.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rx_queue_id\n+ *   The index of the receive queue for which a queue stats mapping is required.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param stat_idx\n+ *   The per-queue packet statistics functionality number that the receive\n+ *   queue is to be assigned.\n+ *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].\n+ * @return\n+ *   Zero if successful. Non-zero otherwise.\n+ */\n+extern int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,\n+\t\t\t\t\t\t  uint16_t rx_queue_id,\n+\t\t\t\t\t\t  uint8_t stat_idx);\n+\n+/**\n+ * Retrieve the Ethernet address of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param mac_addr\n+ *   A pointer to a structure of type *ether_addr* to be filled with\n+ *   the Ethernet address of the Ethernet device.\n+ */\n+extern void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr);\n+\n+/**\n+ * Retrieve the contextual information of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param dev_info\n+ *   A pointer to a structure of type *rte_eth_dev_info* to be filled with\n+ *   the contextual information of the Ethernet device.\n+ */\n+extern void rte_eth_dev_info_get(uint16_t port_id,\n+\t\t\t\t struct rte_eth_dev_info *dev_info);\n+\n+/**\n+ * Retrieve the MTU of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param mtu\n+ *   A pointer to a uint16_t where the retrieved MTU is to be stored.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+extern int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);\n+\n+/**\n+ * Change the MTU of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param mtu\n+ *   A uint16_t for the MTU to be applied.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if operation is not supported.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if *mtu* invalid.\n+ */\n+extern int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);\n+\n+/**\n+ * Enable/Disable hardware filtering by an Ethernet device of received\n+ * VLAN packets tagged with a given VLAN Tag Identifier.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param vlan_id\n+ *   The VLAN Tag Identifier whose filtering must be enabled or disabled.\n+ * @param on\n+ *   If > 0, enable VLAN filtering of VLAN packets tagged with *vlan_id*.\n+ *   Otherwise, disable VLAN filtering of VLAN packets tagged with *vlan_id*.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if VLAN filtering on *port_id* disabled.\n+ *   - (-EINVAL) if *vlan_id* > 4095.\n+ */\n+extern int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id , int on);\n+\n+/**\n+ * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.\n+ * 82599/X540/X550 can support VLAN stripping at the rx queue level\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rx_queue_id\n+ *   The index of the receive queue for which a queue stats mapping is required.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param on\n+ *   If 1, Enable VLAN Stripping of the receive queue of the Ethernet port.\n+ *   If 0, Disable VLAN Stripping of the receive queue of the Ethernet port.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOSUP) if hardware-assisted VLAN stripping not configured.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if *rx_queue_id* invalid.\n+ */\n+extern int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id,\n+\t\tuint16_t rx_queue_id, int on);\n+\n+/**\n+ * Set the Outer VLAN Ether Type by an Ethernet device, it can be inserted to\n+ * the VLAN Header. This is a register setup available on some Intel NIC, not\n+ * but all, please check the data sheet for availability.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param tag_type\n+ *   The Tag Protocol ID\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOSUP) if hardware-assisted VLAN TPID setup is not supported.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+extern int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, uint16_t tag_type);\n+\n+/**\n+ * Set VLAN offload configuration on an Ethernet device\n+ * Enable/Disable Extended VLAN by an Ethernet device, This is a register setup\n+ * available on some Intel NIC, not but all, please check the data sheet for\n+ * availability.\n+ * Enable/Disable VLAN Strip can be done on rx queue for certain NIC, but here\n+ * the configuration is applied on the port level.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param offload_mask\n+ *   The VLAN Offload bit mask can be mixed use with \"OR\"\n+ *       ETH_VLAN_STRIP_OFFLOAD\n+ *       ETH_VLAN_FILTER_OFFLOAD\n+ *       ETH_VLAN_EXTEND_OFFLOAD\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+extern int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);\n+\n+/**\n+ * Read VLAN Offload configuration from an Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (>0) if successful. Bit mask to indicate\n+ *       ETH_VLAN_STRIP_OFFLOAD\n+ *       ETH_VLAN_FILTER_OFFLOAD\n+ *       ETH_VLAN_EXTEND_OFFLOAD\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+extern int rte_eth_dev_get_vlan_offload(uint16_t port_id);\n+\n+/**\n+ * Set port based TX VLAN insersion on or off.\n+ *\n+ * @param port_id\n+ *  The port identifier of the Ethernet device.\n+ * @param pvid\n+ *  Port based TX VLAN identifier togeth with user priority.\n+ * @param on\n+ *  Turn on or off the port based TX VLAN insertion.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - negative if failed.\n+ */\n+extern int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);\n+\n+/**\n+ *\n+ * Retrieve a burst of input packets from a receive queue of an Ethernet\n+ * device. The retrieved packets are stored in *rte_mbuf* structures whose\n+ * pointers are supplied in the *rx_pkts* array.\n+ *\n+ * The rte_eth_rx_burst() function loops, parsing the RX ring of the\n+ * receive queue, up to *nb_pkts* packets, and for each completed RX\n+ * descriptor in the ring, it performs the following operations:\n+ *\n+ * - Initialize the *rte_mbuf* data structure associated with the\n+ *   RX descriptor according to the information provided by the NIC into\n+ *   that RX descriptor.\n+ *\n+ * - Store the *rte_mbuf* data structure into the next entry of the\n+ *   *rx_pkts* array.\n+ *\n+ * - Replenish the RX descriptor with a new *rte_mbuf* buffer\n+ *   allocated from the memory pool associated with the receive queue at\n+ *   initialization time.\n+ *\n+ * When retrieving an input packet that was scattered by the controller\n+ * into multiple receive descriptors, the rte_eth_rx_burst() function\n+ * appends the associated *rte_mbuf* buffers to the first buffer of the\n+ * packet.\n+ *\n+ * The rte_eth_rx_burst() function returns the number of packets\n+ * actually retrieved, which is the number of *rte_mbuf* data structures\n+ * effectively supplied into the *rx_pkts* array.\n+ * A return value equal to *nb_pkts* indicates that the RX queue contained\n+ * at least *rx_pkts* packets, and this is likely to signify that other\n+ * received packets remain in the input queue. Applications implementing\n+ * a \"retrieve as much received packets as possible\" policy can check this\n+ * specific case and keep invoking the rte_eth_rx_burst() function until\n+ * a value less than *nb_pkts* is returned.\n+ *\n+ * This receive method has the following advantages:\n+ *\n+ * - It allows a run-to-completion network stack engine to retrieve and\n+ *   to immediately process received packets in a fast burst-oriented\n+ *   approach, avoiding the overhead of unnecessary intermediate packet\n+ *   queue/dequeue operations.\n+ *\n+ * - Conversely, it also allows an asynchronous-oriented processing\n+ *   method to retrieve bursts of received packets and to immediately\n+ *   queue them for further parallel processing by another logical core,\n+ *   for instance. However, instead of having received packets being\n+ *   individually queued by the driver, this approach allows the invoker\n+ *   of the rte_eth_rx_burst() function to queue a burst of retrieved\n+ *   packets at a time and therefore dramatically reduce the cost of\n+ *   enqueue/dequeue operations per packet.\n+ *\n+ * - It allows the rte_eth_rx_burst() function of the driver to take\n+ *   advantage of burst-oriented hardware features (CPU cache,\n+ *   prefetch instructions, and so on) to minimize the number of CPU\n+ *   cycles per packet.\n+ *\n+ * To summarize, the proposed receive API enables many\n+ * burst-oriented optimizations in both synchronous and asynchronous\n+ * packet processing environments with no overhead in both cases.\n+ *\n+ * The rte_eth_rx_burst() function does not provide any error\n+ * notification to avoid the corresponding overhead. As a hint, the\n+ * upper-level application might check the status of the device link once\n+ * being systematically returned a 0 value for a given number of tries.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The index of the receive queue from which to retrieve input packets.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param rx_pkts\n+ *   The address of an array of pointers to *rte_mbuf* structures that\n+ *   must be large enough to store *nb_pkts* pointers in it.\n+ * @param nb_pkts\n+ *   The maximum number of packets to retrieve.\n+ * @return\n+ *   The number of packets actually retrieved, which is the number\n+ *   of pointers to *rte_mbuf* structures effectively supplied to the\n+ *   *rx_pkts* array.\n+ */\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+extern uint16_t rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n+\t\t\t\t struct rte_mbuf **rx_pkts, uint16_t nb_pkts);\n+#else\n+static inline uint16_t\n+rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n+\t\t struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tdev = &rte_eth_devices[port_id];\n+\treturn (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id], rx_pkts, nb_pkts);\n+}\n+#endif\n+\n+/**\n+ * Get the number of used descriptors in a specific queue\n+ *\n+ * @param port_id\n+ *  The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *  The queue id on the specific port.\n+ * @return\n+ *  The number of used descriptors in the specific queue.\n+ */\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+extern uint32_t rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id);\n+#else\n+static inline uint32_t\n+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n+{\n+        struct rte_eth_dev *dev;\n+\n+        dev = &rte_eth_devices[port_id];\n+        return (*dev->dev_ops->rx_queue_count)(dev, queue_id);\n+}\n+#endif\n+\n+/**\n+ * Check if the DD bit of the specific RX descriptor in the queue has been set\n+ *\n+ * @param port_id\n+ *  The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *  The queue id on the specific port.\n+ * @offset\n+ *  The offset of the descriptor ID from tail.\n+ * @return\n+ *  - (1) if the specific DD bit is set.\n+ *  - (0) if the specific DD bit is not set.\n+ *  - (-ENODEV) if *port_id* invalid.\n+ */\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+extern int rte_eth_rx_descriptor_done(uint16_t port_id,\n+\t\t\t\t      uint16_t queue_id,\n+\t\t\t\t      uint16_t offset);\n+#else\n+static inline int\n+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tdev = &rte_eth_devices[port_id];\n+\treturn (*dev->dev_ops->rx_descriptor_done)( \\\n+\t\tdev->data->rx_queues[queue_id], offset);\n+}\n+#endif\n+\n+/**\n+ * Send a burst of output packets on a transmit queue of an Ethernet device.\n+ *\n+ * The rte_eth_tx_burst() function is invoked to transmit output packets\n+ * on the output queue *queue_id* of the Ethernet device designated by its\n+ * *port_id*.\n+ * The *nb_pkts* parameter is the number of packets to send which are\n+ * supplied in the *tx_pkts* array of *rte_mbuf* structures.\n+ * The rte_eth_tx_burst() function loops, sending *nb_pkts* packets,\n+ * up to the number of transmit descriptors available in the TX ring of the\n+ * transmit queue.\n+ * For each packet to send, the rte_eth_tx_burst() function performs\n+ * the following operations:\n+ *\n+ * - Pick up the next available descriptor in the transmit ring.\n+ *\n+ * - Free the network buffer previously sent with that descriptor, if any.\n+ *\n+ * - Initialize the transmit descriptor with the information provided\n+ *   in the *rte_mbuf data structure.\n+ *\n+ * In the case of a segmented packet composed of a list of *rte_mbuf* buffers,\n+ * the rte_eth_tx_burst() function uses several transmit descriptors\n+ * of the ring.\n+ *\n+ * The rte_eth_tx_burst() function returns the number of packets it\n+ * actually sent. A return value equal to *nb_pkts* means that all packets\n+ * have been sent, and this is likely to signify that other output packets\n+ * could be immediately transmitted again. Applications that implement a\n+ * \"send as many packets to transmit as possible\" policy can check this\n+ * specific case and keep invoking the rte_eth_tx_burst() function until\n+ * a value less than *nb_pkts* is returned.\n+ *\n+ * It is the responsibility of the rte_eth_tx_burst() function to\n+ * transparently free the memory buffers of packets previously sent.\n+ * This feature is driven by the *tx_free_thresh* value supplied to the\n+ * rte_eth_dev_configure() function at device configuration time.\n+ * When the number of previously sent packets reached the \"minimum transmit\n+ * packets to free\" threshold, the rte_eth_tx_burst() function must\n+ * [attempt to] free the *rte_mbuf*  buffers of those packets whose\n+ * transmission was effectively completed.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The index of the transmit queue through which output packets must be\n+ *   sent.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param tx_pkts\n+ *   The address of an array of *nb_pkts* pointers to *rte_mbuf* structures\n+ *   which contain the output packets.\n+ * @param nb_pkts\n+ *   The maximum number of packets to transmit.\n+ * @return\n+ *   The number of output packets actually stored in transmit descriptors of\n+ *   the transmit ring. The return value can be less than the value of the\n+ *   *tx_pkts* parameter when the transmit ring is full or has been filled up.\n+ */\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+extern uint16_t rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\n+\t\t\t\t struct rte_mbuf **tx_pkts, uint16_t nb_pkts);\n+#else\n+static inline uint16_t\n+rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\n+\t\t struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tdev = &rte_eth_devices[port_id];\n+\treturn (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);\n+}\n+#endif\n+\n+/**\n+ * Setup a new signature filter rule on an Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_filter\n+ *   The pointer to the fdir filter structure describing the signature filter\n+ *   rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   signature filter defined in fdir_filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the FDIR mode is not configured in signature mode\n+ *               on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_add_signature_filter(uint16_t port_id,\n+\t\t\t\t\t  struct rte_fdir_filter *fdir_filter,\n+\t\t\t\t\t  uint8_t rx_queue);\n+\n+/**\n+ * Update a signature filter rule on an Ethernet device.\n+ * If the rule doesn't exits, it is created.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_ftr\n+ *   The pointer to the structure describing the signature filter rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   signature filter defined in fdir_ftr.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in signature mode\n+ *     on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_update_signature_filter(uint16_t port_id,\n+\t\t\t\t\t     struct rte_fdir_filter *fdir_ftr,\n+\t\t\t\t\t     uint8_t rx_queue);\n+\n+/**\n+ * Remove a signature filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_ftr\n+ *   The pointer to the structure describing the signature filter rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in signature mode\n+ *     on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_remove_signature_filter(uint16_t port_id,\n+\t\t\t\t\t     struct rte_fdir_filter *fdir_ftr);\n+\n+/**\n+ * Retrieve the flow director information of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir\n+ *   A pointer to a structure of type *rte_eth_dev_fdir* to be filled with\n+ *   the flow director information of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured on *port_id*.\n+ */\n+int rte_eth_dev_fdir_get_infos(uint16_t port_id, struct rte_eth_fdir *fdir);\n+\n+/**\n+ * Add a new perfect filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_filter\n+ *   The pointer to the structure describing the perfect filter rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ *   IPv6 are not supported.\n+ * @param soft_id\n+ *    The 16-bit value supplied in the field hash.fdir.id of mbuf for RX\n+ *    packets matching the perfect filter.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   perfect filter defined in fdir_filter.\n+ * @param drop\n+ *    If drop is set to 1, matching RX packets are stored into the RX drop\n+ *    queue defined in the rte_fdir_conf.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in perfect mode\n+ *               on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_add_perfect_filter(uint16_t port_id,\n+\t\t\t\t\tstruct rte_fdir_filter *fdir_filter,\n+\t\t\t\t\tuint16_t soft_id, uint8_t rx_queue,\n+\t\t\t\t\tuint8_t drop);\n+\n+/**\n+ * Update a perfect filter rule on an Ethernet device.\n+ * If the rule doesn't exits, it is created.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_filter\n+ *   The pointer to the structure describing the perfect filter rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ *   IPv6 are not supported.\n+ * @param soft_id\n+ *    The 16-bit value supplied in the field hash.fdir.id of mbuf for RX\n+ *    packets matching the perfect filter.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   perfect filter defined in fdir_filter.\n+ * @param drop\n+ *    If drop is set to 1, matching RX packets are stored into the RX drop\n+ *    queue defined in the rte_fdir_conf.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in perfect mode\n+ *      on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_update_perfect_filter(uint16_t port_id,\n+\t\t\t\t\t   struct rte_fdir_filter *fdir_filter,\n+\t\t\t\t\t   uint16_t soft_id, uint8_t rx_queue,\n+\t\t\t\t\t   uint8_t drop);\n+\n+/**\n+ * Remove a perfect filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_filter\n+ *   The pointer to the structure describing the perfect filter rule.\n+ *   The *rte_fdir_filter* structure includes the values of the different fields\n+ *   to match: source and destination IP addresses, vlan id, flexbytes, source\n+ *   and destination ports, and so on.\n+ *   IPv6 are not supported.\n+ * @param soft_id\n+ *    The soft_id value provided when adding/updating the removed filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in perfect mode\n+ *      on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct.\n+ */\n+int rte_eth_dev_fdir_remove_perfect_filter(uint16_t port_id,\n+\t\t\t\t\t   struct rte_fdir_filter *fdir_filter,\n+\t\t\t\t\t   uint16_t soft_id);\n+/**\n+ * Configure globally the masks for flow director mode for an Ethernet device.\n+ * For example, the device can match packets with only the first 24 bits of\n+ * the IPv4 source address.\n+ *\n+ * The following fields can be masked: IPv4 addresses and L4 port numbers.\n+ * The following fields can be either enabled or disabled completely for the\n+ * matching functionality: VLAN ID tag; VLAN Priority + CFI bit; Flexible 2-byte\n+ * tuple.\n+ * IPv6 masks are not supported.\n+ *\n+ * All filters must comply with the masks previously configured.\n+ * For example, with a mask equal to 255.255.255.0 for the source IPv4 address,\n+ * all IPv4 filters must be created with a source IPv4 address that fits the\n+ * \"X.X.X.0\" format.\n+ *\n+ * This function flushes all filters that have been previously added in\n+ * the device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fdir_mask\n+ *   The pointer to the fdir mask structure describing relevant headers fields\n+ *   and relevant bits to use when matching packets addresses and ports.\n+ *   IPv6 masks are not supported.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow director mode.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-ENOSYS) if the flow director mode is not configured in perfect\n+ *      mode on *port_id*.\n+ *   - (-EINVAL) if the fdir_filter information is not correct\n+ */\n+int rte_eth_dev_fdir_set_masks(uint16_t port_id,\n+\t\t\t       struct rte_fdir_masks *fdir_mask);\n+\n+/**\n+ * The eth device event type for interrupt, and maybe others in the future.\n+ */\n+enum rte_eth_event_type {\n+\tRTE_ETH_EVENT_UNKNOWN,  /**< unknown event type */\n+\tRTE_ETH_EVENT_INTR_LSC, /**< lsc interrupt event */\n+\tRTE_ETH_EVENT_MAX       /**< max value of this enum */\n+};\n+\n+typedef void (*rte_eth_dev_cb_fn)(uint16_t port_id, \\\n+\t\tenum rte_eth_event_type event, void *cb_arg);\n+/**< user application callback to be registered for interrupts */\n+\n+\n+\n+/**\n+ * Register a callback function for specific port id.\n+ *\n+ * @param port_id\n+ *  Port id.\n+ * @param event\n+ *  Event interested.\n+ * @param cb_fn\n+ *  User supplied callback function to be called.\n+ * @param cb_arg\n+ *  Pointer to the parameters for the registered callback.\n+ *\n+ * @return\n+ *  - On success, zero.\n+ *  - On failure, a negative value.\n+ */\n+int rte_eth_dev_callback_register(uint16_t port_id,\n+\t\t\tenum rte_eth_event_type event,\n+\t\trte_eth_dev_cb_fn cb_fn, void *cb_arg);\n+\n+/**\n+ * Unregister a callback function for specific port id.\n+ *\n+ * @param port_id\n+ *  Port id.\n+ * @param event\n+ *  Event interested.\n+ * @param cb_fn\n+ *  User supplied callback function to be called.\n+ * @param cb_arg\n+ *  Pointer to the parameters for the registered callback. -1 means to\n+ *  remove all for the same callback address and same event.\n+ *\n+ * @return\n+ *  - On success, zero.\n+ *  - On failure, a negative value.\n+ */\n+int rte_eth_dev_callback_unregister(uint16_t port_id,\n+\t\t\tenum rte_eth_event_type event,\n+\t\trte_eth_dev_cb_fn cb_fn, void *cb_arg);\n+\n+/**\n+ * @internal Executes all the user application registered callbacks for\n+ * the specific device. It is for DPDK internal user only. User\n+ * application should not call it directly.\n+ *\n+ * @param dev\n+ *  Pointer to struct rte_eth_dev.\n+ * @param event\n+ *  Eth device interrupt event type.\n+ *\n+ * @return\n+ *  void\n+ */\n+void _rte_eth_dev_callback_process(struct rte_eth_dev *dev,\n+\t\t\t\tenum rte_eth_event_type event);\n+\n+/**\n+ * Turn on the LED on the Ethernet device.\n+ * This function turns on the LED on the Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if underlying hardware OR driver doesn't support\n+ *     that operation.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+int  rte_eth_led_on(uint16_t port_id);\n+\n+/**\n+ * Turn off the LED on the Ethernet device.\n+ * This function turns off the LED on the Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if underlying hardware OR driver doesn't support\n+ *     that operation.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+int  rte_eth_led_off(uint16_t port_id);\n+\n+/**\n+ * Get current status of the Ethernet link flow control for Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fc_conf\n+ *   The pointer to the structure where to store the flow control parameters.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow control.\n+ *   - (-ENODEV)  if *port_id* invalid.\n+ */\n+int rte_eth_dev_flow_ctrl_get(uint16_t port_id,\n+\t\t\t      struct rte_eth_fc_conf *fc_conf);\n+\n+/**\n+ * Configure the Ethernet link flow control for Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param fc_conf\n+ *   The pointer to the structure of the flow control parameters.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flow control mode.\n+ *   - (-ENODEV)  if *port_id* invalid.\n+ *   - (-EINVAL)  if bad parameter\n+ *   - (-EIO)     if flow control setup failure\n+ */\n+int rte_eth_dev_flow_ctrl_set(uint16_t port_id,\n+\t\t\t      struct rte_eth_fc_conf *fc_conf);\n+\n+/**\n+ * Configure the Ethernet priority flow control under DCB environment\n+ * for Ethernet device.\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param pfc_conf\n+ * The pointer to the structure of the priority flow control parameters.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support priority flow control mode.\n+ *   - (-ENODEV)  if *port_id* invalid.\n+ *   - (-EINVAL)  if bad parameter\n+ *   - (-EIO)     if flow control setup failure\n+ */\n+int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_pfc_conf *pfc_conf);\n+\n+/**\n+ * Add a MAC address to an internal array of addresses used to enable whitelist\n+ * filtering to accept packets only if the destination MAC address matches.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param mac_addr\n+ *   The MAC address to add.\n+ * @param pool\n+ *   VMDq pool index to associate address with (if VMDq is enabled). If VMDq is\n+ *   not enabled, this should be set to 0.\n+ * @return\n+ *   - (0) if successfully added or *mac_addr\" was already added.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port* is invalid.\n+ *   - (-ENOSPC) if no more MAC addresses can be added.\n+ *   - (-EINVAL) if MAC address is invalid.\n+ */\n+int rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *mac_addr,\n+\t\t\t\tuint32_t pool);\n+\n+/**\n+ * Remove a MAC address from the internal array of addresses.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param mac_addr\n+ *   MAC address to remove.\n+ * @return\n+ *   - (0) if successful, or *mac_addr* didn't exist.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EADDRINUSE) if attempting to remove the default MAC address\n+ */\n+int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *mac_addr);\n+\n+/**\n+ * Update Redirection Table(RETA) of Receive Side Scaling of Ethernet device.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param reta_conf\n+ *   RETA to update.\n+ * @param reta_size\n+ *   Redirection table size. The table size can be queried by\n+ *   rte_eth_dev_info_get().\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_rss_reta_update(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\t\tuint16_t reta_size);\n+\n+ /**\n+ * Query Redirection Table(RETA) of Receive Side Scaling of Ethernet device.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param reta_conf\n+ *   RETA to query.\n+ * @param reta_size\n+ *   Redirection table size. The table size can be queried by\n+ *   rte_eth_dev_info_get().\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_rss_reta_query(uint16_t port_id,\n+\t\t\t       struct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\t       uint16_t reta_size);\n+\n+ /**\n+ * Updates unicast hash table for receiving packet with the given destination\n+ * MAC address, and the packet is routed to all VFs for which the RX mode is\n+ * accept packets that match the unicast hash table.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param addr\n+ *   Unicast MAC address.\n+ * @param on\n+ *    1 - Set an unicast hash bit for receiving packets with the MAC address.\n+ *    0 - Clear an unicast hash bit.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+  *  - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_uc_hash_table_set(uint16_t port_id,struct ether_addr *addr,\n+\t\t\t\t\tuint8_t on);\n+\n+ /**\n+ * Updates all unicast hash bitmaps for receiving packet with any Unicast\n+ * Ethernet MAC addresses,the packet is routed to all VFs for which the RX\n+ * mode is accept packets that match the unicast hash table.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param on\n+ *    1 - Set all unicast hash bitmaps for receiving all the Ethernet\n+ *         MAC addresses\n+ *    0 - Clear all unicast hash bitmaps\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+  *  - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id,uint8_t on);\n+\n+ /**\n+ * Set RX L2 Filtering mode of a VF of an Ethernet device.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param vf\n+ *   VF id.\n+ * @param rx_mode\n+ *    The RX mode mask, which  is one or more of  accepting Untagged Packets,\n+ *    packets that match the PFUTA table, Broadcast and Multicast Promiscuous.\n+ *    ETH_VMDQ_ACCEPT_UNTAG,ETH_VMDQ_ACCEPT_HASH_UC,\n+ *    ETH_VMDQ_ACCEPT_BROADCAST and ETH_VMDQ_ACCEPT_MULTICAST will be used\n+ *    in rx_mode.\n+ * @param on\n+ *    1 - Enable a VF RX mode.\n+ *    0 - Disable a VF RX mode.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_set_vf_rxmode(uint16_t port_id, uint16_t vf, uint16_t rx_mode,\n+\t\t\t\tuint8_t on);\n+\n+/**\n+* Enable or disable a VF traffic transmit of the Ethernet device.\n+*\n+* @param port\n+*   The port identifier of the Ethernet device.\n+* @param vf\n+*   VF id.\n+* @param on\n+*    1 - Enable a VF traffic transmit.\n+*    0 - Disable a VF traffic transmit.\n+* @return\n+*   - (0) if successful.\n+*   - (-ENODEV) if *port_id* invalid.\n+*   - (-ENOTSUP) if hardware doesn't support.\n+*   - (-EINVAL) if bad parameter.\n+*/\n+int\n+rte_eth_dev_set_vf_tx(uint16_t port_id,uint16_t vf, uint8_t on);\n+\n+/**\n+* Enable or disable a VF traffic receive of an Ethernet device.\n+*\n+* @param port\n+*   The port identifier of the Ethernet device.\n+* @param vf\n+*   VF id.\n+* @param on\n+*    1 - Enable a VF traffic receive.\n+*    0 - Disable a VF traffic receive.\n+* @return\n+*   - (0) if successful.\n+*   - (-ENOTSUP) if hardware doesn't support.\n+*   - (-ENODEV) if *port_id* invalid.\n+*   - (-EINVAL) if bad parameter.\n+*/\n+int\n+rte_eth_dev_set_vf_rx(uint16_t port_id,uint16_t vf, uint8_t on);\n+\n+/**\n+* Enable/Disable hardware VF VLAN filtering by an Ethernet device of\n+* received VLAN packets tagged with a given VLAN Tag Identifier.\n+*\n+* @param port id\n+*   The port identifier of the Ethernet device.\n+* @param vlan_id\n+*   The VLAN Tag Identifier whose filtering must be enabled or disabled.\n+* @param vf_mask\n+*    Bitmap listing which VFs participate in the VLAN filtering.\n+* @param vlan_on\n+*    1 - Enable VFs VLAN filtering.\n+*    0 - Disable VFs VLAN filtering.\n+* @return\n+*   - (0) if successful.\n+*   - (-ENOTSUP) if hardware doesn't support.\n+*   - (-ENODEV) if *port_id* invalid.\n+*   - (-EINVAL) if bad parameter.\n+*/\n+int\n+rte_eth_dev_set_vf_vlan_filter(uint16_t port_id, uint16_t vlan_id,\n+\t\t\t\tuint64_t vf_mask,\n+\t\t\t\tuint8_t vlan_on);\n+\n+/**\n+ * Set a traffic mirroring rule on an Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param mirror_conf\n+ *   The pointer to the traffic mirroring structure describing the mirroring rule.\n+ *   The *rte_eth_vm_mirror_conf* structure includes the type of mirroring rule,\n+ *   destination pool and the value of rule if enable vlan or pool mirroring.\n+ *\n+ * @param rule_id\n+ *   The index of traffic mirroring rule, we support four separated rules.\n+ * @param on\n+ *   1 - Enable a mirroring rule.\n+ *   0 - Disable a mirroring rule.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the mr_conf information is not correct.\n+ */\n+int rte_eth_mirror_rule_set(uint16_t port_id,\n+\t\t\tstruct rte_eth_vmdq_mirror_conf *mirror_conf,\n+\t\t\tuint8_t rule_id,\n+\t\t\tuint8_t on);\n+\n+/**\n+ * Reset a traffic mirroring rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rule_id\n+ *   The index of traffic mirroring rule, we support four separated rules.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_mirror_rule_reset(uint16_t port_id,\n+\t\t\t\t\t uint8_t rule_id);\n+\n+/**\n+ * Set the rate limitation for a queue on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_idx\n+ *   The queue id.\n+ * @param tx_rate\n+ *   The tx rate allocated from the total link speed for this queue.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n+\t\t\tuint16_t tx_rate);\n+\n+/**\n+ * Set the rate limitation for a vf on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param vf\n+ *   VF id.\n+ * @param tx_rate\n+ *   The tx rate allocated from the total link speed for this VF id.\n+ * @param q_msk\n+ *   The queue mask which need to set the rate.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_set_vf_rate_limit(uint16_t port_id, uint16_t vf,\n+\t\t\tuint16_t tx_rate, uint64_t q_msk);\n+\n+/**\n+ * Initialize bypass logic. This function needs to be called before\n+ * executing any other bypass API.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_init(uint16_t port_id);\n+\n+/**\n+ * Return bypass state.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param state\n+ *   The return bypass state.\n+ *   - (1) Normal mode\n+ *   - (2) Bypass mode\n+ *   - (3) Isolate mode\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_state_show(uint16_t port_id, uint32_t *state);\n+\n+/**\n+ * Set bypass state\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param state\n+ *   The current bypass state.\n+ *   - (1) Normal mode\n+ *   - (2) Bypass mode\n+ *   - (3) Isolate mode\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_state_set(uint16_t port_id, uint32_t *new_state);\n+\n+/**\n+ * Return bypass state when given event occurs.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param event\n+ *   The bypass event\n+ *   - (1) Main power on (power button is pushed)\n+ *   - (2) Auxiliary power on (power supply is being plugged)\n+ *   - (3) Main power off (system shutdown and power supply is left plugged in)\n+ *   - (4) Auxiliary power off (power supply is being unplugged)\n+ *   - (5) Display or set the watchdog timer\n+ * @param state\n+ *   The bypass state when given event occurred.\n+ *   - (1) Normal mode\n+ *   - (2) Bypass mode\n+ *   - (3) Isolate mode\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_event_show(uint16_t port_id, uint32_t event, uint32_t *state);\n+\n+/**\n+ * Set bypass state when given event occurs.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param event\n+ *   The bypass event\n+ *   - (1) Main power on (power button is pushed)\n+ *   - (2) Auxiliary power on (power supply is being plugged)\n+ *   - (3) Main power off (system shutdown and power supply is left plugged in)\n+ *   - (4) Auxiliary power off (power supply is being unplugged)\n+ *   - (5) Display or set the watchdog timer\n+ * @param state\n+ *   The assigned state when given event occurs.\n+ *   - (1) Normal mode\n+ *   - (2) Bypass mode\n+ *   - (3) Isolate mode\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_event_store(uint16_t port_id, uint32_t event, uint32_t state);\n+\n+/**\n+ * Set bypass watchdog timeout count.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param state\n+ *   The timeout to be set.\n+ *   - (0) 0 seconds (timer is off)\n+ *   - (1) 1.5 seconds\n+ *   - (2) 2 seconds\n+ *   - (3) 3 seconds\n+ *   - (4) 4 seconds\n+ *   - (5) 8 seconds\n+ *   - (6) 16 seconds\n+ *   - (7) 32 seconds\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_wd_timeout_store(uint16_t port_id, uint32_t timeout);\n+\n+/**\n+ * Get bypass firmware version.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param ver\n+ *   The firmware version\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_ver_show(uint16_t port_id, uint32_t *ver);\n+\n+/**\n+ * Return bypass watchdog timeout in seconds\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param wd_timeout\n+ *   The return watchdog timeout. \"0\" represents timer expired\n+ *   - (0) 0 seconds (timer is off)\n+ *   - (1) 1.5 seconds\n+ *   - (2) 2 seconds\n+ *   - (3) 3 seconds\n+ *   - (4) 4 seconds\n+ *   - (5) 8 seconds\n+ *   - (6) 16 seconds\n+ *   - (7) 32 seconds\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_wd_timeout_show(uint16_t port_id, uint32_t *wd_timeout);\n+\n+/**\n+ * Reset bypass watchdog timer\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_bypass_wd_reset(uint16_t port_id);\n+\n+ /**\n+ * Configuration of Receive Side Scaling hash computation of Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rss_conf\n+ *   The new configuration to use for RSS hash computation on the port.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if port identifier is invalid.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_rss_hash_update(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_rss_conf *rss_conf);\n+\n+ /**\n+ * Retrieve current configuration of Receive Side Scaling hash computation\n+ * of Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rss_conf\n+ *   Where to store the current RSS hash configuration of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if port identifier is invalid.\n+ *   - (-ENOTSUP) if hardware doesn't support RSS.\n+ */\n+int\n+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,\n+\t\t\t      struct rte_eth_rss_conf *rss_conf);\n+\n+ /**\n+ * Add UDP tunneling port of an Ethernet device for filtering a specific\n+ * tunneling packet by UDP port number.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param tunnel_udp\n+ *   UDP tunneling configuration.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if port identifier is invalid.\n+ *   - (-ENOTSUP) if hardware doesn't support tunnel type.\n+ */\n+int\n+rte_eth_dev_udp_tunnel_add(uint16_t port_id,\n+\t\t\t   struct rte_eth_udp_tunnel *tunnel_udp);\n+\n+ /**\n+ * Detete UDP tunneling port configuration of Ethernet device\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param tunnel_udp\n+ *   UDP tunneling configuration.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if port identifier is invalid.\n+ *   - (-ENOTSUP) if hardware doesn't support tunnel type.\n+ */\n+int\n+rte_eth_dev_udp_tunnel_delete(uint16_t port_id,\n+\t\t\t      struct rte_eth_udp_tunnel *tunnel_udp);\n+\n+/**\n+ * add syn filter\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param rx_queue\n+ *   The index of RX queue where to store RX packets matching the syn filter.\n+ * @param filter\n+ *   The pointer to the structure describing the syn filter rule.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_add_syn_filter(uint16_t port_id,\n+\t\t\tstruct rte_syn_filter *filter, uint16_t rx_queue);\n+\n+/**\n+ * remove syn filter\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_remove_syn_filter(uint16_t port_id);\n+\n+/**\n+ * get syn filter\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param filter\n+ *   The pointer to the structure describing the syn filter.\n+ * @param rx_queue\n+ *   A pointer to get the queue index of syn filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_eth_dev_get_syn_filter(uint16_t port_id,\n+\t\t\tstruct rte_syn_filter *filter, uint16_t *rx_queue);\n+\n+/**\n+ * Add a new 2tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 2tuple filter.\n+ * @param filter\n+ *   The pointer to the structure describing the 2tuple filter rule.\n+ *   The *rte_2tuple_filter* structure includes the values of the different\n+ *   fields to match: protocol, dst_port and\n+ *   tcp_flags if the protocol is tcp type.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   2tuple filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 2tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_add_2tuple_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_2tuple_filter *filter, uint16_t rx_queue);\n+\n+/**\n+ * remove a 2tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 2tuple filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 2tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_remove_2tuple_filter(uint16_t port_id, uint16_t index);\n+\n+/**\n+ * Get an 2tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 2tuple filter.\n+ * @param filter\n+ *   A pointer to a structure of type *rte_2tuple_filter* to be filled with\n+ *   the information of the 2tuple filter.\n+ * @param rx_queue\n+ *   A pointer to get the queue index.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 2tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ *   - (-ENOENT) if no enabled filter in this index.\n+ */\n+int rte_eth_dev_get_2tuple_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_2tuple_filter *filter, uint16_t *rx_queue);\n+\n+/**\n+ * Add a new 5tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 5tuple filter.\n+ * @param filter\n+ *   The pointer to the structure describing the 5tuple filter rule.\n+ *   The *rte_5tuple_filter* structure includes the values of the different\n+ *   fields to match: dst src IP, dst src port, protocol and relative masks\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   5tuple filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 5tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_add_5tuple_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_5tuple_filter *filter, uint16_t rx_queue);\n+\n+/**\n+ * remove a 5tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 5tuple filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 5tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_remove_5tuple_filter(uint16_t port_id, uint16_t index);\n+\n+/**\n+ * Get an 5tuple filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of 5tuple filter.\n+ * @param filter\n+ *   A pointer to a structure of type *rte_5tuple_filter* to be filled with\n+ *   the information of the 5tuple filter.\n+ * @param rx_queue\n+ *   A pointer to get the queue index.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support 5tuple filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_get_5tuple_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_5tuple_filter *filter, uint16_t *rx_queue);\n+\n+/**\n+ * Add a new flex filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of flex filter.\n+ * @param filter\n+ *   The pointer to the structure describing the flex filter rule.\n+ *   The *rte_flex_filter* structure includes the values of the different fields\n+ *   to match: the dwords (first len bytes of packet ) and relative masks.\n+ * @param rx_queue\n+ *   The index of the RX queue where to store RX packets matching the added\n+ *   flex filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flex filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ *   - (-ENOENT) if no enabled filter in this index.\n+ */\n+int rte_eth_dev_add_flex_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_flex_filter *filter, uint16_t rx_queue);\n+\n+/**\n+ * remove a flex filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of flex filter.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flex filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ */\n+int rte_eth_dev_remove_flex_filter(uint16_t port_id, uint16_t index);\n+\n+/**\n+ * Get an flex filter rule on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param index\n+ *   The identifier of flex filter.\n+ * @param filter\n+ *   A pointer to a structure of type *rte_flex_filter* to be filled with\n+ *   the information of the flex filter.\n+ * @param rx_queue\n+ *   A pointer to get the queue index.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support flex filter.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if the filter information is not correct.\n+ *   - (-ENOENT) if no enabled filter in this index.\n+ */\n+int rte_eth_dev_get_flex_filter(uint16_t port_id, uint16_t index,\n+\t\t\tstruct rte_flex_filter *filter, uint16_t *rx_queue);\n+\n+/**\n+ * Check whether the filter type is supported on an Ethernet device.\n+ * All the supported filter types are defined in 'rte_eth_ctrl.h'.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param filter_type\n+ *   Filter type.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this filter type.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+int rte_eth_dev_filter_supported(uint16_t port_id, enum rte_filter_type filter_type);\n+\n+/**\n+ * Take operations to assigned filter type on an Ethernet device.\n+ * All the supported operations and filter types are defined in 'rte_eth_ctrl.h'.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param filter_type\n+ *   Filter type.\n+ * @param filter_op\n+ *   Type of operation.\n+ * @param arg\n+ *   A pointer to arguments defined specifically for the operation.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - others depends on the specific operations implementation.\n+ */\n+int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,\n+\t\t\tenum rte_filter_op filter_op, void *arg);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_ETHDEV_H_ */\n",
    "prefixes": [
        "dpdk-dev",
        "RFC"
    ]
}