get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 58874,
    "url": "https://patches.dpdk.org/api/patches/58874/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190906131813.1343-2-marcinx.a.zapolski@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190906131813.1343-2-marcinx.a.zapolski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190906131813.1343-2-marcinx.a.zapolski@intel.com",
    "date": "2019-09-06T13:18:11",
    "name": "[RFC,19.11,v2,1/3] ethdev: hide key ethdev structures from public API",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "96046e29eeabb04f1a96ac566a8004ae184877a8",
    "submitter": {
        "id": 1362,
        "url": "https://patches.dpdk.org/api/people/1362/?format=api",
        "name": "Marcin Zapolski",
        "email": "marcinx.a.zapolski@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190906131813.1343-2-marcinx.a.zapolski@intel.com/mbox/",
    "series": [
        {
            "id": 6305,
            "url": "https://patches.dpdk.org/api/series/6305/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6305",
            "date": "2019-09-06T13:18:11",
            "name": "[RFC,19.11,v2,1/3] ethdev: hide key ethdev structures from public API",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/6305/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/58874/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/58874/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0A4BB1F3F4;\n\tFri,  6 Sep 2019 15:22:02 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 998641F3EA\n\tfor <dev@dpdk.org>; Fri,  6 Sep 2019 15:21:59 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Sep 2019 06:21:59 -0700",
            "from marcinzx-mobl.ger.corp.intel.com ([10.103.104.109])\n\tby fmsmga001.fm.intel.com with ESMTP; 06 Sep 2019 06:21:57 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,473,1559545200\"; d=\"scan'208\";a=\"199518016\"",
        "From": "Marcin Zapolski <marcinx.a.zapolski@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Marcin Zapolski <marcinx.a.zapolski@intel.com>",
        "Date": "Fri,  6 Sep 2019 15:18:11 +0200",
        "Message-Id": "<20190906131813.1343-2-marcinx.a.zapolski@intel.com>",
        "X-Mailer": "git-send-email 2.22.0.windows.1",
        "In-Reply-To": "<20190730124950.1293-1-marcinx.a.zapolski@intel.com>",
        "References": "<20190730124950.1293-1-marcinx.a.zapolski@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures\n\tfrom public API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Split rte_eth_dev structure to two parts: head that is available for\nuser applications, and rest which is DPDK internal.\nMake an array of pointers to rte_eth_dev structures available for user\napplications.\n\nSigned-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>\n---\n lib/librte_bitratestats/rte_bitrate.c         |   2 +-\n lib/librte_bpf/bpf_pkt.c                      |   2 +-\n lib/librte_ethdev/ethdev_private.c            |   1 +\n lib/librte_ethdev/ethdev_profile.h            |   1 +\n lib/librte_ethdev/rte_ethdev.c                | 122 +++-\n lib/librte_ethdev/rte_ethdev.h                | 222 +++++---\n lib/librte_ethdev/rte_ethdev_core.h           | 531 +-----------------\n lib/librte_ethdev/rte_ethdev_driver.h         | 482 ++++++++++++++++\n lib/librte_ethdev/rte_ethdev_version.map      |  11 +\n lib/librte_ethdev/rte_flow.c                  |   2 +-\n lib/librte_ethdev/rte_mtr.c                   |   2 +-\n lib/librte_ethdev/rte_tm.c                    |   2 +-\n lib/librte_ethdev/rte_tm_driver.h             |   1 +\n .../rte_event_eth_rx_adapter.c                |   2 +-\n .../rte_event_eth_tx_adapter.c                |   2 +-\n lib/librte_eventdev/rte_eventdev.c            |   2 +-\n lib/librte_flow_classify/rte_flow_classify.h  |   2 +-\n .../rte_flow_classify_parse.h                 |   2 +-\n lib/librte_gro/gro_tcp4.c                     |   2 +-\n lib/librte_gro/gro_vxlan_tcp4.c               |   2 +-\n lib/librte_gro/rte_gro.c                      |   2 +-\n lib/librte_gso/rte_gso.c                      |   2 +-\n lib/librte_kni/rte_kni.c                      |   2 +-\n lib/librte_latencystats/rte_latencystats.c    |   2 +-\n lib/librte_pdump/rte_pdump.c                  |   2 +-\n lib/librte_port/rte_port_ethdev.c             |   2 +-\n lib/librte_telemetry/rte_telemetry.c          |   2 +-\n lib/librte_telemetry/rte_telemetry_parser.c   |   2 +-\n lib/librte_vhost/vhost.c                      |   2 +-\n 29 files changed, 760 insertions(+), 653 deletions(-)",
    "diff": "diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c\nindex 639e47547..82d469514 100644\n--- a/lib/librte_bitratestats/rte_bitrate.c\n+++ b/lib/librte_bitratestats/rte_bitrate.c\n@@ -3,7 +3,7 @@\n  */\n \n #include <rte_common.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_malloc.h>\n #include <rte_metrics.h>\n #include <rte_bitrate.h>\ndiff --git a/lib/librte_bpf/bpf_pkt.c b/lib/librte_bpf/bpf_pkt.c\nindex 6e8248f0d..f813d1e45 100644\n--- a/lib/librte_bpf/bpf_pkt.c\n+++ b/lib/librte_bpf/bpf_pkt.c\n@@ -26,7 +26,7 @@\n #include <rte_lcore.h>\n #include <rte_atomic.h>\n #include <rte_mbuf.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include <rte_bpf_ethdev.h>\n #include \"bpf_impl.h\"\ndiff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c\nindex 162a502fe..f183accc7 100644\n--- a/lib/librte_ethdev/ethdev_private.c\n+++ b/lib/librte_ethdev/ethdev_private.c\n@@ -3,6 +3,7 @@\n  */\n \n #include \"rte_ethdev.h\"\n+#include \"rte_ethdev_core.h\"\n #include \"rte_ethdev_driver.h\"\n #include \"ethdev_private.h\"\n \ndiff --git a/lib/librte_ethdev/ethdev_profile.h b/lib/librte_ethdev/ethdev_profile.h\nindex 65031e6f3..99edb96b0 100644\n--- a/lib/librte_ethdev/ethdev_profile.h\n+++ b/lib/librte_ethdev/ethdev_profile.h\n@@ -6,6 +6,7 @@\n #define _RTE_ETHDEV_PROFILE_H_\n \n #include \"rte_ethdev.h\"\n+#include \"rte_ethdev_core.h\"\n \n /**\n  * Initialization of the Ethernet device profiling.\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 17d183e1f..5c6cc640a 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -40,6 +40,7 @@\n \n #include \"rte_ether.h\"\n #include \"rte_ethdev.h\"\n+#include \"rte_ethdev_core.h\"\n #include \"rte_ethdev_driver.h\"\n #include \"ethdev_profile.h\"\n #include \"ethdev_private.h\"\n@@ -48,6 +49,16 @@ int rte_eth_dev_logtype;\n \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+struct rte_eth_dev_fcns *rte_eth_dev_functions[RTE_MAX_ETHPORTS];\n+\n+RTE_INIT(rte_eth_dev_init)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < RTE_MAX_ETHPORTS; i++)\n+\t\trte_eth_dev_functions[i] =\n+\t\t\t(struct rte_eth_dev_fcns *)(&rte_eth_devices[i]);\n+}\n \n /* spinlock for eth device callbacks */\n static rte_spinlock_t rte_eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER;\n@@ -581,6 +592,22 @@ rte_eth_dev_is_valid_port(uint16_t port_id)\n \t\treturn 1;\n }\n \n+int\n+rte_eth_dev_is_valid_rx_queue_id(uint16_t port_id, uint16_t queue_id)\n+{\n+\tif (queue_id >= rte_eth_devices[port_id].data->nb_rx_queues)\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n+int\n+rte_eth_dev_is_valid_tx_queue_id(uint16_t port_id, uint16_t queue_id)\n+{\n+\tif (queue_id >= rte_eth_devices[port_id].data->nb_tx_queues)\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n static int\n rte_eth_is_valid_owner_id(uint64_t owner_id)\n {\n@@ -3405,7 +3432,7 @@ RTE_INIT(eth_dev_init_cb_lists)\n \tint i;\n \n \tfor (i = 0; i < RTE_MAX_ETHPORTS; i++)\n-\t\tTAILQ_INIT(&rte_eth_devices[i].link_intr_cbs);\n+\t\tTAILQ_INIT(&rte_eth_devices[i].fcns.link_intr_cbs);\n }\n \n int\n@@ -3438,7 +3465,7 @@ rte_eth_dev_callback_register(uint16_t port_id,\n \tdo {\n \t\tdev = &rte_eth_devices[next_port];\n \n-\t\tTAILQ_FOREACH(user_cb, &(dev->link_intr_cbs), next) {\n+\t\tTAILQ_FOREACH(user_cb, &(dev->fcns.link_intr_cbs), next) {\n \t\t\tif (user_cb->cb_fn == cb_fn &&\n \t\t\t\tuser_cb->cb_arg == cb_arg &&\n \t\t\t\tuser_cb->event == event) {\n@@ -3454,7 +3481,7 @@ rte_eth_dev_callback_register(uint16_t port_id,\n \t\t\t\tuser_cb->cb_fn = cb_fn;\n \t\t\t\tuser_cb->cb_arg = cb_arg;\n \t\t\t\tuser_cb->event = event;\n-\t\t\t\tTAILQ_INSERT_TAIL(&(dev->link_intr_cbs),\n+\t\t\t\tTAILQ_INSERT_TAIL(&(dev->fcns.link_intr_cbs),\n \t\t\t\t\t\t  user_cb, next);\n \t\t\t} else {\n \t\t\t\trte_spinlock_unlock(&rte_eth_dev_cb_lock);\n@@ -3501,7 +3528,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,\n \tdo {\n \t\tdev = &rte_eth_devices[next_port];\n \t\tret = 0;\n-\t\tfor (cb = TAILQ_FIRST(&dev->link_intr_cbs); cb != NULL;\n+\t\tfor (cb = TAILQ_FIRST(&dev->fcns.link_intr_cbs); cb != NULL;\n \t\t     cb = next) {\n \n \t\t\tnext = TAILQ_NEXT(cb, next);\n@@ -3515,7 +3542,8 @@ rte_eth_dev_callback_unregister(uint16_t port_id,\n \t\t\t * then remove it.\n \t\t\t */\n \t\t\tif (cb->active == 0) {\n-\t\t\t\tTAILQ_REMOVE(&(dev->link_intr_cbs), cb, next);\n+\t\t\t\tTAILQ_REMOVE(&(dev->fcns.link_intr_cbs),\n+\t\t\t\t\tcb, next);\n \t\t\t\trte_free(cb);\n \t\t\t} else {\n \t\t\t\tret = -EAGAIN;\n@@ -3536,7 +3564,7 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,\n \tint rc = 0;\n \n \trte_spinlock_lock(&rte_eth_dev_cb_lock);\n-\tTAILQ_FOREACH(cb_lst, &(dev->link_intr_cbs), next) {\n+\tTAILQ_FOREACH(cb_lst, &(dev->fcns.link_intr_cbs), next) {\n \t\tif (cb_lst->cb_fn == NULL || cb_lst->event != event)\n \t\t\tcontinue;\n \t\tdev_cb = *cb_lst;\n@@ -3872,10 +3900,10 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,\n \trte_spinlock_lock(&rte_eth_rx_cb_lock);\n \t/* Add the callbacks in fifo order. */\n \tstruct rte_eth_rxtx_callback *tail =\n-\t\trte_eth_devices[port_id].post_rx_burst_cbs[queue_id];\n+\t\trte_eth_devices[port_id].fcns.post_rx_burst_cbs[queue_id];\n \n \tif (!tail) {\n-\t\trte_eth_devices[port_id].post_rx_burst_cbs[queue_id] = cb;\n+\t\trte_eth_devices[port_id].fcns.post_rx_burst_cbs[queue_id] = cb;\n \n \t} else {\n \t\twhile (tail->next)\n@@ -3914,9 +3942,9 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,\n \n \trte_spinlock_lock(&rte_eth_rx_cb_lock);\n \t/* Add the callbacks at fisrt position*/\n-\tcb->next = rte_eth_devices[port_id].post_rx_burst_cbs[queue_id];\n+\tcb->next = rte_eth_devices[port_id].fcns.post_rx_burst_cbs[queue_id];\n \trte_smp_wmb();\n-\trte_eth_devices[port_id].post_rx_burst_cbs[queue_id] = cb;\n+\trte_eth_devices[port_id].fcns.post_rx_burst_cbs[queue_id] = cb;\n \trte_spinlock_unlock(&rte_eth_rx_cb_lock);\n \n \treturn cb;\n@@ -3950,10 +3978,10 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,\n \trte_spinlock_lock(&rte_eth_tx_cb_lock);\n \t/* Add the callbacks in fifo order. */\n \tstruct rte_eth_rxtx_callback *tail =\n-\t\trte_eth_devices[port_id].pre_tx_burst_cbs[queue_id];\n+\t\trte_eth_devices[port_id].fcns.pre_tx_burst_cbs[queue_id];\n \n \tif (!tail) {\n-\t\trte_eth_devices[port_id].pre_tx_burst_cbs[queue_id] = cb;\n+\t\trte_eth_devices[port_id].fcns.pre_tx_burst_cbs[queue_id] = cb;\n \n \t} else {\n \t\twhile (tail->next)\n@@ -3984,7 +4012,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,\n \tint ret = -EINVAL;\n \n \trte_spinlock_lock(&rte_eth_rx_cb_lock);\n-\tprev_cb = &dev->post_rx_burst_cbs[queue_id];\n+\tprev_cb = &dev->fcns.post_rx_burst_cbs[queue_id];\n \tfor (; *prev_cb != NULL; prev_cb = &cb->next) {\n \t\tcb = *prev_cb;\n \t\tif (cb == user_cb) {\n@@ -4018,7 +4046,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,\n \tstruct rte_eth_rxtx_callback **prev_cb;\n \n \trte_spinlock_lock(&rte_eth_tx_cb_lock);\n-\tprev_cb = &dev->pre_tx_burst_cbs[queue_id];\n+\tprev_cb = &dev->fcns.pre_tx_burst_cbs[queue_id];\n \tfor (; *prev_cb != NULL; prev_cb = &cb->next) {\n \t\tcb = *prev_cb;\n \t\tif (cb == user_cb) {\n@@ -4550,6 +4578,72 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)\n \treturn result;\n }\n \n+int\n+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tdev = &rte_eth_devices[port_id];\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);\n+\tif (queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -EINVAL;\n+\n+\treturn (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);\n+}\n+\n+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 = &rte_eth_devices[port_id];\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);\n+\treturn (*dev->dev_ops->rx_descriptor_done)(\n+\t\tdev->data->rx_queues[queue_id], offset);\n+}\n+\n+int\n+rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n+\tuint16_t offset)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tvoid *rxq;\n+\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+#endif\n+\tdev = &rte_eth_devices[port_id];\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+\tif (queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -ENODEV;\n+#endif\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);\n+\trxq = dev->data->rx_queues[queue_id];\n+\n+\treturn (*dev->dev_ops->rx_descriptor_status)(rxq, offset);\n+}\n+\n+int\n+rte_eth_tx_descriptor_status(uint16_t port_id,\n+\tuint16_t queue_id, uint16_t offset)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tvoid *txq;\n+\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+#endif\n+\tdev = &rte_eth_devices[port_id];\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+\tif (queue_id >= dev->data->nb_tx_queues)\n+\t\treturn -ENODEV;\n+#endif\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);\n+\ttxq = dev->data->tx_queues[queue_id];\n+\n+\treturn (*dev->dev_ops->tx_descriptor_status)(txq, offset);\n+}\n+\n RTE_INIT(ethdev_init_log)\n {\n \trte_eth_dev_logtype = rte_log_register(\"lib.ethdev\");\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex dc6596bc9..a72046fc8 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1295,6 +1295,21 @@ struct rte_eth_dcb_info {\n \t} \\\n } while (0)\n \n+/* Macros to check for valid queue ids */\n+#define RTE_ETH_VALID_RX_QUEUEID_OR_ERR_RET(port_id, queue_id, retval) do { \\\n+\tif (!rte_eth_dev_is_valid_rx_queue_id(port_id, queue_id)) { \\\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", queue_id); \\\n+\t\treturn retval; \\\n+\t} \\\n+} while (0)\n+\n+#define RTE_ETH_VALID_TX_QUEUEID_OR_ERR_RET(port_id, queue_id, retval) do { \\\n+\tif (!rte_eth_dev_is_valid_tx_queue_id(port_id, queue_id)) { \\\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id); \\\n+\t\treturn retval; \\\n+\t} \\\n+} while (0)\n+\n /**\n  * l2 tunnel configuration.\n  */\n@@ -1308,6 +1323,24 @@ struct rte_eth_dcb_info {\n /**< l2 tunnel forwarding mask */\n #define ETH_L2_TUNNEL_FORWARDING_MASK   0x00000008\n \n+typedef uint16_t (*eth_rx_burst_t)(void *dev,\n+\t\t\t\t   uint16_t rx_queue_id,\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 *dev,\n+\t\t\t\t   uint16_t tx_queue_id,\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 uint16_t (*eth_tx_prep_t)(void *dev,\n+\t\t\t\t   uint16_t tx_queue_id,\n+\t\t\t\t   struct rte_mbuf **tx_pkts,\n+\t\t\t\t   uint16_t nb_pkts);\n+/**< @internal Prepare output packets on a transmit queue of an Ethernet device. */\n+\n /**\n  * Function type used for RX packet processing packet callbacks.\n  *\n@@ -1843,6 +1876,33 @@ int rte_eth_dev_socket_id(uint16_t port_id);\n  */\n int rte_eth_dev_is_valid_port(uint16_t port_id);\n \n+/**\n+ * Check if rx_queue_id of device is not exceeding nb_rx_queues\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+ * @return\n+ *   - 0 if queue is out of range\n+ *   - 1 if queue is within range\n+ */\n+int rte_eth_dev_is_valid_rx_queue_id(uint16_t port_id, uint16_t queue_id);\n+\n+/**\n+ * Check if tx_queue_id of device is not exceeding nb_tx_queues\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+ * @return\n+ *   - 0 if queue is out of range\n+ *   - 1 if queue is within range\n+ */\n+int rte_eth_dev_is_valid_tx_queue_id(uint16_t port_id, uint16_t queue_id);\n+\n /**\n  * Start specified RX queue of a port. It is used when rx_deferred_start\n  * flag of the specified queue is true.\n@@ -3994,7 +4054,55 @@ void *\n rte_eth_dev_get_sec_ctx(uint16_t port_id);\n \n \n-#include <rte_ethdev_core.h>\n+struct rte_eth_dev_callback;\n+/** Structure to keep track of registered callbacks */\n+TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);\n+\n+/**\n+ * Structure used to hold information about the callbacks to be called for a\n+ * queue on RX and TX.\n+ */\n+struct rte_eth_rxtx_callback {\n+\tstruct rte_eth_rxtx_callback *next;\n+\tunion{\n+\t\trte_rx_callback_fn rx;\n+\t\trte_tx_callback_fn tx;\n+\t} fn;\n+\tvoid *param;\n+};\n+\n+/**\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_fcns {\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+\teth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */\n+\t/** User application callbacks for NIC interrupts */\n+\tstruct rte_eth_dev_cb_list link_intr_cbs;\n+\t/**\n+\t * User-supplied functions called from rx_burst to post-process\n+\t * received packets before passing them to the user\n+\t */\n+\tstruct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n+\t/**\n+\t * User-supplied functions called from tx_burst to pre-process\n+\t * received packets before passing them to the driver for transmission.\n+\t */\n+\tstruct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n+} __rte_cache_aligned;\n+\n+/**\n+ * The pool of pointers to *rte_eth_dev_fcn* 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_fcns *rte_eth_dev_functions[];\n \n /**\n  *\n@@ -4082,25 +4190,21 @@ 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, const uint16_t nb_pkts)\n {\n-\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\tstruct rte_eth_dev_fcns *dev_fcns = rte_eth_dev_functions[port_id];\n \tuint16_t nb_rx;\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);\n-\n-\tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", queue_id);\n-\t\treturn 0;\n-\t}\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev_fcns->rx_pkt_burst, 0);\n+\tRTE_ETH_VALID_RX_QUEUEID_OR_ERR_RET(port_id, queue_id, 0);\n #endif\n-\tnb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],\n+\tnb_rx = (*dev_fcns->rx_pkt_burst)((void *)dev_fcns, queue_id,\n \t\t\t\t     rx_pkts, nb_pkts);\n \n #ifdef RTE_ETHDEV_RXTX_CALLBACKS\n-\tif (unlikely(dev->post_rx_burst_cbs[queue_id] != NULL)) {\n+\tif (unlikely(dev_fcns->post_rx_burst_cbs[queue_id] != NULL)) {\n \t\tstruct rte_eth_rxtx_callback *cb =\n-\t\t\t\tdev->post_rx_burst_cbs[queue_id];\n+\t\t\t\tdev_fcns->post_rx_burst_cbs[queue_id];\n \n \t\tdo {\n \t\t\tnb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,\n@@ -4125,19 +4229,8 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n  *     (-EINVAL) if *port_id* or *queue_id* is invalid\n  *     (-ENOTSUP) if the device does not support this function\n  */\n-static inline int\n-rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n-{\n-\tstruct rte_eth_dev *dev;\n-\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n-\tdev = &rte_eth_devices[port_id];\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);\n-\tif (queue_id >= dev->data->nb_rx_queues)\n-\t\treturn -EINVAL;\n-\n-\treturn (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);\n-}\n+int\n+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id);\n \n /**\n  * Check if the DD bit of the specific RX descriptor in the queue has been set\n@@ -4154,15 +4247,8 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n  *  - (-ENODEV) if *port_id* invalid.\n  *  - (-ENOTSUP) if the device does not support this function\n  */\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 = &rte_eth_devices[port_id];\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);\n-\treturn (*dev->dev_ops->rx_descriptor_done)( \\\n-\t\tdev->data->rx_queues[queue_id], offset);\n-}\n+int\n+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset);\n \n #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */\n #define RTE_ETH_RX_DESC_DONE     1 /**< Desc done, filled by hw. */\n@@ -4201,26 +4287,9 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)\n  *  - (-ENOTSUP) if the device does not support this function.\n  *  - (-ENODEV) bad port or queue (only if compiled with debug).\n  */\n-static inline int\n+int\n rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n-\tuint16_t offset)\n-{\n-\tstruct rte_eth_dev *dev;\n-\tvoid *rxq;\n-\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-#endif\n-\tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-\tif (queue_id >= dev->data->nb_rx_queues)\n-\t\treturn -ENODEV;\n-#endif\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);\n-\trxq = dev->data->rx_queues[queue_id];\n-\n-\treturn (*dev->dev_ops->rx_descriptor_status)(rxq, offset);\n-}\n+\tuint16_t offset);\n \n #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */\n #define RTE_ETH_TX_DESC_DONE    1 /**< Desc done, packet is transmitted. */\n@@ -4259,25 +4328,8 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n  *  - (-ENOTSUP) if the device does not support this function.\n  *  - (-ENODEV) bad port or queue (only if compiled with debug).\n  */\n-static inline int rte_eth_tx_descriptor_status(uint16_t port_id,\n-\tuint16_t queue_id, uint16_t offset)\n-{\n-\tstruct rte_eth_dev *dev;\n-\tvoid *txq;\n-\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-#endif\n-\tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-\tif (queue_id >= dev->data->nb_tx_queues)\n-\t\treturn -ENODEV;\n-#endif\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);\n-\ttxq = dev->data->tx_queues[queue_id];\n-\n-\treturn (*dev->dev_ops->tx_descriptor_status)(txq, offset);\n-}\n+int rte_eth_tx_descriptor_status(uint16_t port_id,\n+\tuint16_t queue_id, uint16_t offset);\n \n /**\n  * Send a burst of output packets on a transmit queue of an Ethernet device.\n@@ -4349,20 +4401,16 @@ 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 = &rte_eth_devices[port_id];\n+\tstruct rte_eth_dev_fcns *dev_fcns = rte_eth_dev_functions[port_id];\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);\n-\n-\tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n-\t\treturn 0;\n-\t}\n+\tRTE_FUNC_PTR_OR_ERR_RET(dev_fcns->tx_pkt_burst, 0);\n+\tRTE_ETH_VALID_TX_QUEUEID_OR_ERR_RET(port_id, queue_id, 0);\n #endif\n \n #ifdef RTE_ETHDEV_RXTX_CALLBACKS\n-\tstruct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];\n+\tstruct rte_eth_rxtx_callback *cb = dev_fcns->pre_tx_burst_cbs[queue_id];\n \n \tif (unlikely(cb != NULL)) {\n \t\tdo {\n@@ -4373,7 +4421,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\n \t}\n #endif\n \n-\treturn (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);\n+\treturn (*dev_fcns->tx_pkt_burst)((void *)dev_fcns, queue_id, tx_pkts, nb_pkts);\n }\n \n /**\n@@ -4435,7 +4483,7 @@ static inline uint16_t\n rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n \t\tstruct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n {\n-\tstruct rte_eth_dev *dev;\n+\tstruct rte_eth_dev_fcns *dev_fcns;\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n@@ -4445,20 +4493,16 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n \t}\n #endif\n \n-\tdev = &rte_eth_devices[port_id];\n+\tdev_fcns = rte_eth_dev_functions[port_id];\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-\tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n-\t\trte_errno = EINVAL;\n-\t\treturn 0;\n-\t}\n+\tRTE_ETH_VALID_TX_QUEUEID_OR_ERR_RET(port_id, queue_id, 0);\n #endif\n \n-\tif (!dev->tx_pkt_prepare)\n+\tif (!dev_fcns->tx_pkt_prepare)\n \t\treturn nb_pkts;\n \n-\treturn (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],\n+\treturn (*dev_fcns->tx_pkt_prepare)((void *)dev_fcns, queue_id,\n \t\t\ttx_pkts, nb_pkts);\n }\n \ndiff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h\nindex 2922d5b7c..013fbdc30 100644\n--- a/lib/librte_ethdev/rte_ethdev_core.h\n+++ b/lib/librte_ethdev/rte_ethdev_core.h\n@@ -17,520 +17,6 @@\n  *\n  */\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-/*\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-struct rte_eth_dev;\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 int (*eth_dev_reset_t)(struct rte_eth_dev *dev);\n-/** <@internal Function used to reset a configured Ethernet device. */\n-\n-typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);\n-/**< @internal Function used to detect an Ethernet device removal. */\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 int (*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_xstat *stats, unsigned n);\n-/**< @internal Get extended stats of an Ethernet device. */\n-\n-typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,\n-\t\t\t\t      const uint64_t *ids,\n-\t\t\t\t      uint64_t *values,\n-\t\t\t\t      unsigned int 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_xstats_get_names_t)(struct rte_eth_dev *dev,\n-\tstruct rte_eth_xstat_name *xstats_names, unsigned size);\n-/**< @internal Get names of extended stats of an Ethernet device. */\n-\n-typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,\n-\tstruct rte_eth_xstat_name *xstats_names, const uint64_t *ids,\n-\tunsigned int size);\n-/**< @internal Get names of 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 information of an Ethernet device. */\n-\n-typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);\n-/**< @internal Get supported ptypes 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 int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,\n-\t\t\t\t    uint16_t rx_queue_id);\n-/**< @internal Enable interrupt of a receive queue of an Ethernet device. */\n-\n-typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,\n-\t\t\t\t    uint16_t rx_queue_id);\n-/**< @internal Disable interrupt of a receive 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-/**< @internal Get number of used descriptors on a receive queue. */\n-\n-typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n-/**< @internal Check DD bit of specific RX descriptor */\n-\n-typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);\n-/**< @internal Check the status of a Rx descriptor */\n-\n-typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);\n-/**< @internal Check the status of a Tx descriptor */\n-\n-typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,\n-\t\t\t\t     char *fw_version, size_t fw_size);\n-/**< @internal Get firmware information of an Ethernet device. */\n-\n-typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);\n-/**< @internal Force mbufs to be from TX ring. */\n-\n-typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n-\tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n-\n-typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,\n-\tuint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);\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 int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,\n-\t\t\t       enum rte_vlan_type type, uint16_t tpid);\n-/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */\n-\n-typedef int (*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 uint16_t (*eth_tx_prep_t)(void *txq,\n-\t\t\t\t   struct rte_mbuf **tx_pkts,\n-\t\t\t\t   uint16_t nb_pkts);\n-/**< @internal Prepare output packets on a transmit queue of 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 int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,\n-\t\t\t\t  struct rte_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_mac_addr_set_t)(struct rte_eth_dev *dev,\n-\t\t\t\t  struct rte_ether_addr *mac_addr);\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 rte_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_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_mirror_rule_set_t)(struct rte_eth_dev *dev,\n-\t\t\t\t  struct rte_eth_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_port_add_t)(struct rte_eth_dev *dev,\n-\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n-/**< @internal Add tunneling UDP port */\n-\n-typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,\n-\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n-/**< @internal Delete tunneling UDP port */\n-\n-typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,\n-\t\t\t\t      struct rte_ether_addr *mc_addr_set,\n-\t\t\t\t      uint32_t nb_mc_addr);\n-/**< @internal set the list of multicast addresses on an Ethernet device */\n-\n-typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);\n-/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */\n-\n-typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);\n-/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */\n-\n-typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,\n-\t\t\t\t\t\tstruct timespec *timestamp,\n-\t\t\t\t\t\tuint32_t flags);\n-/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */\n-\n-typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,\n-\t\t\t\t\t\tstruct timespec *timestamp);\n-/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */\n-\n-typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);\n-/**< @internal Function used to adjust the device clock */\n-\n-typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,\n-\t\t\t\t      struct timespec *timestamp);\n-/**< @internal Function used to get time from the device clock. */\n-\n-typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,\n-\t\t\t\t       const struct timespec *timestamp);\n-/**< @internal Function used to get time from the device clock */\n-\n-typedef int (*eth_read_clock)(struct rte_eth_dev *dev,\n-\t\t\t\t      uint64_t *timestamp);\n-/**< @internal Function used to get the current value of the device clock. */\n-\n-typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,\n-\t\t\t\tstruct rte_dev_reg_info *info);\n-/**< @internal Retrieve registers  */\n-\n-typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);\n-/**< @internal Retrieve eeprom size  */\n-\n-typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,\n-\t\t\t\tstruct rte_dev_eeprom_info *info);\n-/**< @internal Retrieve eeprom data  */\n-\n-typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,\n-\t\t\t\tstruct rte_dev_eeprom_info *info);\n-/**< @internal Program eeprom data  */\n-\n-typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,\n-\t\t\t\t     struct rte_eth_dev_module_info *modinfo);\n-/**< @internal Retrieve type and size of plugin module eeprom */\n-\n-typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,\n-\t\t\t\t       struct rte_dev_eeprom_info *info);\n-/**< @internal Retrieve plugin module eeprom data */\n-\n-typedef int (*eth_l2_tunnel_eth_type_conf_t)\n-\t(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);\n-/**< @internal config l2 tunnel ether type */\n-\n-typedef int (*eth_l2_tunnel_offload_set_t)\n-\t(struct rte_eth_dev *dev,\n-\t struct rte_eth_l2_tunnel_conf *l2_tunnel,\n-\t uint32_t mask,\n-\t uint8_t en);\n-/**< @internal enable/disable the l2 tunnel offload functions */\n-\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-typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);\n-/**< @internal Get Traffic Management (TM) operations on an Ethernet device */\n-\n-typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);\n-/**< @internal Get Traffic Metering and Policing (MTR) operations */\n-\n-typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,\n-\t\t\t\t struct rte_eth_dcb_info *dcb_info);\n-/**< @internal Get dcb information on an Ethernet device */\n-\n-typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,\n-\t\t\t\t\t\tconst char *pool);\n-/**< @internal Test if a port supports specific mempool ops */\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_dev_reset_t\t\t   dev_reset;\t  /**< Reset device. */\n-\teth_link_update_t          link_update;   /**< Get device link state. */\n-\teth_is_removed_t           is_removed;\n-\t/**< Check if the device was physically removed. */\n-\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 OFF. */\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_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */\n-\teth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */\n-\tmtu_set_t                  mtu_set;       /**< Set MTU. */\n-\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_xstats_get_names_t     xstats_get_names;\n-\t/**< Get names of extended statistics. */\n-\teth_queue_stats_mapping_set_t queue_stats_mapping_set;\n-\t/**< Configure per queue stat counter mapping. */\n-\n-\teth_dev_infos_get_t        dev_infos_get; /**< Get device info. */\n-\teth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */\n-\teth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */\n-\teth_fw_version_get_t       fw_version_get; /**< Get firmware version. */\n-\teth_dev_supported_ptypes_get_t dev_supported_ptypes_get;\n-\t/**< Get packet types supported and identified by device. */\n-\n-\tvlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */\n-\tvlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner 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-\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;\n-\t/**< Get the number of used RX descriptors. */\n-\teth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */\n-\teth_rx_descriptor_status_t rx_descriptor_status;\n-\t/**< Check the status of a Rx descriptor. */\n-\teth_tx_descriptor_status_t tx_descriptor_status;\n-\t/**< Check the status of a Tx descriptor. */\n-\teth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */\n-\teth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */\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_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */\n-\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-\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-\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-\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-\n-\teth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */\n-\teth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */\n-\teth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;\n-\t/** Config ether type of l2 tunnel. */\n-\teth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;\n-\t/** Enable/disable l2 tunnel offload functions. */\n-\n-\teth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */\n-\n-\trss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */\n-\trss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */\n-\treta_update_t              reta_update;   /** Update redirection table. */\n-\treta_query_t               reta_query;    /** Query redirection table. */\n-\n-\teth_get_reg_t              get_reg;           /**< Get registers. */\n-\teth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */\n-\teth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */\n-\teth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */\n-\n-\teth_get_module_info_t      get_module_info;\n-\t/** Get plugin module eeprom attribute. */\n-\teth_get_module_eeprom_t    get_module_eeprom;\n-\t/** Get plugin module eeprom data. */\n-\n-\teth_filter_ctrl_t          filter_ctrl; /**< common filter control. */\n-\n-\teth_get_dcb_info           get_dcb_info; /** Get DCB information. */\n-\n-\teth_timesync_enable_t      timesync_enable;\n-\t/** Turn IEEE1588/802.1AS timestamping on. */\n-\teth_timesync_disable_t     timesync_disable;\n-\t/** Turn IEEE1588/802.1AS timestamping off. */\n-\teth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;\n-\t/** Read the IEEE1588/802.1AS RX timestamp. */\n-\teth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;\n-\t/** Read the IEEE1588/802.1AS TX timestamp. */\n-\teth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */\n-\teth_timesync_read_time     timesync_read_time; /** Get the device clock time. */\n-\teth_timesync_write_time    timesync_write_time; /** Set the device clock time. */\n-\n-\teth_read_clock             read_clock;\n-\n-\teth_xstats_get_by_id_t     xstats_get_by_id;\n-\t/**< Get extended device statistic values by ID. */\n-\teth_xstats_get_names_by_id_t xstats_get_names_by_id;\n-\t/**< Get name of extended device statistics by ID. */\n-\n-\teth_tm_ops_get_t tm_ops_get;\n-\t/**< Get Traffic Management (TM) operations. */\n-\n-\teth_mtr_ops_get_t mtr_ops_get;\n-\t/**< Get Traffic Metering and Policing (MTR) operations. */\n-\n-\teth_pool_ops_supported_t pool_ops_supported;\n-\t/**< Test if a port supports specific mempool ops */\n-};\n-\n-/**\n- * @internal\n- * Structure used to hold information about the callbacks to be called for a\n- * queue on RX and TX.\n- */\n-struct rte_eth_rxtx_callback {\n-\tstruct rte_eth_rxtx_callback *next;\n-\tunion{\n-\t\trte_rx_callback_fn rx;\n-\t\trte_tx_callback_fn tx;\n-\t} fn;\n-\tvoid *param;\n-};\n-\n /**\n  * @internal\n  * The generic data structure associated with each ethernet device.\n@@ -542,9 +28,7 @@ struct rte_eth_rxtx_callback {\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-\teth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */\n+\tstruct rte_eth_dev_fcns fcns; /**< Public eth device functions */\n \t/**\n \t * Next two fields are per-device data but *data is shared between\n \t * primary and secondary processes and *process_private is per-process\n@@ -555,18 +39,6 @@ struct rte_eth_dev {\n \tconst struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */\n \tstruct rte_device *device; /**< Backing device */\n \tstruct rte_intr_handle *intr_handle; /**< Device interrupt handle */\n-\t/** User application callbacks for NIC interrupts */\n-\tstruct rte_eth_dev_cb_list link_intr_cbs;\n-\t/**\n-\t * User-supplied functions called from rx_burst to post-process\n-\t * received packets before passing them to the user\n-\t */\n-\tstruct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n-\t/**\n-\t * User-supplied functions called from tx_burst to pre-process\n-\t * received packets before passing them to the driver for transmission.\n-\t */\n-\tstruct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n \tenum rte_eth_dev_state state; /**< Flag indicating the port state */\n \tvoid *security_ctx; /**< Context for security ops */\n } __rte_cache_aligned;\n@@ -645,3 +117,4 @@ struct rte_eth_dev_data {\n extern struct rte_eth_dev rte_eth_devices[];\n \n #endif /* _RTE_ETHDEV_CORE_H_ */\n+\ndiff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h\nindex 936ff8c98..6265d2fae 100644\n--- a/lib/librte_ethdev/rte_ethdev_driver.h\n+++ b/lib/librte_ethdev/rte_ethdev_driver.h\n@@ -16,11 +16,493 @@\n  */\n \n #include <rte_ethdev.h>\n+#include <rte_ethdev_core.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n #endif\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+struct rte_eth_dev;\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 int (*eth_dev_reset_t)(struct rte_eth_dev *dev);\n+/** <@internal Function used to reset a configured Ethernet device. */\n+\n+typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to detect an Ethernet device removal. */\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 int (*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_xstat *stats, unsigned n);\n+/**< @internal Get extended stats of an Ethernet device. */\n+\n+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,\n+\t\t\t\t      const uint64_t *ids,\n+\t\t\t\t      uint64_t *values,\n+\t\t\t\t      unsigned int 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_xstats_get_names_t)(struct rte_eth_dev *dev,\n+\tstruct rte_eth_xstat_name *xstats_names, unsigned size);\n+/**< @internal Get names of extended stats of an Ethernet device. */\n+\n+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,\n+\tstruct rte_eth_xstat_name *xstats_names, const uint64_t *ids,\n+\tunsigned int size);\n+/**< @internal Get names of 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 information of an Ethernet device. */\n+\n+typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);\n+/**< @internal Get supported ptypes 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 int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t rx_queue_id);\n+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */\n+\n+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t rx_queue_id);\n+/**< @internal Disable interrupt of a receive 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+/**< @internal Get number of used descriptors on a receive queue. */\n+\n+typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n+/**< @internal Check DD bit of specific RX descriptor */\n+\n+typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);\n+/**< @internal Check the status of a Rx descriptor */\n+\n+typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);\n+/**< @internal Check the status of a Tx descriptor */\n+\n+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\t     char *fw_version, size_t fw_size);\n+/**< @internal Get firmware information of an Ethernet device. */\n+\n+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);\n+/**< @internal Force mbufs to be from TX ring. */\n+\n+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n+\tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n+\n+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,\n+\tuint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);\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 int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,\n+\t\t\t       enum rte_vlan_type type, uint16_t tpid);\n+/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */\n+\n+typedef int (*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 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 int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct rte_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_mac_addr_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct rte_ether_addr *mac_addr);\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 rte_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_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_mirror_rule_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\t  struct rte_eth_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_port_add_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Add tunneling UDP port */\n+\n+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Delete tunneling UDP port */\n+\n+typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,\n+\t\t\t\t      struct rte_ether_addr *mc_addr_set,\n+\t\t\t\t      uint32_t nb_mc_addr);\n+/**< @internal set the list of multicast addresses on an Ethernet device */\n+\n+typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */\n+\n+typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);\n+/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */\n+\n+typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tstruct timespec *timestamp,\n+\t\t\t\t\t\tuint32_t flags);\n+/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */\n+\n+typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tstruct timespec *timestamp);\n+/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */\n+\n+typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);\n+/**< @internal Function used to adjust the device clock */\n+\n+typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,\n+\t\t\t\t      struct timespec *timestamp);\n+/**< @internal Function used to get time from the device clock. */\n+\n+typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,\n+\t\t\t\t       const struct timespec *timestamp);\n+/**< @internal Function used to get time from the device clock */\n+\n+typedef int (*eth_read_clock)(struct rte_eth_dev *dev,\n+\t\t\t\t      uint64_t *timestamp);\n+/**< @internal Function used to get the current value of the device clock. */\n+\n+typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_dev_reg_info *info);\n+/**< @internal Retrieve registers  */\n+\n+typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);\n+/**< @internal Retrieve eeprom size  */\n+\n+typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_dev_eeprom_info *info);\n+/**< @internal Retrieve eeprom data  */\n+\n+typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_dev_eeprom_info *info);\n+/**< @internal Program eeprom data  */\n+\n+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,\n+\t\t\t\t     struct rte_eth_dev_module_info *modinfo);\n+/**< @internal Retrieve type and size of plugin module eeprom */\n+\n+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,\n+\t\t\t\t       struct rte_dev_eeprom_info *info);\n+/**< @internal Retrieve plugin module eeprom data */\n+\n+typedef int (*eth_l2_tunnel_eth_type_conf_t)\n+\t(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);\n+/**< @internal config l2 tunnel ether type */\n+\n+typedef int (*eth_l2_tunnel_offload_set_t)\n+\t(struct rte_eth_dev *dev,\n+\t struct rte_eth_l2_tunnel_conf *l2_tunnel,\n+\t uint32_t mask,\n+\t uint8_t en);\n+/**< @internal enable/disable the l2 tunnel offload functions */\n+\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+typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);\n+/**< @internal Get Traffic Management (TM) operations on an Ethernet device */\n+\n+typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);\n+/**< @internal Get Traffic Metering and Policing (MTR) operations */\n+\n+typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_eth_dcb_info *dcb_info);\n+/**< @internal Get dcb information on an Ethernet device */\n+\n+typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tconst char *pool);\n+/**< @internal Test if a port supports specific mempool ops */\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_dev_reset_t\t\t   dev_reset;\t  /**< Reset device. */\n+\teth_link_update_t          link_update;   /**< Get device link state. */\n+\teth_is_removed_t           is_removed;\n+\t/**< Check if the device was physically removed. */\n+\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 OFF. */\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_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */\n+\teth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */\n+\tmtu_set_t                  mtu_set;       /**< Set MTU. */\n+\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_xstats_get_names_t     xstats_get_names;\n+\t/**< Get names of extended statistics. */\n+\teth_queue_stats_mapping_set_t queue_stats_mapping_set;\n+\t/**< Configure per queue stat counter mapping. */\n+\n+\teth_dev_infos_get_t        dev_infos_get; /**< Get device info. */\n+\teth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */\n+\teth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */\n+\teth_fw_version_get_t       fw_version_get; /**< Get firmware version. */\n+\teth_dev_supported_ptypes_get_t dev_supported_ptypes_get;\n+\t/**< Get packet types supported and identified by device. */\n+\n+\tvlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */\n+\tvlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner 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+\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;\n+\t/**< Get the number of used RX descriptors. */\n+\teth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */\n+\teth_rx_descriptor_status_t rx_descriptor_status;\n+\t/**< Check the status of a Rx descriptor. */\n+\teth_tx_descriptor_status_t tx_descriptor_status;\n+\t/**< Check the status of a Tx descriptor. */\n+\teth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */\n+\teth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */\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_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */\n+\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+\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+\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+\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+\n+\teth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */\n+\teth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */\n+\teth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;\n+\t/** Config ether type of l2 tunnel. */\n+\teth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;\n+\t/** Enable/disable l2 tunnel offload functions. */\n+\n+\teth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */\n+\n+\trss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */\n+\trss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */\n+\treta_update_t              reta_update;   /** Update redirection table. */\n+\treta_query_t               reta_query;    /** Query redirection table. */\n+\n+\teth_get_reg_t              get_reg;           /**< Get registers. */\n+\teth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */\n+\teth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */\n+\teth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */\n+\n+\teth_get_module_info_t      get_module_info;\n+\t/** Get plugin module eeprom attribute. */\n+\teth_get_module_eeprom_t    get_module_eeprom;\n+\t/** Get plugin module eeprom data. */\n+\n+\teth_filter_ctrl_t          filter_ctrl; /**< common filter control. */\n+\n+\teth_get_dcb_info           get_dcb_info; /** Get DCB information. */\n+\n+\teth_timesync_enable_t      timesync_enable;\n+\t/** Turn IEEE1588/802.1AS timestamping on. */\n+\teth_timesync_disable_t     timesync_disable;\n+\t/** Turn IEEE1588/802.1AS timestamping off. */\n+\teth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;\n+\t/** Read the IEEE1588/802.1AS RX timestamp. */\n+\teth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;\n+\t/** Read the IEEE1588/802.1AS TX timestamp. */\n+\teth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */\n+\teth_timesync_read_time     timesync_read_time; /** Get the device clock time. */\n+\teth_timesync_write_time    timesync_write_time; /** Set the device clock time. */\n+\n+\teth_read_clock             read_clock;\n+\n+\teth_xstats_get_by_id_t     xstats_get_by_id;\n+\t/**< Get extended device statistic values by ID. */\n+\teth_xstats_get_names_by_id_t xstats_get_names_by_id;\n+\t/**< Get name of extended device statistics by ID. */\n+\n+\teth_tm_ops_get_t tm_ops_get;\n+\t/**< Get Traffic Management (TM) operations. */\n+\n+\teth_mtr_ops_get_t mtr_ops_get;\n+\t/**< Get Traffic Metering and Policing (MTR) operations. */\n+\n+\teth_pool_ops_supported_t pool_ops_supported;\n+\t/**< Test if a port supports specific mempool ops */\n+};\n+\n /**\n  * @internal\n  * Returns a ethdev slot specified by the unique identifier name.\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex 6df42a47b..137c2f91a 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -236,6 +236,17 @@ DPDK_19.05 {\n \n } DPDK_18.11;\n \n+DPDK_19.11 {\n+\tglobal:\n+\trte_eth_rx_queue_count;\n+\trte_eth_rx_descriptor_done;\n+\trte_eth_rx_descriptor_status;\n+\trte_eth_tx_descriptor_status;\n+\trte_eth_dev_functions;\n+\trte_eth_dev_is_valid_tx_queue_id;\n+\trte_eth_dev_is_valid_rx_queue_id;\n+} DPDK_19.05;\n+\n EXPERIMENTAL {\n \tglobal:\n \ndiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex 18fcb018e..532d6c1ea 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -12,7 +12,7 @@\n #include <rte_errno.h>\n #include <rte_branch_prediction.h>\n #include <rte_string_fns.h>\n-#include \"rte_ethdev.h\"\n+#include \"rte_ethdev_driver.h\"\n #include \"rte_flow_driver.h\"\n #include \"rte_flow.h\"\n \ndiff --git a/lib/librte_ethdev/rte_mtr.c b/lib/librte_ethdev/rte_mtr.c\nindex 3073ac03f..17d95a6d3 100644\n--- a/lib/librte_ethdev/rte_mtr.c\n+++ b/lib/librte_ethdev/rte_mtr.c\n@@ -6,7 +6,7 @@\n \n #include <rte_errno.h>\n #include \"rte_compat.h\"\n-#include \"rte_ethdev.h\"\n+#include \"rte_ethdev_driver.h\"\n #include \"rte_mtr_driver.h\"\n #include \"rte_mtr.h\"\n \ndiff --git a/lib/librte_ethdev/rte_tm.c b/lib/librte_ethdev/rte_tm.c\nindex 9709454f3..23a0470f5 100644\n--- a/lib/librte_ethdev/rte_tm.c\n+++ b/lib/librte_ethdev/rte_tm.c\n@@ -5,7 +5,7 @@\n #include <stdint.h>\n \n #include <rte_errno.h>\n-#include \"rte_ethdev.h\"\n+#include \"rte_ethdev_driver.h\"\n #include \"rte_tm_driver.h\"\n #include \"rte_tm.h\"\n \ndiff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h\nindex 90114ff53..675e0c371 100644\n--- a/lib/librte_ethdev/rte_tm_driver.h\n+++ b/lib/librte_ethdev/rte_tm_driver.h\n@@ -18,6 +18,7 @@\n \n #include <rte_errno.h>\n #include \"rte_ethdev.h\"\n+#include \"rte_ethdev_core.h\"\n #include \"rte_tm.h\"\n \n #ifdef __cplusplus\ndiff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c\nindex 95dd47820..82818da8d 100644\n--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c\n+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c\n@@ -11,7 +11,7 @@\n #include <rte_common.h>\n #include <rte_dev.h>\n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_log.h>\n #include <rte_malloc.h>\n #include <rte_service_component.h>\ndiff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c\nindex d02ef57f4..8eb7caffd 100644\n--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c\n+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c\n@@ -3,7 +3,7 @@\n  */\n #include <rte_spinlock.h>\n #include <rte_service_component.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include \"rte_eventdev_pmd.h\"\n #include \"rte_event_eth_tx_adapter.h\"\ndiff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c\nindex f44c869cb..d9daa34d3 100644\n--- a/lib/librte_eventdev/rte_eventdev.c\n+++ b/lib/librte_eventdev/rte_eventdev.c\n@@ -29,7 +29,7 @@\n #include <rte_common.h>\n #include <rte_malloc.h>\n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_cryptodev.h>\n #include <rte_cryptodev_pmd.h>\n \ndiff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h\nindex 74d1ecaf5..808a9caf2 100644\n--- a/lib/librte_flow_classify/rte_flow_classify.h\n+++ b/lib/librte_flow_classify/rte_flow_classify.h\n@@ -43,7 +43,7 @@\n \n #include <rte_compat.h>\n #include <rte_common.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_ether.h>\n #include <rte_flow.h>\n #include <rte_acl.h>\ndiff --git a/lib/librte_flow_classify/rte_flow_classify_parse.h b/lib/librte_flow_classify/rte_flow_classify_parse.h\nindex 365a07bd6..91d632fbd 100644\n--- a/lib/librte_flow_classify/rte_flow_classify_parse.h\n+++ b/lib/librte_flow_classify/rte_flow_classify_parse.h\n@@ -5,7 +5,7 @@\n #ifndef _RTE_FLOW_CLASSIFY_PARSE_H_\n #define _RTE_FLOW_CLASSIFY_PARSE_H_\n \n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_ether.h>\n #include <rte_flow.h>\n #include <stdbool.h>\ndiff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c\nindex feb585514..223e45318 100644\n--- a/lib/librte_gro/gro_tcp4.c\n+++ b/lib/librte_gro/gro_tcp4.c\n@@ -5,7 +5,7 @@\n #include <rte_malloc.h>\n #include <rte_mbuf.h>\n #include <rte_cycles.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include \"gro_tcp4.h\"\n \ndiff --git a/lib/librte_gro/gro_vxlan_tcp4.c b/lib/librte_gro/gro_vxlan_tcp4.c\nindex f3b6e603b..edd3b40f4 100644\n--- a/lib/librte_gro/gro_vxlan_tcp4.c\n+++ b/lib/librte_gro/gro_vxlan_tcp4.c\n@@ -5,7 +5,7 @@\n #include <rte_malloc.h>\n #include <rte_mbuf.h>\n #include <rte_cycles.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_udp.h>\n \n #include \"gro_vxlan_tcp4.h\"\ndiff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c\nindex 6618f4d32..6595848da 100644\n--- a/lib/librte_gro/rte_gro.c\n+++ b/lib/librte_gro/rte_gro.c\n@@ -5,7 +5,7 @@\n #include <rte_malloc.h>\n #include <rte_mbuf.h>\n #include <rte_cycles.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include \"rte_gro.h\"\n #include \"gro_tcp4.h\"\ndiff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c\nindex 751b5b625..5729bb0c5 100644\n--- a/lib/librte_gso/rte_gso.c\n+++ b/lib/librte_gso/rte_gso.c\n@@ -5,7 +5,7 @@\n #include <errno.h>\n \n #include <rte_log.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include \"rte_gso.h\"\n #include \"gso_common.h\"\ndiff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c\nindex 4b51fb4fe..8e5606189 100644\n--- a/lib/librte_kni/rte_kni.c\n+++ b/lib/librte_kni/rte_kni.c\n@@ -13,7 +13,7 @@\n \n #include <rte_spinlock.h>\n #include <rte_string_fns.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_malloc.h>\n #include <rte_log.h>\n #include <rte_kni.h>\ndiff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c\nindex 06c62831b..84ff9e422 100644\n--- a/lib/librte_latencystats/rte_latencystats.c\n+++ b/lib/librte_latencystats/rte_latencystats.c\n@@ -11,7 +11,7 @@\n #include <rte_mbuf.h>\n #include <rte_log.h>\n #include <rte_cycles.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_metrics.h>\n #include <rte_memzone.h>\n #include <rte_lcore.h>\ndiff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c\nindex cd24dd010..28a9be277 100644\n--- a/lib/librte_pdump/rte_pdump.c\n+++ b/lib/librte_pdump/rte_pdump.c\n@@ -4,7 +4,7 @@\n \n #include <rte_memcpy.h>\n #include <rte_mbuf.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_lcore.h>\n #include <rte_log.h>\n #include <rte_errno.h>\ndiff --git a/lib/librte_port/rte_port_ethdev.c b/lib/librte_port/rte_port_ethdev.c\nindex 0da789026..1a8819a35 100644\n--- a/lib/librte_port/rte_port_ethdev.c\n+++ b/lib/librte_port/rte_port_ethdev.c\n@@ -5,7 +5,7 @@\n #include <stdint.h>\n \n #include <rte_mbuf.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_malloc.h>\n \n #include \"rte_port_ethdev.h\"\ndiff --git a/lib/librte_telemetry/rte_telemetry.c b/lib/librte_telemetry/rte_telemetry.c\nindex eb20cc651..4256758c9 100644\n--- a/lib/librte_telemetry/rte_telemetry.c\n+++ b/lib/librte_telemetry/rte_telemetry.c\n@@ -10,7 +10,7 @@\n #include <jansson.h>\n \n #include <rte_eal.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_metrics.h>\n #include <rte_option.h>\n #include <rte_string_fns.h>\ndiff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c\nindex 960132397..c649995e1 100644\n--- a/lib/librte_telemetry/rte_telemetry_parser.c\n+++ b/lib/librte_telemetry/rte_telemetry_parser.c\n@@ -10,7 +10,7 @@\n \n #include <rte_metrics.h>\n #include <rte_common.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n \n #include \"rte_telemetry_internal.h\"\n #include \"rte_telemetry_parser.h\"\ndiff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c\nindex 981837b5d..a5f4bc0b8 100644\n--- a/lib/librte_vhost/vhost.c\n+++ b/lib/librte_vhost/vhost.c\n@@ -13,7 +13,7 @@\n #endif\n \n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <rte_ethdev_driver.h>\n #include <rte_log.h>\n #include <rte_string_fns.h>\n #include <rte_memory.h>\n",
    "prefixes": [
        "RFC",
        "19.11",
        "v2",
        "1/3"
    ]
}