get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8569,
    "url": "https://patches.dpdk.org/api/patches/8569/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446552059-5446-2-git-send-email-bruce.richardson@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": "<1446552059-5446-2-git-send-email-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446552059-5446-2-git-send-email-bruce.richardson@intel.com",
    "date": "2015-11-03T12:00:56",
    "name": "[dpdk-dev,v3,1/4] ethdev: rename macros to have RTE_ETH prefix",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "4658d9976c46c22ad55b31c3a9b6afdf852c38f7",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446552059-5446-2-git-send-email-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8569/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8569/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 962669191;\n\tTue,  3 Nov 2015 13:01:07 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 8162D8E8D\n\tfor <dev@dpdk.org>; Tue,  3 Nov 2015 13:01:03 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 03 Nov 2015 04:01:01 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2015 04:01:00 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ttA3C0xNa020568; Tue, 3 Nov 2015 12:00:59 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id tA3C0xa6005487;\n\tTue, 3 Nov 2015 12:00:59 GMT",
            "(from bricha3@localhost)\n\tby sivswdev01.ir.intel.com with  id tA3C0xpN005483;\n\tTue, 3 Nov 2015 12:00:59 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,238,1444719600\"; d=\"scan'208\";a=\"593143382\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Nov 2015 12:00:56 +0000",
        "Message-Id": "<1446552059-5446-2-git-send-email-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1446552059-5446-1-git-send-email-bruce.richardson@intel.com>",
        "References": "<1441811374-28984-1-git-send-email-bruce.richardson@intel.com>\n\t<1446552059-5446-1-git-send-email-bruce.richardson@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/4] ethdev: rename macros to have RTE_ETH\n\tprefix",
        "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": "The macros to check that the function pointers and port ids are valid\nfor an ethdev are potentially useful to have in the ethdev.h file.\nHowever, since they would then become externally visible, we apply\nthe RTE_ETH prefix to them.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 540 +++++++++++++++++++++---------------------\n 1 file changed, 270 insertions(+), 270 deletions(-)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 073ffe9..21f213f 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -70,54 +70,54 @@\n #include \"rte_ethdev.h\"\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n-#define PMD_DEBUG_TRACE(fmt, args...) do {                        \\\n+#define RTE_PMD_DEBUG_TRACE(fmt, args...) do {                        \\\n \t\tRTE_LOG(ERR, PMD, \"%s: \" fmt, __func__, ## args); \\\n \t} while (0)\n #else\n-#define PMD_DEBUG_TRACE(fmt, args...)\n+#define RTE_PMD_DEBUG_TRACE(fmt, args...)\n #endif\n \n /* Macros for checking for restricting functions to primary instance only */\n #define PROC_PRIMARY_OR_ERR_RET(retval) do { \\\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY) { \\\n-\t\tPMD_DEBUG_TRACE(\"Cannot run in secondary processes\\n\"); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Cannot run in secondary processes\\n\"); \\\n \t\treturn (retval); \\\n \t} \\\n } while (0)\n \n #define PROC_PRIMARY_OR_RET() do { \\\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY) { \\\n-\t\tPMD_DEBUG_TRACE(\"Cannot run in secondary processes\\n\"); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Cannot run in secondary processes\\n\"); \\\n \t\treturn; \\\n \t} \\\n } while (0)\n \n /* Macros to check for invalid function pointers in dev_ops structure */\n-#define FUNC_PTR_OR_ERR_RET(func, retval) do { \\\n+#define RTE_ETH_FPTR_OR_ERR_RET(func, retval) do { \\\n \tif ((func) == NULL) { \\\n-\t\tPMD_DEBUG_TRACE(\"Function not supported\\n\"); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Function not supported\\n\"); \\\n \t\treturn (retval); \\\n \t} \\\n } while (0)\n \n-#define FUNC_PTR_OR_RET(func) do { \\\n+#define RTE_ETH_FPTR_OR_RET(func) do { \\\n \tif ((func) == NULL) { \\\n-\t\tPMD_DEBUG_TRACE(\"Function not supported\\n\"); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Function not supported\\n\"); \\\n \t\treturn; \\\n \t} \\\n } while (0)\n \n /* Macros to check for valid port */\n-#define VALID_PORTID_OR_ERR_RET(port_id, retval) do {\t\t\\\n+#define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do {\t\t\\\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\t\t\\\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n \t\treturn retval;\t\t\t\t\t\\\n \t}\t\t\t\t\t\t\t\\\n } while (0)\n \n-#define VALID_PORTID_OR_RET(port_id) do {\t\t\t\\\n+#define RTE_ETH_VALID_PORTID_OR_RET(port_id) do {\t\t\t\\\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\t\t\\\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n \t\treturn;\t\t\t\t\t\t\\\n \t}\t\t\t\t\t\t\t\\\n } while (0)\n@@ -244,7 +244,7 @@ rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type)\n \n \tport_id = rte_eth_dev_find_free_port();\n \tif (port_id == RTE_MAX_ETHPORTS) {\n-\t\tPMD_DEBUG_TRACE(\"Reached maximum number of Ethernet ports\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Reached maximum number of Ethernet ports\\n\");\n \t\treturn NULL;\n \t}\n \n@@ -252,7 +252,7 @@ rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type)\n \t\trte_eth_dev_data_alloc();\n \n \tif (rte_eth_dev_allocated(name) != NULL) {\n-\t\tPMD_DEBUG_TRACE(\"Ethernet Device with name %s already allocated!\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"Ethernet Device with name %s already allocated!\\n\",\n \t\t\t\tname);\n \t\treturn NULL;\n \t}\n@@ -339,7 +339,7 @@ rte_eth_dev_init(struct rte_pci_driver *pci_drv,\n \tif (diag == 0)\n \t\treturn 0;\n \n-\tPMD_DEBUG_TRACE(\"driver %s: eth_dev_init(vendor_id=0x%u device_id=0x%x) failed\\n\",\n+\tRTE_PMD_DEBUG_TRACE(\"driver %s: eth_dev_init(vendor_id=0x%u device_id=0x%x) failed\\n\",\n \t\t\tpci_drv->name,\n \t\t\t(unsigned) pci_dev->id.vendor_id,\n \t\t\t(unsigned) pci_dev->id.device_id);\n@@ -473,10 +473,10 @@ rte_eth_dev_get_changed_port(struct rte_eth_dev *devs, uint8_t *port_id)\n static int\n rte_eth_dev_get_addr_by_port(uint8_t port_id, struct rte_pci_addr *addr)\n {\n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tif (addr == NULL) {\n-\t\tPMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -489,10 +489,10 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)\n {\n \tchar *tmp;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tif (name == NULL) {\n-\t\tPMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -509,7 +509,7 @@ rte_eth_dev_is_detachable(uint8_t port_id)\n \tuint32_t drv_flags;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -727,7 +727,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n \t\t\treturn -(ENOMEM);\n \t\t}\n \t} else { /* re-configure */\n-\t\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_release, -ENOTSUP);\n+\t\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_release, -ENOTSUP);\n \n \t\trxq = dev->data->rx_queues;\n \n@@ -760,15 +760,15 @@ rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_start, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_start, -ENOTSUP);\n \n \treturn dev->dev_ops->rx_queue_start(dev, rx_queue_id);\n \n@@ -783,15 +783,15 @@ rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_stop, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_stop, -ENOTSUP);\n \n \treturn dev->dev_ops->rx_queue_stop(dev, rx_queue_id);\n \n@@ -806,15 +806,15 @@ rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_start, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->tx_queue_start, -ENOTSUP);\n \n \treturn dev->dev_ops->tx_queue_start(dev, tx_queue_id);\n \n@@ -829,15 +829,15 @@ rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_stop, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->tx_queue_stop, -ENOTSUP);\n \n \treturn dev->dev_ops->tx_queue_stop(dev, tx_queue_id);\n \n@@ -859,7 +859,7 @@ rte_eth_dev_tx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n \t\t\treturn -(ENOMEM);\n \t\t}\n \t} else { /* re-configure */\n-\t\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_release, -ENOTSUP);\n+\t\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->tx_queue_release, -ENOTSUP);\n \n \t\ttxq = dev->data->tx_queues;\n \n@@ -895,17 +895,17 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tif (nb_rx_q > RTE_MAX_QUEUES_PER_PORT) {\n-\t\tPMD_DEBUG_TRACE(\n+\t\tRTE_PMD_DEBUG_TRACE(\n \t\t\t\"Number of RX queues requested (%u) is greater than max supported(%d)\\n\",\n \t\t\tnb_rx_q, RTE_MAX_QUEUES_PER_PORT);\n \t\treturn -EINVAL;\n \t}\n \n \tif (nb_tx_q > RTE_MAX_QUEUES_PER_PORT) {\n-\t\tPMD_DEBUG_TRACE(\n+\t\tRTE_PMD_DEBUG_TRACE(\n \t\t\t\"Number of TX queues requested (%u) is greater than max supported(%d)\\n\",\n \t\t\tnb_tx_q, RTE_MAX_QUEUES_PER_PORT);\n \t\treturn -EINVAL;\n@@ -913,11 +913,11 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP);\n \n \tif (dev->data->dev_started) {\n-\t\tPMD_DEBUG_TRACE(\n+\t\tRTE_PMD_DEBUG_TRACE(\n \t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n \t\treturn -EBUSY;\n \t}\n@@ -929,22 +929,22 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t */\n \t(*dev->dev_ops->dev_infos_get)(dev, &dev_info);\n \tif (nb_rx_q > dev_info.max_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_rx_queues=%d > %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d nb_rx_queues=%d > %d\\n\",\n \t\t\t\tport_id, nb_rx_q, dev_info.max_rx_queues);\n \t\treturn -EINVAL;\n \t}\n \tif (nb_rx_q == 0) {\n-\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_rx_q == 0\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d nb_rx_q == 0\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (nb_tx_q > dev_info.max_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_tx_queues=%d > %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d nb_tx_queues=%d > %d\\n\",\n \t\t\t\tport_id, nb_tx_q, dev_info.max_tx_queues);\n \t\treturn -EINVAL;\n \t}\n \tif (nb_tx_q == 0) {\n-\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_tx_q == 0\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d nb_tx_q == 0\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -959,7 +959,7 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t\tconst struct rte_pci_driver *pci_drv = &dev->driver->pci_drv;\n \n \t\tif (!(pci_drv->drv_flags & RTE_PCI_DRV_INTR_LSC)) {\n-\t\t\tPMD_DEBUG_TRACE(\"driver %s does not support lsc\\n\",\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"driver %s does not support lsc\\n\",\n \t\t\t\t\tpci_drv->name);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -972,14 +972,14 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \tif (dev_conf->rxmode.jumbo_frame == 1) {\n \t\tif (dev_conf->rxmode.max_rx_pkt_len >\n \t\t    dev_info.max_rx_pktlen) {\n-\t\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d max_rx_pkt_len %u\"\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d max_rx_pkt_len %u\"\n \t\t\t\t\" > max valid value %u\\n\",\n \t\t\t\tport_id,\n \t\t\t\t(unsigned)dev_conf->rxmode.max_rx_pkt_len,\n \t\t\t\t(unsigned)dev_info.max_rx_pktlen);\n \t\t\treturn -EINVAL;\n \t\t} else if (dev_conf->rxmode.max_rx_pkt_len < ETHER_MIN_LEN) {\n-\t\t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d max_rx_pkt_len %u\"\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d max_rx_pkt_len %u\"\n \t\t\t\t\" < min valid value %u\\n\",\n \t\t\t\tport_id,\n \t\t\t\t(unsigned)dev_conf->rxmode.max_rx_pkt_len,\n@@ -999,14 +999,14 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t */\n \tdiag = rte_eth_dev_rx_queue_config(dev, nb_rx_q);\n \tif (diag != 0) {\n-\t\tPMD_DEBUG_TRACE(\"port%d rte_eth_dev_rx_queue_config = %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"port%d rte_eth_dev_rx_queue_config = %d\\n\",\n \t\t\t\tport_id, diag);\n \t\treturn diag;\n \t}\n \n \tdiag = rte_eth_dev_tx_queue_config(dev, nb_tx_q);\n \tif (diag != 0) {\n-\t\tPMD_DEBUG_TRACE(\"port%d rte_eth_dev_tx_queue_config = %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"port%d rte_eth_dev_tx_queue_config = %d\\n\",\n \t\t\t\tport_id, diag);\n \t\trte_eth_dev_rx_queue_config(dev, 0);\n \t\treturn diag;\n@@ -1014,7 +1014,7 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \n \tdiag = (*dev->dev_ops->dev_configure)(dev);\n \tif (diag != 0) {\n-\t\tPMD_DEBUG_TRACE(\"port%d dev_configure = %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"port%d dev_configure = %d\\n\",\n \t\t\t\tport_id, diag);\n \t\trte_eth_dev_rx_queue_config(dev, 0);\n \t\trte_eth_dev_tx_queue_config(dev, 0);\n@@ -1053,7 +1053,7 @@ rte_eth_dev_config_restore(uint8_t port_id)\n \t\t\t(dev->data->mac_pool_sel[i] & (1ULL << pool)))\n \t\t\t(*dev->dev_ops->mac_addr_add)(dev, &addr, i, pool);\n \t\telse {\n-\t\t\tPMD_DEBUG_TRACE(\"port %d: MAC address array not supported\\n\",\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"port %d: MAC address array not supported\\n\",\n \t\t\t\t\tport_id);\n \t\t\t/* exit the loop but not return an error */\n \t\t\tbreak;\n@@ -1083,14 +1083,14 @@ rte_eth_dev_start(uint8_t port_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);\n \n \tif (dev->data->dev_started != 0) {\n-\t\tPMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu8\n+\t\tRTE_PMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu8\n \t\t\t\" already started\\n\",\n \t\t\tport_id);\n \t\treturn 0;\n@@ -1105,7 +1105,7 @@ rte_eth_dev_start(uint8_t port_id)\n \trte_eth_dev_config_restore(port_id);\n \n \tif (dev->data->dev_conf.intr_conf.lsc != 0) {\n-\t\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP);\n+\t\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP);\n \t\t(*dev->dev_ops->link_update)(dev, 0);\n \t}\n \treturn 0;\n@@ -1120,13 +1120,13 @@ rte_eth_dev_stop(uint8_t port_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_RET();\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->dev_stop);\n \n \tif (dev->data->dev_started == 0) {\n-\t\tPMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu8\n+\t\tRTE_PMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu8\n \t\t\t\" already stopped\\n\",\n \t\t\tport_id);\n \t\treturn;\n@@ -1145,11 +1145,11 @@ rte_eth_dev_set_link_up(uint8_t port_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_up, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_up, -ENOTSUP);\n \treturn (*dev->dev_ops->dev_set_link_up)(dev);\n }\n \n@@ -1162,11 +1162,11 @@ rte_eth_dev_set_link_down(uint8_t port_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_down, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_down, -ENOTSUP);\n \treturn (*dev->dev_ops->dev_set_link_down)(dev);\n }\n \n@@ -1179,10 +1179,10 @@ rte_eth_dev_close(uint8_t port_id)\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_RET();\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->dev_close);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->dev_close);\n \tdev->data->dev_started = 0;\n \t(*dev->dev_ops->dev_close)(dev);\n \n@@ -1207,22 +1207,22 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (dev->data->dev_started) {\n-\t\tPMD_DEBUG_TRACE(\n+\t\tRTE_PMD_DEBUG_TRACE(\n \t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n \t\treturn -EBUSY;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_setup, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_setup, -ENOTSUP);\n \n \t/*\n \t * Check the size of the mbuf data buffer.\n@@ -1231,7 +1231,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n \t */\n \trte_eth_dev_info_get(port_id, &dev_info);\n \tif (mp->private_data_size < sizeof(struct rte_pktmbuf_pool_private)) {\n-\t\tPMD_DEBUG_TRACE(\"%s private_data_size %d < %d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"%s private_data_size %d < %d\\n\",\n \t\t\t\tmp->name, (int) mp->private_data_size,\n \t\t\t\t(int) sizeof(struct rte_pktmbuf_pool_private));\n \t\treturn -ENOSPC;\n@@ -1239,7 +1239,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n \tmbp_buf_size = rte_pktmbuf_data_room_size(mp);\n \n \tif ((mbp_buf_size - RTE_PKTMBUF_HEADROOM) < dev_info.min_rx_bufsize) {\n-\t\tPMD_DEBUG_TRACE(\"%s mbuf_data_room_size %d < %d \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"%s mbuf_data_room_size %d < %d \"\n \t\t\t\t\"(RTE_PKTMBUF_HEADROOM=%d + min_rx_bufsize(dev)\"\n \t\t\t\t\"=%d)\\n\",\n \t\t\t\tmp->name,\n@@ -1255,7 +1255,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,\n \t\t\tnb_rx_desc < dev_info.rx_desc_lim.nb_min ||\n \t\t\tnb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {\n \n-\t\tPMD_DEBUG_TRACE(\"Invalid value for nb_rx_desc(=%hu), \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid value for nb_rx_desc(=%hu), \"\n \t\t\t\"should be: <= %hu, = %hu, and a product of %hu\\n\",\n \t\t\tnb_rx_desc,\n \t\t\tdev_info.rx_desc_lim.nb_max,\n@@ -1290,22 +1290,22 @@ rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,\n \t * in a multi-process setup*/\n \tPROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (dev->data->dev_started) {\n-\t\tPMD_DEBUG_TRACE(\n+\t\tRTE_PMD_DEBUG_TRACE(\n \t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n \t\treturn -EBUSY;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_setup, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->tx_queue_setup, -ENOTSUP);\n \n \trte_eth_dev_info_get(port_id, &dev_info);\n \n@@ -1321,10 +1321,10 @@ rte_eth_promiscuous_enable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->promiscuous_enable);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->promiscuous_enable);\n \t(*dev->dev_ops->promiscuous_enable)(dev);\n \tdev->data->promiscuous = 1;\n }\n@@ -1334,10 +1334,10 @@ rte_eth_promiscuous_disable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->promiscuous_disable);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->promiscuous_disable);\n \tdev->data->promiscuous = 0;\n \t(*dev->dev_ops->promiscuous_disable)(dev);\n }\n@@ -1347,7 +1347,7 @@ rte_eth_promiscuous_get(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \treturn dev->data->promiscuous;\n@@ -1358,10 +1358,10 @@ rte_eth_allmulticast_enable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->allmulticast_enable);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->allmulticast_enable);\n \t(*dev->dev_ops->allmulticast_enable)(dev);\n \tdev->data->all_multicast = 1;\n }\n@@ -1371,10 +1371,10 @@ rte_eth_allmulticast_disable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->allmulticast_disable);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->allmulticast_disable);\n \tdev->data->all_multicast = 0;\n \t(*dev->dev_ops->allmulticast_disable)(dev);\n }\n@@ -1384,7 +1384,7 @@ rte_eth_allmulticast_get(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \treturn dev->data->all_multicast;\n@@ -1409,13 +1409,13 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n \tif (dev->data->dev_conf.intr_conf.lsc != 0)\n \t\trte_eth_dev_atomic_read_link_status(dev, eth_link);\n \telse {\n-\t\tFUNC_PTR_OR_RET(*dev->dev_ops->link_update);\n+\t\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->link_update);\n \t\t(*dev->dev_ops->link_update)(dev, 1);\n \t\t*eth_link = dev->data->dev_link;\n \t}\n@@ -1426,13 +1426,13 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n \tif (dev->data->dev_conf.intr_conf.lsc != 0)\n \t\trte_eth_dev_atomic_read_link_status(dev, eth_link);\n \telse {\n-\t\tFUNC_PTR_OR_RET(*dev->dev_ops->link_update);\n+\t\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->link_update);\n \t\t(*dev->dev_ops->link_update)(dev, 0);\n \t\t*eth_link = dev->data->dev_link;\n \t}\n@@ -1443,12 +1443,12 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \tmemset(stats, 0, sizeof(*stats));\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP);\n \t(*dev->dev_ops->stats_get)(dev, stats);\n \tstats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;\n \treturn 0;\n@@ -1459,10 +1459,10 @@ rte_eth_stats_reset(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->stats_reset);\n \t(*dev->dev_ops->stats_reset)(dev);\n }\n \n@@ -1477,7 +1477,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstats *xstats,\n \tsigned xcount = 0;\n \tuint64_t val, *stats_ptr;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \n@@ -1557,7 +1557,7 @@ rte_eth_xstats_reset(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n \t/* implemented by the driver */\n@@ -1576,11 +1576,11 @@ set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_stats_mapping_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->queue_stats_mapping_set, -ENOTSUP);\n \treturn (*dev->dev_ops->queue_stats_mapping_set)\n \t\t\t(dev, queue_id, stat_idx, is_rx);\n }\n@@ -1614,14 +1614,14 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)\n \t\t.nb_align = 1,\n \t};\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n \tmemset(dev_info, 0, sizeof(struct rte_eth_dev_info));\n \tdev_info->rx_desc_lim = lim;\n \tdev_info->tx_desc_lim = lim;\n \n-\tFUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);\n+\tRTE_ETH_FPTR_OR_RET(*dev->dev_ops->dev_infos_get);\n \t(*dev->dev_ops->dev_infos_get)(dev, dev_info);\n \tdev_info->pci_dev = dev->pci_dev;\n \tif (dev->driver)\n@@ -1633,7 +1633,7 @@ rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \tether_addr_copy(&dev->data->mac_addrs[0], mac_addr);\n }\n@@ -1644,7 +1644,7 @@ rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \t*mtu = dev->data->mtu;\n@@ -1657,9 +1657,9 @@ rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)\n \tint ret;\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mtu_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mtu_set, -ENOTSUP);\n \n \tret = (*dev->dev_ops->mtu_set)(dev, mtu);\n \tif (!ret)\n@@ -1673,19 +1673,19 @@ rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \tif (!(dev->data->dev_conf.rxmode.hw_vlan_filter)) {\n-\t\tPMD_DEBUG_TRACE(\"port %d: vlan-filtering disabled\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"port %d: vlan-filtering disabled\\n\", port_id);\n \t\treturn -ENOSYS;\n \t}\n \n \tif (vlan_id > 4095) {\n-\t\tPMD_DEBUG_TRACE(\"(port_id=%d) invalid vlan_id=%u > 4095\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"(port_id=%d) invalid vlan_id=%u > 4095\\n\",\n \t\t\t\tport_id, (unsigned) vlan_id);\n \t\treturn -EINVAL;\n \t}\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_filter_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->vlan_filter_set, -ENOTSUP);\n \n \treturn (*dev->dev_ops->vlan_filter_set)(dev, vlan_id, on);\n }\n@@ -1695,14 +1695,14 @@ rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int o\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid rx_queue_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid rx_queue_id=%d\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_strip_queue_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->vlan_strip_queue_set, -ENOTSUP);\n \t(*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on);\n \n \treturn 0;\n@@ -1713,9 +1713,9 @@ rte_eth_dev_set_vlan_ether_type(uint8_t port_id, uint16_t tpid)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_tpid_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->vlan_tpid_set, -ENOTSUP);\n \t(*dev->dev_ops->vlan_tpid_set)(dev, tpid);\n \n \treturn 0;\n@@ -1729,7 +1729,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)\n \tint mask = 0;\n \tint cur, org = 0;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n \t/*check which option changed by application*/\n@@ -1758,7 +1758,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)\n \tif (mask == 0)\n \t\treturn ret;\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP);\n \t(*dev->dev_ops->vlan_offload_set)(dev, mask);\n \n \treturn ret;\n@@ -1770,7 +1770,7 @@ rte_eth_dev_get_vlan_offload(uint8_t port_id)\n \tstruct rte_eth_dev *dev;\n \tint ret = 0;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n \tif (dev->data->dev_conf.rxmode.hw_vlan_strip)\n@@ -1790,9 +1790,9 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_pvid_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->vlan_pvid_set, -ENOTSUP);\n \t(*dev->dev_ops->vlan_pvid_set)(dev, pvid, on);\n \n \treturn 0;\n@@ -1803,9 +1803,9 @@ rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_get, -ENOTSUP);\n \tmemset(fc_conf, 0, sizeof(*fc_conf));\n \treturn (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf);\n }\n@@ -1815,14 +1815,14 @@ rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif ((fc_conf->send_xon != 0) && (fc_conf->send_xon != 1)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid send_xon, only 0/1 allowed\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid send_xon, only 0/1 allowed\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_set, -ENOTSUP);\n \treturn (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf);\n }\n \n@@ -1831,9 +1831,9 @@ rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (pfc_conf->priority > (ETH_DCB_NUM_USER_PRIORITIES - 1)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid priority, only 0-7 allowed\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid priority, only 0-7 allowed\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -1854,7 +1854,7 @@ rte_eth_check_reta_mask(struct rte_eth_rss_reta_entry64 *reta_conf,\n \t\treturn -EINVAL;\n \n \tif (reta_size != RTE_ALIGN(reta_size, RTE_RETA_GROUP_SIZE)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid reta size, should be %u aligned\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid reta size, should be %u aligned\\n\",\n \t\t\t\t\t\t\tRTE_RETA_GROUP_SIZE);\n \t\treturn -EINVAL;\n \t}\n@@ -1879,7 +1879,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,\n \t\treturn -EINVAL;\n \n \tif (max_rxq == 0) {\n-\t\tPMD_DEBUG_TRACE(\"No receive queue is available\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"No receive queue is available\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -1888,7 +1888,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,\n \t\tshift = i % RTE_RETA_GROUP_SIZE;\n \t\tif ((reta_conf[idx].mask & (1ULL << shift)) &&\n \t\t\t(reta_conf[idx].reta[shift] >= max_rxq)) {\n-\t\t\tPMD_DEBUG_TRACE(\"reta_conf[%u]->reta[%u]: %u exceeds \"\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"reta_conf[%u]->reta[%u]: %u exceeds \"\n \t\t\t\t\"the maximum rxq index: %u\\n\", idx, shift,\n \t\t\t\treta_conf[idx].reta[shift], max_rxq);\n \t\t\treturn -EINVAL;\n@@ -1906,7 +1906,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,\n \tstruct rte_eth_dev *dev;\n \tint ret;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \t/* Check mask bits */\n \tret = rte_eth_check_reta_mask(reta_conf, reta_size);\n \tif (ret < 0)\n@@ -1920,7 +1920,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->reta_update, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->reta_update, -ENOTSUP);\n \treturn (*dev->dev_ops->reta_update)(dev, reta_conf, reta_size);\n }\n \n@@ -1933,7 +1933,7 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,\n \tint ret;\n \n \tif (port_id >= nb_ports) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n@@ -1943,7 +1943,7 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,\n \t\treturn ret;\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->reta_query, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->reta_query, -ENOTSUP);\n \treturn (*dev->dev_ops->reta_query)(dev, reta_conf, reta_size);\n }\n \n@@ -1953,16 +1953,16 @@ rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)\n \tstruct rte_eth_dev *dev;\n \tuint16_t rss_hash_protos;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \trss_hash_protos = rss_conf->rss_hf;\n \tif ((rss_hash_protos != 0) &&\n \t    ((rss_hash_protos & ETH_RSS_PROTO_MASK) == 0)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid rss_hash_protos=0x%x\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid rss_hash_protos=0x%x\\n\",\n \t\t\t\trss_hash_protos);\n \t\treturn -EINVAL;\n \t}\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP);\n \treturn (*dev->dev_ops->rss_hash_update)(dev, rss_conf);\n }\n \n@@ -1972,9 +1972,9 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_conf_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rss_hash_conf_get, -ENOTSUP);\n \treturn (*dev->dev_ops->rss_hash_conf_get)(dev, rss_conf);\n }\n \n@@ -1984,19 +1984,19 @@ rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (udp_tunnel == NULL) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_add, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_add, -ENOTSUP);\n \treturn (*dev->dev_ops->udp_tunnel_add)(dev, udp_tunnel);\n }\n \n@@ -2006,20 +2006,20 @@ rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n \tif (udp_tunnel == NULL) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_del, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_del, -ENOTSUP);\n \treturn (*dev->dev_ops->udp_tunnel_del)(dev, udp_tunnel);\n }\n \n@@ -2028,9 +2028,9 @@ rte_eth_led_on(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_led_on, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_led_on, -ENOTSUP);\n \treturn (*dev->dev_ops->dev_led_on)(dev);\n }\n \n@@ -2039,9 +2039,9 @@ rte_eth_led_off(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_led_off, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->dev_led_off, -ENOTSUP);\n \treturn (*dev->dev_ops->dev_led_off)(dev);\n }\n \n@@ -2075,17 +2075,17 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,\n \tint index;\n \tuint64_t pool_mask;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_add, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mac_addr_add, -ENOTSUP);\n \n \tif (is_zero_ether_addr(addr)) {\n-\t\tPMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n \t\t\tport_id);\n \t\treturn -EINVAL;\n \t}\n \tif (pool >= ETH_64_POOLS) {\n-\t\tPMD_DEBUG_TRACE(\"pool id must be 0-%d\\n\", ETH_64_POOLS - 1);\n+\t\tRTE_PMD_DEBUG_TRACE(\"pool id must be 0-%d\\n\", ETH_64_POOLS - 1);\n \t\treturn -EINVAL;\n \t}\n \n@@ -2093,7 +2093,7 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,\n \tif (index < 0) {\n \t\tindex = get_mac_addr_index(port_id, &null_mac_addr);\n \t\tif (index < 0) {\n-\t\t\tPMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n \t\t\t\tport_id);\n \t\t\treturn -ENOSPC;\n \t\t}\n@@ -2123,13 +2123,13 @@ rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)\n \tstruct rte_eth_dev *dev;\n \tint index;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_remove, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mac_addr_remove, -ENOTSUP);\n \n \tindex = get_mac_addr_index(port_id, addr);\n \tif (index == 0) {\n-\t\tPMD_DEBUG_TRACE(\"port %d: Cannot remove default MAC address\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot remove default MAC address\\n\", port_id);\n \t\treturn -EADDRINUSE;\n \t} else if (index < 0)\n \t\treturn 0;  /* Do nothing if address wasn't found */\n@@ -2151,13 +2151,13 @@ rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tif (!is_valid_assigned_ether_addr(addr))\n \t\treturn -EINVAL;\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP);\n \n \t/* Update default address in NIC data structure */\n \tether_addr_copy(addr, &dev->data->mac_addrs[0]);\n@@ -2175,22 +2175,22 @@ rte_eth_dev_set_vf_rxmode(uint8_t port_id,  uint16_t vf,\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_eth_dev_info_get(port_id, &dev_info);\n \n \tnum_vfs = dev_info.max_vfs;\n \tif (vf > num_vfs) {\n-\t\tPMD_DEBUG_TRACE(\"set VF RX mode:invalid VF id %d\\n\", vf);\n+\t\tRTE_PMD_DEBUG_TRACE(\"set VF RX mode:invalid VF id %d\\n\", vf);\n \t\treturn -EINVAL;\n \t}\n \n \tif (rx_mode == 0) {\n-\t\tPMD_DEBUG_TRACE(\"set VF RX mode:mode mask ca not be zero\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"set VF RX mode:mode mask ca not be zero\\n\");\n \t\treturn -EINVAL;\n \t}\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx_mode, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx_mode, -ENOTSUP);\n \treturn (*dev->dev_ops->set_vf_rx_mode)(dev, vf, rx_mode, on);\n }\n \n@@ -2225,11 +2225,11 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,\n \tint ret;\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \tif (is_zero_ether_addr(addr)) {\n-\t\tPMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n \t\t\tport_id);\n \t\treturn -EINVAL;\n \t}\n@@ -2241,20 +2241,20 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,\n \n \tif (index < 0) {\n \t\tif (!on) {\n-\t\t\tPMD_DEBUG_TRACE(\"port %d: the MAC address was not \"\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"port %d: the MAC address was not \"\n \t\t\t\t\"set in UTA\\n\", port_id);\n \t\t\treturn -EINVAL;\n \t\t}\n \n \t\tindex = get_hash_mac_addr_index(port_id, &null_mac_addr);\n \t\tif (index < 0) {\n-\t\t\tPMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n \t\t\t\t\tport_id);\n \t\t\treturn -ENOSPC;\n \t\t}\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->uc_hash_table_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->uc_hash_table_set, -ENOTSUP);\n \tret = (*dev->dev_ops->uc_hash_table_set)(dev, addr, on);\n \tif (ret == 0) {\n \t\t/* Update address in NIC data structure */\n@@ -2274,11 +2274,11 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->uc_all_hash_table_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->uc_all_hash_table_set, -ENOTSUP);\n \treturn (*dev->dev_ops->uc_all_hash_table_set)(dev, on);\n }\n \n@@ -2289,18 +2289,18 @@ rte_eth_dev_set_vf_rx(uint8_t port_id, uint16_t vf, uint8_t on)\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_eth_dev_info_get(port_id, &dev_info);\n \n \tnum_vfs = dev_info.max_vfs;\n \tif (vf > num_vfs) {\n-\t\tPMD_DEBUG_TRACE(\"port %d: invalid vf id\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"port %d: invalid vf id\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx, -ENOTSUP);\n \treturn (*dev->dev_ops->set_vf_rx)(dev, vf, on);\n }\n \n@@ -2311,18 +2311,18 @@ rte_eth_dev_set_vf_tx(uint8_t port_id, uint16_t vf, uint8_t on)\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_eth_dev_info_get(port_id, &dev_info);\n \n \tnum_vfs = dev_info.max_vfs;\n \tif (vf > num_vfs) {\n-\t\tPMD_DEBUG_TRACE(\"set pool tx:invalid pool id=%d\\n\", vf);\n+\t\tRTE_PMD_DEBUG_TRACE(\"set pool tx:invalid pool id=%d\\n\", vf);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_tx, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_vf_tx, -ENOTSUP);\n \treturn (*dev->dev_ops->set_vf_tx)(dev, vf, on);\n }\n \n@@ -2332,22 +2332,22 @@ rte_eth_dev_set_vf_vlan_filter(uint8_t port_id, uint16_t vlan_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n \tif (vlan_id > ETHER_MAX_VLAN_ID) {\n-\t\tPMD_DEBUG_TRACE(\"VF VLAN filter:invalid VLAN id=%d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"VF VLAN filter:invalid VLAN id=%d\\n\",\n \t\t\tvlan_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (vf_mask == 0) {\n-\t\tPMD_DEBUG_TRACE(\"VF VLAN filter:pool_mask can not be 0\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"VF VLAN filter:pool_mask can not be 0\\n\");\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_vlan_filter, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_vf_vlan_filter, -ENOTSUP);\n \treturn (*dev->dev_ops->set_vf_vlan_filter)(dev, vlan_id,\n \t\t\t\t\t\t   vf_mask, vlan_on);\n }\n@@ -2359,26 +2359,26 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_link link;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_eth_dev_info_get(port_id, &dev_info);\n \tlink = dev->data->dev_link;\n \n \tif (queue_idx > dev_info.max_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"set queue rate limit:port %d: \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"set queue rate limit:port %d: \"\n \t\t\t\t\"invalid queue id=%d\\n\", port_id, queue_idx);\n \t\treturn -EINVAL;\n \t}\n \n \tif (tx_rate > link.link_speed) {\n-\t\tPMD_DEBUG_TRACE(\"set queue rate limit:invalid tx_rate=%d, \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"set queue rate limit:invalid tx_rate=%d, \"\n \t\t\t\t\"bigger than link speed= %d\\n\",\n \t\t\ttx_rate, link.link_speed);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_queue_rate_limit, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_queue_rate_limit, -ENOTSUP);\n \treturn (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate);\n }\n \n@@ -2392,26 +2392,26 @@ int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate,\n \tif (q_msk == 0)\n \t\treturn 0;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_eth_dev_info_get(port_id, &dev_info);\n \tlink = dev->data->dev_link;\n \n \tif (vf > dev_info.max_vfs) {\n-\t\tPMD_DEBUG_TRACE(\"set VF rate limit:port %d: \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"set VF rate limit:port %d: \"\n \t\t\t\t\"invalid vf id=%d\\n\", port_id, vf);\n \t\treturn -EINVAL;\n \t}\n \n \tif (tx_rate > link.link_speed) {\n-\t\tPMD_DEBUG_TRACE(\"set VF rate limit:invalid tx_rate=%d, \"\n+\t\tRTE_PMD_DEBUG_TRACE(\"set VF rate limit:invalid tx_rate=%d, \"\n \t\t\t\t\"bigger than link speed= %d\\n\",\n \t\t\t\ttx_rate, link.link_speed);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rate_limit, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_vf_rate_limit, -ENOTSUP);\n \treturn (*dev->dev_ops->set_vf_rate_limit)(dev, vf, tx_rate, q_msk);\n }\n \n@@ -2422,14 +2422,14 @@ rte_eth_mirror_rule_set(uint8_t port_id,\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (mirror_conf->rule_type == 0) {\n-\t\tPMD_DEBUG_TRACE(\"mirror rule type can not be 0.\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"mirror rule type can not be 0.\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (mirror_conf->dst_pool >= ETH_64_POOLS) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid dst pool, pool id must be 0-%d\\n\",\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid dst pool, pool id must be 0-%d\\n\",\n \t\t\t\tETH_64_POOLS - 1);\n \t\treturn -EINVAL;\n \t}\n@@ -2437,18 +2437,18 @@ rte_eth_mirror_rule_set(uint8_t port_id,\n \tif ((mirror_conf->rule_type & (ETH_MIRROR_VIRTUAL_POOL_UP |\n \t     ETH_MIRROR_VIRTUAL_POOL_DOWN)) &&\n \t    (mirror_conf->pool_mask == 0)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid mirror pool, pool mask can not be 0.\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid mirror pool, pool mask can not be 0.\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif ((mirror_conf->rule_type & ETH_MIRROR_VLAN) &&\n \t    mirror_conf->vlan.vlan_mask == 0) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid vlan mask, vlan mask can not be 0.\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid vlan mask, vlan mask can not be 0.\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mirror_rule_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mirror_rule_set, -ENOTSUP);\n \n \treturn (*dev->dev_ops->mirror_rule_set)(dev, mirror_conf, rule_id, on);\n }\n@@ -2458,10 +2458,10 @@ rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->mirror_rule_reset, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->mirror_rule_reset, -ENOTSUP);\n \n \treturn (*dev->dev_ops->mirror_rule_reset)(dev, rule_id);\n }\n@@ -2473,12 +2473,12 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, 0);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);\n \tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n \t\treturn 0;\n \t}\n \treturn (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],\n@@ -2491,13 +2491,13 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, 0);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);\n \tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n \t\treturn 0;\n \t}\n \treturn (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id],\n@@ -2509,10 +2509,10 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, 0);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, 0);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, 0);\n \treturn (*dev->dev_ops->rx_queue_count)(dev, queue_id);\n }\n \n@@ -2521,10 +2521,10 @@ rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);\n \treturn (*dev->dev_ops->rx_descriptor_done)(dev->data->rx_queues[queue_id],\n \t\t\t\t\t\t   offset);\n }\n@@ -2541,7 +2541,7 @@ rte_eth_dev_callback_register(uint8_t port_id,\n \tif (!cb_fn)\n \t\treturn -EINVAL;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_spinlock_lock(&rte_eth_dev_cb_lock);\n@@ -2581,7 +2581,7 @@ rte_eth_dev_callback_unregister(uint8_t port_id,\n \tif (!cb_fn)\n \t\treturn -EINVAL;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tdev = &rte_eth_devices[port_id];\n \trte_spinlock_lock(&rte_eth_dev_cb_lock);\n@@ -2644,14 +2644,14 @@ rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)\n \tint rc;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%u\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%u\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n \tintr_handle = &dev->pci_dev->intr_handle;\n \tif (!intr_handle->intr_vec) {\n-\t\tPMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n \t\treturn -EPERM;\n \t}\n \n@@ -2659,7 +2659,7 @@ rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)\n \t\tvec = intr_handle->intr_vec[qid];\n \t\trc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);\n \t\tif (rc && rc != -EEXIST) {\n-\t\t\tPMD_DEBUG_TRACE(\"p %u q %u rx ctl error\"\n+\t\t\tRTE_PMD_DEBUG_TRACE(\"p %u q %u rx ctl error\"\n \t\t\t\t\t\" op %d epfd %d vec %u\\n\",\n \t\t\t\t\tport_id, qid, op, epfd, vec);\n \t\t}\n@@ -2678,26 +2678,26 @@ rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,\n \tint rc;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%u\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%u\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%u\\n\", queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%u\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tintr_handle = &dev->pci_dev->intr_handle;\n \tif (!intr_handle->intr_vec) {\n-\t\tPMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n+\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n \t\treturn -EPERM;\n \t}\n \n \tvec = intr_handle->intr_vec[queue_id];\n \trc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);\n \tif (rc && rc != -EEXIST) {\n-\t\tPMD_DEBUG_TRACE(\"p %u q %u rx ctl error\"\n+\t\tRTE_PMD_DEBUG_TRACE(\"p %u q %u rx ctl error\"\n \t\t\t\t\" op %d epfd %d vec %u\\n\",\n \t\t\t\tport_id, queue_id, op, epfd, vec);\n \t\treturn rc;\n@@ -2713,13 +2713,13 @@ rte_eth_dev_rx_intr_enable(uint8_t port_id,\n \tstruct rte_eth_dev *dev;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP);\n \treturn (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id);\n }\n \n@@ -2730,13 +2730,13 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id,\n \tstruct rte_eth_dev *dev;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP);\n \treturn (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id);\n }\n \n@@ -2745,10 +2745,10 @@ int rte_eth_dev_bypass_init(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_init, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_init, -ENOTSUP);\n \t(*dev->dev_ops->bypass_init)(dev);\n \treturn 0;\n }\n@@ -2758,10 +2758,10 @@ rte_eth_dev_bypass_state_show(uint8_t port_id, uint32_t *state)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);\n \t(*dev->dev_ops->bypass_state_show)(dev, state);\n \treturn 0;\n }\n@@ -2771,10 +2771,10 @@ rte_eth_dev_bypass_state_set(uint8_t port_id, uint32_t *new_state)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_state_set, -ENOTSUP);\n \t(*dev->dev_ops->bypass_state_set)(dev, new_state);\n \treturn 0;\n }\n@@ -2784,10 +2784,10 @@ rte_eth_dev_bypass_event_show(uint8_t port_id, uint32_t event, uint32_t *state)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);\n \t(*dev->dev_ops->bypass_event_show)(dev, event, state);\n \treturn 0;\n }\n@@ -2797,11 +2797,11 @@ rte_eth_dev_bypass_event_store(uint8_t port_id, uint32_t event, uint32_t state)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_event_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_event_set, -ENOTSUP);\n \t(*dev->dev_ops->bypass_event_set)(dev, event, state);\n \treturn 0;\n }\n@@ -2811,11 +2811,11 @@ rte_eth_dev_wd_timeout_store(uint8_t port_id, uint32_t timeout)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_set, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_set, -ENOTSUP);\n \t(*dev->dev_ops->bypass_wd_timeout_set)(dev, timeout);\n \treturn 0;\n }\n@@ -2825,11 +2825,11 @@ rte_eth_dev_bypass_ver_show(uint8_t port_id, uint32_t *ver)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_ver_show, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_ver_show, -ENOTSUP);\n \t(*dev->dev_ops->bypass_ver_show)(dev, ver);\n \treturn 0;\n }\n@@ -2839,11 +2839,11 @@ rte_eth_dev_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_show, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_show, -ENOTSUP);\n \t(*dev->dev_ops->bypass_wd_timeout_show)(dev, wd_timeout);\n \treturn 0;\n }\n@@ -2853,11 +2853,11 @@ rte_eth_dev_bypass_wd_reset(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_reset, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_reset, -ENOTSUP);\n \t(*dev->dev_ops->bypass_wd_reset)(dev);\n \treturn 0;\n }\n@@ -2868,10 +2868,10 @@ rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->filter_ctrl, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->filter_ctrl, -ENOTSUP);\n \treturn (*dev->dev_ops->filter_ctrl)(dev, filter_type,\n \t\t\t\tRTE_ETH_FILTER_NOP, NULL);\n }\n@@ -2882,10 +2882,10 @@ rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->filter_ctrl, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->filter_ctrl, -ENOTSUP);\n \treturn (*dev->dev_ops->filter_ctrl)(dev, filter_type, filter_op, arg);\n }\n \n@@ -3055,18 +3055,18 @@ rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tif (qinfo == NULL)\n \t\treturn -EINVAL;\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rxq_info_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rxq_info_get, -ENOTSUP);\n \n \tmemset(qinfo, 0, sizeof(*qinfo));\n \tdev->dev_ops->rxq_info_get(dev, queue_id, qinfo);\n@@ -3079,18 +3079,18 @@ rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tif (qinfo == NULL)\n \t\treturn -EINVAL;\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->txq_info_get, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->txq_info_get, -ENOTSUP);\n \n \tmemset(qinfo, 0, sizeof(*qinfo));\n \tdev->dev_ops->txq_info_get(dev, queue_id, qinfo);\n@@ -3104,10 +3104,10 @@ rte_eth_dev_set_mc_addr_list(uint8_t port_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_mc_addr_list, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_mc_addr_list, -ENOTSUP);\n \treturn dev->dev_ops->set_mc_addr_list(dev, mc_addr_set, nb_mc_addr);\n }\n \n@@ -3116,10 +3116,10 @@ rte_eth_timesync_enable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_enable, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->timesync_enable, -ENOTSUP);\n \treturn (*dev->dev_ops->timesync_enable)(dev);\n }\n \n@@ -3128,10 +3128,10 @@ rte_eth_timesync_disable(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_disable, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->timesync_disable, -ENOTSUP);\n \treturn (*dev->dev_ops->timesync_disable)(dev);\n }\n \n@@ -3141,10 +3141,10 @@ rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_read_rx_timestamp, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->timesync_read_rx_timestamp, -ENOTSUP);\n \treturn (*dev->dev_ops->timesync_read_rx_timestamp)(dev, timestamp, flags);\n }\n \n@@ -3153,10 +3153,10 @@ rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_read_tx_timestamp, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->timesync_read_tx_timestamp, -ENOTSUP);\n \treturn (*dev->dev_ops->timesync_read_tx_timestamp)(dev, timestamp);\n }\n \n@@ -3165,10 +3165,10 @@ rte_eth_dev_get_reg_length(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_reg_length, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->get_reg_length, -ENOTSUP);\n \treturn (*dev->dev_ops->get_reg_length)(dev);\n }\n \n@@ -3177,10 +3177,10 @@ rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_reg, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->get_reg, -ENOTSUP);\n \treturn (*dev->dev_ops->get_reg)(dev, info);\n }\n \n@@ -3189,10 +3189,10 @@ rte_eth_dev_get_eeprom_length(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_eeprom_length, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->get_eeprom_length, -ENOTSUP);\n \treturn (*dev->dev_ops->get_eeprom_length)(dev);\n }\n \n@@ -3201,10 +3201,10 @@ rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_eeprom, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->get_eeprom, -ENOTSUP);\n \treturn (*dev->dev_ops->get_eeprom)(dev, info);\n }\n \n@@ -3213,10 +3213,10 @@ rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tdev = &rte_eth_devices[port_id];\n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_eeprom, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->set_eeprom, -ENOTSUP);\n \treturn (*dev->dev_ops->set_eeprom)(dev, info);\n }\n \n@@ -3227,13 +3227,13 @@ rte_eth_dev_get_dcb_info(uint8_t port_id,\n \tstruct rte_eth_dev *dev;\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n \t\treturn -ENODEV;\n \t}\n \n \tdev = &rte_eth_devices[port_id];\n \tmemset(dcb_info, 0, sizeof(struct rte_eth_dcb_info));\n \n-\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_dcb_info, -ENOTSUP);\n+\tRTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->get_dcb_info, -ENOTSUP);\n \treturn (*dev->dev_ops->get_dcb_info)(dev, dcb_info);\n }\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/4"
    ]
}