get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41244,
    "url": "http://patchwork.dpdk.org/api/patches/41244/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180619010457.61490-2-ferruh.yigit@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20180619010457.61490-2-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180619010457.61490-2-ferruh.yigit@intel.com",
    "date": "2018-06-19T01:04:56",
    "name": "[v4,2/3] ethdev: convert static logtype usage to dynamic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ff78d2630f4cedcdfa3a0cd4fa0bb6089fcb07b1",
    "submitter": {
        "id": 324,
        "url": "http://patchwork.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180619010457.61490-2-ferruh.yigit@intel.com/mbox/",
    "series": [
        {
            "id": 159,
            "url": "http://patchwork.dpdk.org/api/series/159/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=159",
            "date": "2018-06-19T01:04:55",
            "name": "[v4,1/3] ethdev: move log macro to header",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/159/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/41244/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/41244/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 D236F2BF3;\n\tTue, 19 Jun 2018 02:05:25 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id DF3B02BAF\n\tfor <dev@dpdk.org>; Tue, 19 Jun 2018 02:05:22 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Jun 2018 17:05:22 -0700",
            "from silpixa00399752.ir.intel.com (HELO\n\tsilpixa00399752.ger.corp.intel.com) ([10.237.222.212])\n\tby orsmga003.jf.intel.com with ESMTP; 18 Jun 2018 17:05:20 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,241,1526367600\"; d=\"scan'208\";a=\"60275261\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>",
        "Cc": "dev@dpdk.org,\n\tFerruh Yigit <ferruh.yigit@intel.com>",
        "Date": "Tue, 19 Jun 2018 02:04:56 +0100",
        "Message-Id": "<20180619010457.61490-2-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20180619010457.61490-1-ferruh.yigit@intel.com>",
        "References": "<20180514155648.81149-1-ferruh.yigit@intel.com>\n\t<20180619010457.61490-1-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 2/3] ethdev: convert static logtype usage to\n\tdynamic",
        "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": "Replace RTE_PMD_DEBUG_TRACE with RTE_ETHDEV_LOG.\n\nRTE_PMD_DEBUG_TRACE is using hardcoded PMD logtype and ERR log level,\ncontrolled by compile time flags.\nRTE_ETHDEV_LOG is using dynamic ethdev_logtype.\n\nAlso a few minor cleanups, like\n- use %u for unsigned values like port_id which is uint16_t\n- use PRIx64 for owner_id\n- Join some log lines\n- Unify to not have a \".\" at the end of the log\n- Unify log start with uppercase\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nv3:\n* rebase\n* Start (almost) all logs with uppercase\n\nv4:\n* update header file static log function usage too\n---\n lib/librte_ethdev/rte_ethdev.c     | 392 ++++++++++++++---------------\n lib/librte_ethdev/rte_ethdev.h     |  12 +-\n lib/librte_ethdev/rte_ethdev_pci.h |   4 +-\n 3 files changed, 202 insertions(+), 206 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 2f696bfa9..97f2c6af7 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -345,8 +345,8 @@ rte_eth_dev_attach_secondary(const char *name)\n \t\t\tbreak;\n \t}\n \tif (i == RTE_MAX_ETHPORTS) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t\t\"device %s is not driven by the primary process\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Device %s is not driven by the primary process\\n\",\n \t\t\tname);\n \t} else {\n \t\teth_dev = eth_dev_get(i);\n@@ -393,7 +393,8 @@ rte_eth_is_valid_owner_id(uint64_t owner_id)\n {\n \tif (owner_id == RTE_ETH_DEV_NO_OWNER ||\n \t    rte_eth_dev_shared_data->next_owner_id <= owner_id) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid owner_id=%016\"PRIX64\".\\n\", owner_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid owner_id=%016\"PRIx64\"\\n\",\n+\t\t\towner_id);\n \t\treturn 0;\n \t}\n \treturn 1;\n@@ -436,7 +437,8 @@ _rte_eth_dev_owner_set(const uint16_t port_id, const uint64_t old_owner_id,\n \tint sret;\n \n \tif (port_id >= RTE_MAX_ETHPORTS || !is_allocated(ethdev)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Port id %\"PRIu16\" is not allocated.\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port id %\"PRIu16\" is not allocated\\n\",\n+\t\t\tport_id);\n \t\treturn -ENODEV;\n \t}\n \n@@ -446,22 +448,22 @@ _rte_eth_dev_owner_set(const uint16_t port_id, const uint64_t old_owner_id,\n \n \tport_owner = &rte_eth_devices[port_id].data->owner;\n \tif (port_owner->id != old_owner_id) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Cannot set owner to port %d already owned\"\n-\t\t\t\t    \" by %s_%016\"PRIX64\".\\n\", port_id,\n-\t\t\t\t    port_owner->name, port_owner->id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Cannot set owner to port %u already owned by %s_%016\"PRIX64\"\\n\",\n+\t\t\tport_id, port_owner->name, port_owner->id);\n \t\treturn -EPERM;\n \t}\n \n \tsret = snprintf(port_owner->name, RTE_ETH_MAX_OWNER_NAME_LEN, \"%s\",\n \t\t\tnew_owner->name);\n \tif (sret < 0 || sret >= RTE_ETH_MAX_OWNER_NAME_LEN)\n-\t\tRTE_PMD_DEBUG_TRACE(\"Port %d owner name was truncated.\\n\",\n-\t\t\t\t    port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port %u owner name was truncated\\n\",\n+\t\t\tport_id);\n \n \tport_owner->id = new_owner->id;\n \n-\tRTE_PMD_DEBUG_TRACE(\"Port %d owner is %s_%016\"PRIX64\".\\n\", port_id,\n-\t\t\t    new_owner->name, new_owner->id);\n+\tRTE_ETHDEV_LOG(ERR, \"Port %u owner is %s_%016\"PRIx64\"\\n\",\n+\t\tport_id, new_owner->name, new_owner->id);\n \n \treturn 0;\n }\n@@ -513,8 +515,9 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)\n \t\t\tif (rte_eth_devices[port_id].data->owner.id == owner_id)\n \t\t\t\tmemset(&rte_eth_devices[port_id].data->owner, 0,\n \t\t\t\t       sizeof(struct rte_eth_dev_owner));\n-\t\tRTE_PMD_DEBUG_TRACE(\"All port owners owned by %016\"PRIX64\n-\t\t\t\t\" identifier have removed.\\n\", owner_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"All port owners owned by %016\"PRIx64\" identifier have removed\\n\",\n+\t\t\towner_id);\n \t}\n \n \trte_spinlock_unlock(&rte_eth_dev_shared_data->ownership_lock);\n@@ -531,7 +534,8 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)\n \trte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);\n \n \tif (port_id >= RTE_MAX_ETHPORTS || !is_allocated(ethdev)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Port id %\"PRIu16\" is not allocated.\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port id %\"PRIu16\" is not allocated\\n\",\n+\t\t\tport_id);\n \t\tret = -ENODEV;\n \t} else {\n \t\trte_memcpy(owner, &ethdev->data->owner, sizeof(*owner));\n@@ -595,7 +599,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n \tif (name == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Null pointer is specified\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -612,7 +616,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)\n \tuint32_t pid;\n \n \tif (name == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Null pointer is specified\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Null pointer is specified\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -698,7 +702,7 @@ rte_eth_dev_detach(uint16_t port_id, char *name __rte_unused)\n \tdev_flags = rte_eth_devices[port_id].data->dev_flags;\n \tif (dev_flags & RTE_ETH_DEV_BONDED_SLAVE) {\n \t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Port %\" PRIu16 \" is bonded, cannot detach\\n\", port_id);\n+\t\t\t\"Port %\"PRIu16\" is bonded, cannot detach\\n\", port_id);\n \t\treturn -ENOTSUP;\n \t}\n \n@@ -777,21 +781,22 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)\n \n \tdev = &rte_eth_devices[port_id];\n \tif (!dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t    \"port %d must be started before start any queue\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port %u must be started before start any queue\\n\",\n+\t\t\tport_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_start, -ENOTSUP);\n \n \tif (dev->data->rx_queue_state[rx_queue_id] != RTE_ETH_QUEUE_STATE_STOPPED) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Queue %\" PRIu16\" of device with port_id=%\" PRIu8\n-\t\t\t\" already started\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Queue %\"PRIu16\" of device with port_id=%\"PRIu16\" already started\\n\",\n \t\t\trx_queue_id, port_id);\n \t\treturn 0;\n \t}\n@@ -810,15 +815,15 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)\n \n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_stop, -ENOTSUP);\n \n \tif (dev->data->rx_queue_state[rx_queue_id] == RTE_ETH_QUEUE_STATE_STOPPED) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Queue %\" PRIu16\" of device with port_id=%\" PRIu8\n-\t\t\t\" already stopped\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Queue %\"PRIu16\" of device with port_id=%\"PRIu16\" already stopped\\n\",\n \t\t\trx_queue_id, port_id);\n \t\treturn 0;\n \t}\n@@ -836,28 +841,27 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)\n \n \tdev = &rte_eth_devices[port_id];\n \tif (!dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t    \"port %d must be started before start any queue\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port %u must be started before start any queue\\n\",\n+\t\t\tport_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_start, -ENOTSUP);\n \n \tif (dev->data->tx_queue_state[tx_queue_id] != RTE_ETH_QUEUE_STATE_STOPPED) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Queue %\" PRIu16\" of device with port_id=%\" PRIu8\n-\t\t\t\" already started\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Queue %\"PRIu16\" of device with port_id=%\"PRIu16\" already started\\n\",\n \t\t\ttx_queue_id, port_id);\n \t\treturn 0;\n \t}\n \n-\treturn eth_err(port_id, dev->dev_ops->tx_queue_start(dev,\n-\t\t\t\t\t\t\t     tx_queue_id));\n-\n+\treturn eth_err(port_id, dev->dev_ops->tx_queue_start(dev, tx_queue_id));\n }\n \n int\n@@ -869,15 +873,15 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)\n \n \tdev = &rte_eth_devices[port_id];\n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_stop, -ENOTSUP);\n \n \tif (dev->data->tx_queue_state[tx_queue_id] == RTE_ETH_QUEUE_STATE_STOPPED) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Queue %\" PRIu16\" of device with port_id=%\" PRIu8\n-\t\t\t\" already stopped\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Queue %\"PRIu16\" of device with port_id=%\"PRIu16\" already stopped\\n\",\n \t\t\ttx_queue_id, port_id);\n \t\treturn 0;\n \t}\n@@ -1070,22 +1074,23 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t}\n \n \tif (nb_rx_q > RTE_MAX_QUEUES_PER_PORT) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n+\t\tRTE_ETHDEV_LOG(ERR,\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\tRTE_PMD_DEBUG_TRACE(\n+\t\tRTE_ETHDEV_LOG(ERR,\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 \t}\n \n \tif (dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port %u must be stopped to allow configuration\\n\",\n+\t\t\tport_id);\n \t\treturn -EBUSY;\n \t}\n \n@@ -1106,28 +1111,28 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t * configured device.\n \t */\n \tif (nb_rx_q > dev_info.max_rx_queues) {\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\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%u nb_rx_queues=%u > %u\\n\",\n+\t\t\tport_id, nb_rx_q, dev_info.max_rx_queues);\n \t\treturn -EINVAL;\n \t}\n \n \tif (nb_tx_q > dev_info.max_tx_queues) {\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\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%u nb_tx_queues=%u > %u\\n\",\n+\t\t\tport_id, nb_tx_q, dev_info.max_tx_queues);\n \t\treturn -EINVAL;\n \t}\n \n \t/* Check that the device supports requested interrupts */\n \tif ((dev_conf->intr_conf.lsc == 1) &&\n-\t\t(!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC))) {\n-\t\t\tRTE_PMD_DEBUG_TRACE(\"driver %s does not support lsc\\n\",\n-\t\t\t\t\tdev->device->driver->name);\n-\t\t\treturn -EINVAL;\n+\t\t\t(!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC))) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Driver %s does not support lsc\\n\",\n+\t\t\tdev->device->driver->name);\n+\t\treturn -EINVAL;\n \t}\n \tif ((dev_conf->intr_conf.rmv == 1) &&\n-\t    (!(dev->data->dev_flags & RTE_ETH_DEV_INTR_RMV))) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"driver %s does not support rmv\\n\",\n-\t\t\t\t    dev->device->driver->name);\n+\t\t\t(!(dev->data->dev_flags & RTE_ETH_DEV_INTR_RMV))) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Driver %s does not support rmv\\n\",\n+\t\t\tdev->device->driver->name);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1136,19 +1141,16 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t * length is supported by the configured device.\n \t */\n \tif (local_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {\n-\t\tif (dev_conf->rxmode.max_rx_pkt_len >\n-\t\t    dev_info.max_rx_pktlen) {\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\tif (dev_conf->rxmode.max_rx_pkt_len > dev_info.max_rx_pktlen) {\n+\t\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"Ethdev port_id=%u max_rx_pkt_len %u > max valid value %u\\n\",\n+\t\t\t\tport_id, dev_conf->rxmode.max_rx_pkt_len,\n+\t\t\t\tdev_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\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+\t\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"Ethdev port_id=%u max_rx_pkt_len %u < min valid value %u\\n\",\n+\t\t\t\tport_id, dev_conf->rxmode.max_rx_pkt_len,\n \t\t\t\t(unsigned)ETHER_MIN_LEN);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -1163,24 +1165,22 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t/* Any requested offloading must be within its device capabilities */\n \tif ((local_conf.rxmode.offloads & dev_info.rx_offload_capa) !=\n \t     local_conf.rxmode.offloads) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"ethdev port_id=%d requested Rx offloads \"\n-\t\t\t\t\"0x%\" PRIx64 \" doesn't match Rx offloads \"\n-\t\t\t\t\"capabilities 0x%\" PRIx64 \" in %s()\\n\",\n-\t\t\t\tport_id,\n-\t\t\t\tlocal_conf.rxmode.offloads,\n-\t\t\t\tdev_info.rx_offload_capa,\n-\t\t\t\t__func__);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%u requested Rx offloads 0x%\"PRIx64\" doesn't match Rx offloads \"\n+\t\t\t\"capabilities 0x%\"PRIx64\" in %s()\\n\",\n+\t\t\tport_id, local_conf.rxmode.offloads,\n+\t\t\tdev_info.rx_offload_capa,\n+\t\t\t__func__);\n \t\treturn -EINVAL;\n \t}\n \tif ((local_conf.txmode.offloads & dev_info.tx_offload_capa) !=\n \t     local_conf.txmode.offloads) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"ethdev port_id=%d requested Tx offloads \"\n-\t\t\t\t\"0x%\" PRIx64 \" doesn't match Tx offloads \"\n-\t\t\t\t\"capabilities 0x%\" PRIx64 \" in %s()\\n\",\n-\t\t\t\tport_id,\n-\t\t\t\tlocal_conf.txmode.offloads,\n-\t\t\t\tdev_info.tx_offload_capa,\n-\t\t\t\t__func__);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%u requested Tx offloads 0x%\"PRIx64\" doesn't match Tx offloads \"\n+\t\t\t\"capabilities 0x%\"PRIx64\" in %s()\\n\",\n+\t\t\tport_id, local_conf.txmode.offloads,\n+\t\t\tdev_info.tx_offload_capa,\n+\t\t\t__func__);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1188,11 +1188,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \tif ((dev_info.flow_type_rss_offloads |\n \t     dev_conf->rx_adv_conf.rss_conf.rss_hf) !=\n \t    dev_info.flow_type_rss_offloads) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d invalid rss_hf: \"\n-\t\t\t\t    \"0x%\"PRIx64\", valid value: 0x%\"PRIx64\"\\n\",\n-\t\t\t\t    port_id,\n-\t\t\t\t    dev_conf->rx_adv_conf.rss_conf.rss_hf,\n-\t\t\t\t    dev_info.flow_type_rss_offloads);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%u invalid rss_hf: 0x%\"PRIx64\", valid value: 0x%\"PRIx64\"\\n\",\n+\t\t\tport_id, dev_conf->rx_adv_conf.rss_conf.rss_hf,\n+\t\t\tdev_info.flow_type_rss_offloads);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1201,23 +1200,25 @@ rte_eth_dev_configure(uint16_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\tRTE_PMD_DEBUG_TRACE(\"port%d rte_eth_dev_rx_queue_config = %d\\n\",\n-\t\t\t\tport_id, diag);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port%u rte_eth_dev_rx_queue_config = %d\\n\",\n+\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\tRTE_PMD_DEBUG_TRACE(\"port%d rte_eth_dev_tx_queue_config = %d\\n\",\n-\t\t\t\tport_id, diag);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port%u rte_eth_dev_tx_queue_config = %d\\n\",\n+\t\t\tport_id, diag);\n \t\trte_eth_dev_rx_queue_config(dev, 0);\n \t\treturn diag;\n \t}\n \n \tdiag = (*dev->dev_ops->dev_configure)(dev);\n \tif (diag != 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port%d dev_configure = %d\\n\",\n-\t\t\t\tport_id, diag);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port%u dev_configure = %d\\n\",\n+\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 \t\treturn eth_err(port_id, diag);\n@@ -1226,8 +1227,8 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t/* Initialize Rx profiling if enabled at compilation time. */\n \tdiag = __rte_eth_profile_rx_init(port_id, dev);\n \tif (diag != 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port%d __rte_eth_profile_rx_init = %d\\n\",\n-\t\t\t\tport_id, diag);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port%u __rte_eth_profile_rx_init = %d\\n\",\n+\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 \t\treturn eth_err(port_id, diag);\n@@ -1240,8 +1241,7 @@ void\n _rte_eth_dev_reset(struct rte_eth_dev *dev)\n {\n \tif (dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t\t\"port %d must be stopped to allow reset\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port %u must be stopped to allow reset\\n\",\n \t\t\tdev->data->port_id);\n \t\treturn;\n \t}\n@@ -1320,8 +1320,8 @@ rte_eth_dev_start(uint16_t port_id)\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);\n \n \tif (dev->data->dev_started != 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu16\n-\t\t\t\" already started\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Device with port_id=%\"PRIu16\" already started\\n\",\n \t\t\tport_id);\n \t\treturn 0;\n \t}\n@@ -1352,8 +1352,8 @@ rte_eth_dev_stop(uint16_t port_id)\n \tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);\n \n \tif (dev->data->dev_started == 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Device with port_id=%\" PRIu16\n-\t\t\t\" already stopped\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Device with port_id=%\"PRIu16\" already stopped\\n\",\n \t\t\tport_id);\n \t\treturn;\n \t}\n@@ -1465,7 +1465,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1479,23 +1479,20 @@ rte_eth_rx_queue_setup(uint16_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\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\tRTE_ETHDEV_LOG(ERR, \"%s private_data_size %d < %d\\n\",\n+\t\t\tmp->name, (int)mp->private_data_size,\n+\t\t\t(int)sizeof(struct rte_pktmbuf_pool_private));\n \t\treturn -ENOSPC;\n \t}\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\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-\t\t\t\t(int)mbp_buf_size,\n-\t\t\t\t(int)(RTE_PKTMBUF_HEADROOM +\n-\t\t\t\t      dev_info.min_rx_bufsize),\n-\t\t\t\t(int)RTE_PKTMBUF_HEADROOM,\n-\t\t\t\t(int)dev_info.min_rx_bufsize);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"%s mbuf_data_room_size %d < %d (RTE_PKTMBUF_HEADROOM=%d + min_rx_bufsize(dev)=%d)\\n\",\n+\t\t\tmp->name, (int)mbp_buf_size,\n+\t\t\t(int)(RTE_PKTMBUF_HEADROOM + dev_info.min_rx_bufsize),\n+\t\t\t(int)RTE_PKTMBUF_HEADROOM,\n+\t\t\t(int)dev_info.min_rx_bufsize);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1511,10 +1508,9 @@ rte_eth_rx_queue_setup(uint16_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\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+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Invalid value for nb_rx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\\n\",\n+\t\t\tnb_rx_desc, dev_info.rx_desc_lim.nb_max,\n \t\t\tdev_info.rx_desc_lim.nb_min,\n \t\t\tdev_info.rx_desc_lim.nb_align);\n \t\treturn -EINVAL;\n@@ -1571,15 +1567,12 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t */\n \tif ((local_conf.offloads & dev_info.rx_queue_offload_capa) !=\n \t     local_conf.offloads) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%d rx_queue_id=%d, new \"\n-\t\t\t\t\"added offloads 0x%\" PRIx64 \" must be \"\n-\t\t\t\t\"within pre-queue offload capabilities 0x%\"\n-\t\t\t\tPRIx64 \" in %s()\\n\",\n-\t\t\t\tport_id,\n-\t\t\t\trx_queue_id,\n-\t\t\t\tlocal_conf.offloads,\n-\t\t\t\tdev_info.rx_queue_offload_capa,\n-\t\t\t\t__func__);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%d rx_queue_id=%d, new added offloads 0x%\"PRIx64\" must be \"\n+\t\t\t\"within pre-queue offload capabilities 0x%\"PRIx64\" in %s()\\n\",\n+\t\t\tport_id, rx_queue_id, local_conf.offloads,\n+\t\t\tdev_info.rx_queue_offload_capa,\n+\t\t\t__func__);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1657,7 +1650,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (tx_queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", tx_queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", tx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1676,12 +1669,11 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \tif (nb_tx_desc > dev_info.tx_desc_lim.nb_max ||\n \t    nb_tx_desc < dev_info.tx_desc_lim.nb_min ||\n \t    nb_tx_desc % dev_info.tx_desc_lim.nb_align != 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid value for nb_tx_desc(=%hu), \"\n-\t\t\t\t\"should be: <= %hu, = %hu, and a product of %hu\\n\",\n-\t\t\t\tnb_tx_desc,\n-\t\t\t\tdev_info.tx_desc_lim.nb_max,\n-\t\t\t\tdev_info.tx_desc_lim.nb_min,\n-\t\t\t\tdev_info.tx_desc_lim.nb_align);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Invalid value for nb_tx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\\n\",\n+\t\t\tnb_tx_desc, dev_info.tx_desc_lim.nb_max,\n+\t\t\tdev_info.tx_desc_lim.nb_min,\n+\t\t\tdev_info.tx_desc_lim.nb_align);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1736,15 +1728,12 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \t */\n \tif ((local_conf.offloads & dev_info.tx_queue_offload_capa) !=\n \t     local_conf.offloads) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%d tx_queue_id=%d, new \"\n-\t\t\t\t\"added offloads 0x%\" PRIx64 \" must be \"\n-\t\t\t\t\"within pre-queue offload capabilities 0x%\"\n-\t\t\t\tPRIx64 \" in %s()\\n\",\n-\t\t\t\tport_id,\n-\t\t\t\ttx_queue_id,\n-\t\t\t\tlocal_conf.offloads,\n-\t\t\t\tdev_info.tx_queue_offload_capa,\n-\t\t\t\t__func__);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%d tx_queue_id=%d, new added offloads 0x%\"PRIx64\" must be \"\n+\t\t\t\"within pre-queue offload capabilities 0x%\"PRIx64\" in %s()\\n\",\n+\t\t\tport_id, tx_queue_id, local_conf.offloads,\n+\t\t\tdev_info.tx_queue_offload_capa,\n+\t\t\t__func__);\n \t\treturn -EINVAL;\n \t}\n \n@@ -2009,19 +1998,19 @@ rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tif (!id) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Error: id pointer is NULL\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Id pointer is NULL\\n\");\n \t\treturn -ENOMEM;\n \t}\n \n \tif (!xstat_name) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Error: xstat_name pointer is NULL\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"xstat_name pointer is NULL\\n\");\n \t\treturn -ENOMEM;\n \t}\n \n \t/* Get count */\n \tcnt_xstats = rte_eth_xstats_get_names_by_id(port_id, NULL, 0, NULL);\n \tif (cnt_xstats  < 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Error: Cannot get count of xstats\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Cannot get count of xstats\\n\");\n \t\treturn -ENODEV;\n \t}\n \n@@ -2030,7 +2019,7 @@ rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,\n \n \tif (cnt_xstats != rte_eth_xstats_get_names_by_id(\n \t\t\tport_id, xstats_names, cnt_xstats, NULL)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Error: Cannot get xstats lookup\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Cannot get xstats lookup\\n\");\n \t\treturn -1;\n \t}\n \n@@ -2153,7 +2142,7 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,\n \t\tsizeof(struct rte_eth_xstat_name));\n \n \tif (!xstats_names_copy) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"ERROR: can't allocate memory\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Can't allocate memory\\n\");\n \t\treturn -ENOMEM;\n \t}\n \n@@ -2181,7 +2170,7 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,\n \t/* Filter stats */\n \tfor (i = 0; i < size; i++) {\n \t\tif (ids[i] >= expected_entries) {\n-\t\t\tRTE_PMD_DEBUG_TRACE(\"ERROR: id value isn't valid\\n\");\n+\t\t\tRTE_ETHDEV_LOG(ERR, \"Id value isn't valid\\n\");\n \t\t\tfree(xstats_names_copy);\n \t\t\treturn -1;\n \t\t}\n@@ -2366,7 +2355,7 @@ rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,\n \t/* Filter stats */\n \tfor (i = 0; i < size; i++) {\n \t\tif (ids[i] >= expected_entries) {\n-\t\t\tRTE_PMD_DEBUG_TRACE(\"ERROR: id value isn't valid\\n\");\n+\t\t\tRTE_ETHDEV_LOG(ERR, \"Id value isn't valid\\n\");\n \t\t\treturn -1;\n \t\t}\n \t\tvalues[i] = xstats[ids[i]].value;\n@@ -2598,13 +2587,14 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)\n \tdev = &rte_eth_devices[port_id];\n \tif (!(dev->data->dev_conf.rxmode.offloads &\n \t      DEV_RX_OFFLOAD_VLAN_FILTER)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port %d: vlan-filtering disabled\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port %u: vlan-filtering disabled\\n\",\n+\t\t\tport_id);\n \t\treturn -ENOSYS;\n \t}\n \n \tif (vlan_id > 4095) {\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\tRTE_ETHDEV_LOG(ERR, \"Port_id=%u invalid vlan_id=%u > 4095\\n\",\n+\t\t\tport_id, vlan_id);\n \t\treturn -EINVAL;\n \t}\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_filter_set, -ENOTSUP);\n@@ -2637,7 +2627,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,\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\tRTE_PMD_DEBUG_TRACE(\"Invalid rx_queue_id=%d\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid rx_queue_id=%u\\n\", rx_queue_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -2786,7 +2776,7 @@ rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)\n \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\tRTE_PMD_DEBUG_TRACE(\"Invalid send_xon, only 0/1 allowed\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid send_xon, only 0/1 allowed\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -2803,7 +2793,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (pfc_conf->priority > (ETH_DCB_NUM_USER_PRIORITIES - 1)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid priority, only 0-7 allowed\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid priority, only 0-7 allowed\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -2844,7 +2834,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\tRTE_PMD_DEBUG_TRACE(\"No receive queue is available\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"No receive queue is available\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -2853,8 +2843,9 @@ 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\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"reta_conf[%u]->reta[%u]: %u exceeds the maximum rxq index: %u\\n\",\n+\t\t\t\tidx, shift,\n \t\t\t\treta_conf[idx].reta[shift], max_rxq);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -2923,11 +2914,10 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,\n \trte_eth_dev_info_get(port_id, &dev_info);\n \tif ((dev_info.flow_type_rss_offloads | rss_conf->rss_hf) !=\n \t    dev_info.flow_type_rss_offloads) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"ethdev port_id=%d invalid rss_hf: \"\n-\t\t\t\t    \"0x%\"PRIx64\", valid value: 0x%\"PRIx64\"\\n\",\n-\t\t\t\t    port_id,\n-\t\t\t\t    rss_conf->rss_hf,\n-\t\t\t\t    dev_info.flow_type_rss_offloads);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%u invalid rss_hf: 0x%\"PRIx64\", valid value: 0x%\"PRIx64\"\\n\",\n+\t\t\tport_id, rss_conf->rss_hf,\n+\t\t\tdev_info.flow_type_rss_offloads);\n \t\treturn -EINVAL;\n \t}\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP);\n@@ -2956,12 +2946,12 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (udp_tunnel == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid udp_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -2981,12 +2971,12 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,\n \tdev = &rte_eth_devices[port_id];\n \n \tif (udp_tunnel == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid udp_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -3054,12 +3044,12 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *addr,\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_add, -ENOTSUP);\n \n \tif (is_zero_ether_addr(addr)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port %u: 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\tRTE_PMD_DEBUG_TRACE(\"pool id must be 0-%d\\n\", ETH_64_POOLS - 1);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Pool id must be 0-%d\\n\", ETH_64_POOLS - 1);\n \t\treturn -EINVAL;\n \t}\n \n@@ -3067,7 +3057,7 @@ rte_eth_dev_mac_addr_add(uint16_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\tRTE_PMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n+\t\t\tRTE_ETHDEV_LOG(ERR, \"Port %u: MAC address array full\\n\",\n \t\t\t\tport_id);\n \t\t\treturn -ENOSPC;\n \t\t}\n@@ -3105,7 +3095,9 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *addr)\n \n \tindex = get_mac_addr_index(port_id, addr);\n \tif (index == 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot remove default MAC address\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port %u: Cannot remove default MAC address\\n\",\n+\t\t\tport_id);\n \t\treturn -EADDRINUSE;\n \t} else if (index < 0)\n \t\treturn 0;  /* Do nothing if address wasn't found */\n@@ -3182,7 +3174,7 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (is_zero_ether_addr(addr)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"port %d: Cannot add NULL MAC address\\n\",\n+\t\tRTE_ETHDEV_LOG(ERR, \"Port %u: Cannot add NULL MAC address\\n\",\n \t\t\tport_id);\n \t\treturn -EINVAL;\n \t}\n@@ -3194,15 +3186,16 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,\n \n \tif (index < 0) {\n \t\tif (!on) {\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"Port %u: the MAC address was not set in UTA\\n\",\n+\t\t\t\tport_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\tRTE_PMD_DEBUG_TRACE(\"port %d: MAC address array full\\n\",\n-\t\t\t\t\tport_id);\n+\t\t\tRTE_ETHDEV_LOG(ERR, \"Port %u: MAC address array full\\n\",\n+\t\t\t\tport_id);\n \t\t\treturn -ENOSPC;\n \t\t}\n \t}\n@@ -3250,14 +3243,15 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \tlink = dev->data->dev_link;\n \n \tif (queue_idx > dev_info.max_tx_queues) {\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Set queue rate limit:port %u: invalid queue id=%u\\n\",\n+\t\t\tport_id, queue_idx);\n \t\treturn -EINVAL;\n \t}\n \n \tif (tx_rate > link.link_speed) {\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Set queue rate limit:invalid tx_rate=%u, bigger than link speed= %d\\n\",\n \t\t\ttx_rate, link.link_speed);\n \t\treturn -EINVAL;\n \t}\n@@ -3276,26 +3270,28 @@ rte_eth_mirror_rule_set(uint16_t port_id,\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (mirror_conf->rule_type == 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"mirror rule type can not be 0.\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"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\tRTE_PMD_DEBUG_TRACE(\"Invalid dst pool, pool id must be 0-%d\\n\",\n-\t\t\t\tETH_64_POOLS - 1);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid dst pool, pool id must be 0-%d\\n\",\n+\t\t\tETH_64_POOLS - 1);\n \t\treturn -EINVAL;\n \t}\n \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\tRTE_PMD_DEBUG_TRACE(\"Invalid mirror pool, pool mask can not be 0.\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"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\tRTE_PMD_DEBUG_TRACE(\"Invalid vlan mask, vlan mask can not be 0.\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Invalid vlan mask, vlan mask can not be 0\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -3499,13 +3495,13 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)\n \tdev = &rte_eth_devices[port_id];\n \n \tif (!dev->intr_handle) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr handle unset\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"RX Intr handle unset\\n\");\n \t\treturn -ENOTSUP;\n \t}\n \n \tintr_handle = dev->intr_handle;\n \tif (!intr_handle->intr_vec) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"RX Intr vector unset\\n\");\n \t\treturn -EPERM;\n \t}\n \n@@ -3513,9 +3509,9 @@ rte_eth_dev_rx_intr_ctl(uint16_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\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"p %u q %u rx ctl error op %d epfd %d vec %u\\n\",\n+\t\t\t\tport_id, qid, op, epfd, vec);\n \t\t}\n \t}\n \n@@ -3650,27 +3646,27 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%u\\n\", queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n \tif (!dev->intr_handle) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr handle unset\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"RX Intr handle unset\\n\");\n \t\treturn -ENOTSUP;\n \t}\n \n \tintr_handle = dev->intr_handle;\n \tif (!intr_handle->intr_vec) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"RX Intr vector unset\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"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\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\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"p %u q %u rx ctl error op %d epfd %d vec %u\\n\",\n+\t\t\tport_id, queue_id, op, epfd, vec);\n \t\treturn rc;\n \t}\n \n@@ -3937,7 +3933,7 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_rx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -3962,7 +3958,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -4179,12 +4175,12 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tif (l2_tunnel == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid l2_tunnel parameter\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid l2_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (l2_tunnel->l2_tunnel_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -4206,17 +4202,17 @@ rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \n \tif (l2_tunnel == NULL) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid l2_tunnel parameter\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid l2_tunnel parameter\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (l2_tunnel->l2_tunnel_type >= RTE_TUNNEL_TYPE_MAX) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type.\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid tunnel type\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (mask == 0) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Mask should have a value.\\n\");\n+\t\tRTE_ETHDEV_LOG(ERR, \"Mask should have a value\\n\");\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 24f4b93b7..5760f45d3 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1199,14 +1199,14 @@ struct rte_eth_dcb_info {\n /* Macros to check for valid port */\n #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \\\n \tif (!rte_eth_dev_is_valid_port(port_id)) { \\\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid port_id=%u\\n\", port_id); \\\n \t\treturn retval; \\\n \t} \\\n } while (0)\n \n #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \\\n \tif (!rte_eth_dev_is_valid_port(port_id)) { \\\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id); \\\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid port_id=%u\\n\", port_id); \\\n \t\treturn; \\\n \t} \\\n } while (0)\n@@ -3842,7 +3842,7 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\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_PMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid RX queue_id=%u\\n\", queue_id);\n \t\treturn 0;\n \t}\n #endif\n@@ -4108,7 +4108,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\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_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n \t\treturn 0;\n \t}\n #endif\n@@ -4194,7 +4194,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX port_id=%d\\n\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX port_id=%u\\n\", port_id);\n \t\trte_errno = -EINVAL;\n \t\treturn 0;\n \t}\n@@ -4204,7 +4204,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n \n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \tif (queue_id >= dev->data->nb_tx_queues) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\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}\ndiff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h\nindex 2cfd37274..f652596f4 100644\n--- a/lib/librte_ethdev/rte_ethdev_pci.h\n+++ b/lib/librte_ethdev/rte_ethdev_pci.h\n@@ -53,8 +53,8 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,\n \tstruct rte_pci_device *pci_dev)\n {\n \tif ((eth_dev == NULL) || (pci_dev == NULL)) {\n-\t\tRTE_PMD_DEBUG_TRACE(\"NULL pointer eth_dev=%p pci_dev=%p\\n\",\n-\t\t\t\teth_dev, pci_dev);\n+\t\tRTE_ETHDEV_LOG(ERR, \"NULL pointer eth_dev=%p pci_dev=%p\",\n+\t\t\t(void *)eth_dev, (void *)pci_dev);\n \t\treturn;\n \t}\n \n",
    "prefixes": [
        "v4",
        "2/3"
    ]
}