Show a patch.

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

{
    "id": 414,
    "url": "https://patches.dpdk.org/api/patches/414/",
    "web_url": "https://patches.dpdk.org/patch/414/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1410961612-8571-18-git-send-email-david.marchand@6wind.com>",
    "date": "2014-09-17T13:46:49",
    "name": "[dpdk-dev,v3,17/20] e1000: clean log messages",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1c1a6691619980e439bb3eee681a03ee28cb2749",
    "submitter": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/people/3/",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/414/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/414/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/414/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=S2d3zrWf7GHAHomAHpg6zF9jXTrk6NtA+4+02KST0DY=;\n\tb=I/zNZK1H64pXwPBvadZKDv9QTndhWQH403hNSYhAjKhG/Nyh36siCuka1KXnaUEmcb\n\t2v8ABtGpXUbu4nBUn4jTNY5YrjajDqcYfL/0CB/muvWfYWMCqXSVAow39e5zjU1sHzH7\n\tV/OPD3p1ftp+yuTjZqySqXs0axA/9w+c7mm1D0dbB/OcCcO56pAdCNNhW5W1Jz2TgPPe\n\t77zWZvKvFgosQZp7bIJKnkeHyqeICC4QDBoV6jHnHQ87jUcpRJzN3TlCbC3oafnEFPGw\n\tMlwHn8EtPcXqIjZevtD78C8u+FbHXKu4sbSqbQD9EGhEEwsZubSuXhwo+vzyK+VyIFde\n\tPHww==",
        "In-Reply-To": "<1410961612-8571-1-git-send-email-david.marchand@6wind.com>",
        "Precedence": "list",
        "Date": "Wed, 17 Sep 2014 15:46:49 +0200",
        "References": "<1410961612-8571-1-git-send-email-david.marchand@6wind.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "X-Gm-Message-State": "ALoCoQlzDLLZRbkIQUQJkxiSe4FBmjqhbWfrEbz4Z5ztMAfFhdfKXtIOo7yy0dQkzjgbDaBE1dC2",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 7D4C0B3EC;\n\tWed, 17 Sep 2014 15:41:53 +0200 (CEST)",
            "from mail-we0-f177.google.com (mail-we0-f177.google.com\n\t[74.125.82.177]) by dpdk.org (Postfix) with ESMTP id A9EF1B3B0\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 15:41:50 +0200 (CEST)",
            "by mail-we0-f177.google.com with SMTP id u57so1457644wes.22\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 06:47:31 -0700 (PDT)",
            "from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\tfa20sm5712872wic.1.2014.09.17.06.47.29 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 17 Sep 2014 06:47:31 -0700 (PDT)"
        ],
        "From": "David Marchand <david.marchand@6wind.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Message-Id": "<1410961612-8571-18-git-send-email-david.marchand@6wind.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v3 17/20] e1000: clean log messages",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Received": "by 10.194.108.73 with SMTP id hi9mr25040516wjb.88.1410961651829; \n\tWed, 17 Sep 2014 06:47:31 -0700 (PDT)",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "Clean log messages:\n- remove leading \\n in some messages,\n- remove trailing \\n in some messages,\n- split multi lines messages,\n- introduce PMD_INIT_FUNC_TRACE macro and use it instead of\n  PMD_INIT_LOG(DEBUG, \"some_func\")\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\nv2 Reviewed-by: Jay Rolette <rolette@infiniteio.com>\nv2 Acked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_pmd_e1000/e1000_logs.h |    4 +++-\n lib/librte_pmd_e1000/em_ethdev.c  |   31 ++++++++++++-------------\n lib/librte_pmd_e1000/em_rxtx.c    |   42 ++++++++++++++++-----------------\n lib/librte_pmd_e1000/igb_ethdev.c |   46 ++++++++++++++++++-------------------\n lib/librte_pmd_e1000/igb_rxtx.c   |   35 ++++++++++++++--------------\n 5 files changed, 78 insertions(+), 80 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_e1000/e1000_logs.h b/lib/librte_pmd_e1000/e1000_logs.h\nindex fe6e023..4dd7208 100644\n--- a/lib/librte_pmd_e1000/e1000_logs.h\n+++ b/lib/librte_pmd_e1000/e1000_logs.h\n@@ -37,8 +37,10 @@\n #ifdef RTE_LIBRTE_E1000_DEBUG_INIT\n #define PMD_INIT_LOG(level, fmt, args...) \\\n \tRTE_LOG(level, PMD, \"%s(): \" fmt \"\\n\", __func__, ## args)\n+#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, \" >>\")\n #else\n-#define PMD_INIT_LOG(level, fmt, args...) do { } while(0)\n+#define PMD_INIT_LOG(level, fmt, args...) do { } while (0)\n+#define PMD_INIT_FUNC_TRACE() do { } while (0)\n #endif\n \n #ifdef RTE_LIBRTE_E1000_DEBUG_RX\ndiff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c\nindex 71aee67..3f2897e 100644\n--- a/lib/librte_pmd_e1000/em_ethdev.c\n+++ b/lib/librte_pmd_e1000/em_ethdev.c\n@@ -272,7 +272,7 @@ eth_em_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t/* initialize the vfta */\n \tmemset(shadow_vfta, 0, sizeof(*shadow_vfta));\n \n-\tPMD_INIT_LOG(INFO, \"port_id %d vendorID=0x%x deviceID=0x%x\\n\",\n+\tPMD_INIT_LOG(INFO, \"port_id %d vendorID=0x%x deviceID=0x%x\",\n \t\t     eth_dev->data->port_id, pci_dev->id.vendor_id,\n \t\t     pci_dev->id.device_id);\n \n@@ -306,17 +306,17 @@ em_hw_init(struct e1000_hw *hw)\n \n \tdiag = hw->mac.ops.init_params(hw);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"MAC Initialization Error\\n\");\n+\t\tPMD_INIT_LOG(ERR, \"MAC Initialization Error\");\n \t\treturn diag;\n \t}\n \tdiag = hw->nvm.ops.init_params(hw);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"NVM Initialization Error\\n\");\n+\t\tPMD_INIT_LOG(ERR, \"NVM Initialization Error\");\n \t\treturn diag;\n \t}\n \tdiag = hw->phy.ops.init_params(hw);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"PHY Initialization Error\\n\");\n+\t\tPMD_INIT_LOG(ERR, \"PHY Initialization Error\");\n \t\treturn diag;\n \t}\n \t(void) e1000_get_bus_info(hw);\n@@ -390,11 +390,10 @@ eth_em_configure(struct rte_eth_dev *dev)\n \tstruct e1000_interrupt *intr =\n \t\tE1000_DEV_PRIVATE_TO_INTR(dev->data->dev_private);\n \n-\tPMD_INIT_LOG(DEBUG, \">>\");\n-\n+\tPMD_INIT_FUNC_TRACE();\n \tintr->flags |= E1000_FLAG_NEED_LINK_UPDATE;\n+\tPMD_INIT_FUNC_TRACE();\n \n-\tPMD_INIT_LOG(DEBUG, \"<<\");\n \treturn (0);\n }\n \n@@ -453,7 +452,7 @@ eth_em_start(struct rte_eth_dev *dev)\n \t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tint ret, mask;\n \n-\tPMD_INIT_LOG(DEBUG, \">>\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \teth_em_stop(dev);\n \n@@ -573,8 +572,8 @@ eth_em_start(struct rte_eth_dev *dev)\n \treturn (0);\n \n error_invalid_config:\n-\tPMD_INIT_LOG(ERR, \"Invalid link_speed/link_duplex (%u/%u) for port \"\n-\t\t     \"%u\\n\", dev->data->dev_conf.link_speed,\n+\tPMD_INIT_LOG(ERR, \"Invalid link_speed/link_duplex (%u/%u) for port %u\",\n+\t\t     dev->data->dev_conf.link_speed,\n \t\t     dev->data->dev_conf.link_duplex, dev->data->port_id);\n \tem_dev_clear_queues(dev);\n \treturn (-EINVAL);\n@@ -1296,12 +1295,12 @@ eth_em_interrupt_action(struct rte_eth_dev *dev)\n \tmemset(&link, 0, sizeof(link));\n \trte_em_dev_atomic_read_link_status(dev, &link);\n \tif (link.link_status) {\n-\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Up - speed %u Mbps - %s\\n\",\n+\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Up - speed %u Mbps - %s\",\n \t\t\t     dev->data->port_id, (unsigned)link.link_speed,\n \t\t\t     link.link_duplex == ETH_LINK_FULL_DUPLEX ?\n \t\t\t     \"full-duplex\" : \"half-duplex\");\n \t} else {\n-\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\\n\", dev->data->port_id);\n+\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\", dev->data->port_id);\n \t}\n \tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\",\n \t\t     dev->pci_dev->addr.domain, dev->pci_dev->addr.bus,\n@@ -1425,14 +1424,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \tif (fc_conf->autoneg != hw->mac.autoneg)\n \t\treturn -ENOTSUP;\n \trx_buf_size = em_get_rx_buffer_size(hw);\n-\tPMD_INIT_LOG(DEBUG, \"Rx packet buffer size = 0x%x \\n\", rx_buf_size);\n+\tPMD_INIT_LOG(DEBUG, \"Rx packet buffer size = 0x%x\", rx_buf_size);\n \n \t/* At least reserve one Ethernet frame for watermark */\n \tmax_high_water = rx_buf_size - ETHER_MAX_LEN;\n \tif ((fc_conf->high_water > max_high_water) ||\n \t    (fc_conf->high_water < fc_conf->low_water)) {\n-\t\tPMD_INIT_LOG(ERR, \"e1000 incorrect high/low water value \\n\");\n-\t\tPMD_INIT_LOG(ERR, \"high water must <= 0x%x \\n\", max_high_water);\n+\t\tPMD_INIT_LOG(ERR, \"e1000 incorrect high/low water value\");\n+\t\tPMD_INIT_LOG(ERR, \"high water must <= 0x%x\", max_high_water);\n \t\treturn (-EINVAL);\n \t}\n \n@@ -1462,7 +1461,7 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \t\treturn 0;\n \t}\n \n-\tPMD_INIT_LOG(ERR, \"e1000_setup_link_generic = 0x%x \\n\", err);\n+\tPMD_INIT_LOG(ERR, \"e1000_setup_link_generic = 0x%x\", err);\n \treturn (-EIO);\n }\n \ndiff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c\nindex 278b7ee..444fd02 100644\n--- a/lib/librte_pmd_e1000/em_rxtx.c\n+++ b/lib/librte_pmd_e1000/em_rxtx.c\n@@ -340,8 +340,7 @@ em_xmit_cleanup(struct em_tx_queue *txq)\n \t{\n \t\tPMD_TX_FREE_LOG(DEBUG,\n \t\t\t\t\"TX descriptor %4u is not done\"\n-\t\t\t\t\"(port=%d queue=%d)\",\n-\t\t\t\tdesc_to_clean_to,\n+\t\t\t\t\"(port=%d queue=%d)\", desc_to_clean_to,\n \t\t\t\ttxq->port_id, txq->queue_id);\n \t\t/* Failed to clean any descriptors, better luck next time */\n \t\treturn -(1);\n@@ -357,9 +356,9 @@ em_xmit_cleanup(struct em_tx_queue *txq)\n \n \tPMD_TX_FREE_LOG(DEBUG,\n \t\t\t\"Cleaning %4u TX descriptors: %4u to %4u \"\n-\t\t\t\"(port=%d queue=%d)\",\n-\t\t\tnb_tx_to_clean, last_desc_cleaned, desc_to_clean_to,\n-\t\t\ttxq->port_id, txq->queue_id);\n+\t\t\t\"(port=%d queue=%d)\", nb_tx_to_clean,\n+\t\t\tlast_desc_cleaned, desc_to_clean_to, txq->port_id,\n+\t\t\ttxq->queue_id);\n \n \t/*\n \t * The last descriptor to clean is done, so that means all the\n@@ -474,7 +473,7 @@ eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\ttx_last = (uint16_t) (tx_last - txq->nb_tx_desc);\n \n \t\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u pktlen=%u\"\n-\t\t\t   \" tx_first=%u tx_last=%u\\n\",\n+\t\t\t   \" tx_first=%u tx_last=%u\",\n \t\t\t   (unsigned) txq->port_id,\n \t\t\t   (unsigned) txq->queue_id,\n \t\t\t   (unsigned) tx_pkt->pkt_len,\n@@ -487,8 +486,7 @@ eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t * nb_used better be less than or equal to txq->tx_rs_thresh\n \t\t */\n \t\twhile (unlikely (nb_used > txq->nb_tx_free)) {\n-\t\t\tPMD_TX_FREE_LOG(DEBUG,\n-\t\t\t\t\t\"Not enough free TX descriptors \"\n+\t\t\tPMD_TX_FREE_LOG(DEBUG, \"Not enough free TX descriptors \"\n \t\t\t\t\t\"nb_used=%4u nb_free=%4u \"\n \t\t\t\t\t\"(port=%d queue=%d)\",\n \t\t\t\t\tnb_used, txq->nb_tx_free,\n@@ -611,8 +609,8 @@ eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t/* Set RS bit only on threshold packets' last descriptor */\n \t\tif (txq->nb_tx_used >= txq->tx_rs_thresh) {\n \t\t\tPMD_TX_FREE_LOG(DEBUG,\n-\t\t\t\t\t\"Setting RS bit on TXD id=\"\n-\t\t\t\t\t\"%4u (port=%d queue=%d)\",\n+\t\t\t\t\t\"Setting RS bit on TXD id=%4u \"\n+\t\t\t\t\t\"(port=%d queue=%d)\",\n \t\t\t\t\ttx_last, txq->port_id, txq->queue_id);\n \n \t\t\tcmd_type_len |= E1000_TXD_CMD_RS;\n@@ -734,8 +732,8 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t * to happen by sending specific \"back-pressure\" flow control\n \t\t * frames to its peer(s).\n \t\t */\n-\t\tPMD_RX_LOG(DEBUG, \"\\nport_id=%u queue_id=%u rx_id=%u \"\n-\t\t\t   \"status=0x%x pkt_len=%u\\n\",\n+\t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n+\t\t\t   \"status=0x%x pkt_len=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) status,\n \t\t\t   (unsigned) rte_le_to_cpu_16(rxd.length));\n@@ -743,7 +741,7 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\tnmb = rte_rxmbuf_alloc(rxq->mb_pool);\n \t\tif (nmb == NULL) {\n \t\t\tPMD_RX_LOG(DEBUG, \"RX mbuf alloc failed port_id=%u \"\n-\t\t\t\t   \"queue_id=%u\\n\",\n+\t\t\t\t   \"queue_id=%u\",\n \t\t\t\t   (unsigned) rxq->port_id,\n \t\t\t\t   (unsigned) rxq->queue_id);\n \t\t\trte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;\n@@ -828,7 +826,7 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tnb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold);\n \tif (nb_hold > rxq->rx_free_thresh) {\n \t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_tail=%u \"\n-\t\t\t   \"nb_hold=%u nb_rx=%u\\n\",\n+\t\t\t   \"nb_hold=%u nb_rx=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) nb_hold,\n \t\t\t   (unsigned) nb_rx);\n@@ -914,8 +912,8 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t * to happen by sending specific \"back-pressure\" flow control\n \t\t * frames to its peer(s).\n \t\t */\n-\t\tPMD_RX_LOG(DEBUG, \"\\nport_id=%u queue_id=%u rx_id=%u \"\n-\t\t\t   \"status=0x%x data_len=%u\\n\",\n+\t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n+\t\t\t   \"status=0x%x data_len=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) status,\n \t\t\t   (unsigned) rte_le_to_cpu_16(rxd.length));\n@@ -923,7 +921,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\tnmb = rte_rxmbuf_alloc(rxq->mb_pool);\n \t\tif (nmb == NULL) {\n \t\t\tPMD_RX_LOG(DEBUG, \"RX mbuf alloc failed port_id=%u \"\n-\t\t\t\t   \"queue_id=%u\\n\", (unsigned) rxq->port_id,\n+\t\t\t\t   \"queue_id=%u\", (unsigned) rxq->port_id,\n \t\t\t\t   (unsigned) rxq->queue_id);\n \t\t\trte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;\n \t\t\tbreak;\n@@ -1072,7 +1070,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tnb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold);\n \tif (nb_hold > rxq->rx_free_thresh) {\n \t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_tail=%u \"\n-\t\t\t   \"nb_hold=%u nb_rx=%u\\n\",\n+\t\t\t   \"nb_hold=%u nb_rx=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) nb_hold,\n \t\t\t   (unsigned) nb_rx);\n@@ -1311,7 +1309,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,\n #endif\n \ttxq->tx_ring = (struct e1000_data_desc *) tz->addr;\n \n-\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64\"\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64,\n \t\t     txq->sw_ring, txq->tx_ring, txq->tx_ring_phys_addr);\n \n \tem_reset_tx_queue(txq);\n@@ -1441,7 +1439,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,\n #endif\n \trxq->rx_ring = (struct e1000_rx_desc *) rz->addr;\n \n-\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64\"\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64,\n \t\t     rxq->sw_ring, rxq->rx_ring, rxq->rx_ring_phys_addr);\n \n \tdev->data->rx_queues[queue_idx] = rxq;\n@@ -1459,7 +1457,7 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n \tuint32_t desc = 0;\n \n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_RX_LOG(DEBUG,\"Invalid RX queue_id=%d\\n\", rx_queue_id);\n+\t\tPMD_RX_LOG(DEBUG, \"Invalid RX queue_id=%d\", rx_queue_id);\n \t\treturn 0;\n \t}\n \n@@ -1605,7 +1603,7 @@ em_alloc_rx_queue_mbufs(struct em_rx_queue *rxq)\n \n \t\tif (mbuf == NULL) {\n \t\t\tPMD_INIT_LOG(ERR, \"RX mbuf alloc failed \"\n-\t\t\t\t     \"queue_id=%hu\\n\", rxq->queue_id);\n+\t\t\t\t     \"queue_id=%hu\", rxq->queue_id);\n \t\t\treturn (-ENOMEM);\n \t\t}\n \ndiff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c\nindex 7cdea10..c9acdc5 100644\n--- a/lib/librte_pmd_e1000/igb_ethdev.c\n+++ b/lib/librte_pmd_e1000/igb_ethdev.c\n@@ -565,7 +565,7 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \tE1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);\n \tE1000_WRITE_FLUSH(hw);\n \n-\tPMD_INIT_LOG(INFO, \"port_id %d vendorID=0x%x deviceID=0x%x\\n\",\n+\tPMD_INIT_LOG(INFO, \"port_id %d vendorID=0x%x deviceID=0x%x\",\n \t\t     eth_dev->data->port_id, pci_dev->id.vendor_id,\n \t\t     pci_dev->id.device_id);\n \n@@ -598,7 +598,7 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t\tE1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n \tint diag;\n \n-\tPMD_INIT_LOG(DEBUG, \"eth_igbvf_dev_init\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \teth_dev->dev_ops = &igbvf_eth_dev_ops;\n \teth_dev->rx_pkt_burst = &eth_igb_recv_pkts;\n@@ -650,8 +650,8 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \tether_addr_copy((struct ether_addr *) hw->mac.perm_addr,\n \t\t\t&eth_dev->data->mac_addrs[0]);\n \n-\tPMD_INIT_LOG(DEBUG, \"\\nport %d vendorID=0x%x deviceID=0x%x \"\n-\t\t     \"mac.type=%s\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"port %d vendorID=0x%x deviceID=0x%x \"\n+\t\t     \"mac.type=%s\",\n \t\t     eth_dev->data->port_id, pci_dev->id.vendor_id,\n \t\t     pci_dev->id.device_id, \"igb_mac_82576_vf\");\n \n@@ -719,11 +719,9 @@ eth_igb_configure(struct rte_eth_dev *dev)\n \tstruct e1000_interrupt *intr =\n \t\tE1000_DEV_PRIVATE_TO_INTR(dev->data->dev_private);\n \n-\tPMD_INIT_LOG(DEBUG, \">>\");\n-\n+\tPMD_INIT_FUNC_TRACE();\n \tintr->flags |= E1000_FLAG_NEED_LINK_UPDATE;\n-\n-\tPMD_INIT_LOG(DEBUG, \"<<\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \treturn (0);\n }\n@@ -736,7 +734,7 @@ eth_igb_start(struct rte_eth_dev *dev)\n \tint ret, i, mask;\n \tuint32_t ctrl_ext;\n \n-\tPMD_INIT_LOG(DEBUG, \">>\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \t/* Power up the phy. Needed to make the link go Up */\n \te1000_power_up_phy(hw);\n@@ -887,7 +885,7 @@ eth_igb_start(struct rte_eth_dev *dev)\n \treturn (0);\n \n error_invalid_config:\n-\tPMD_INIT_LOG(ERR, \"Invalid link_speed/link_duplex (%u/%u) for port %u\\n\",\n+\tPMD_INIT_LOG(ERR, \"Invalid link_speed/link_duplex (%u/%u) for port %u\",\n \t\t     dev->data->dev_conf.link_speed,\n \t\t     dev->data->dev_conf.link_duplex, dev->data->port_id);\n \tigb_dev_clear_queues(dev);\n@@ -1789,13 +1787,13 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev)\n \t\trte_igb_dev_atomic_read_link_status(dev, &link);\n \t\tif (link.link_status) {\n \t\t\tPMD_INIT_LOG(INFO,\n-\t\t\t\t     \" Port %d: Link Up - speed %u Mbps - %s\\n\",\n+\t\t\t\t     \" Port %d: Link Up - speed %u Mbps - %s\",\n \t\t\t\t     dev->data->port_id,\n \t\t\t\t     (unsigned)link.link_speed,\n \t\t\t\t     link.link_duplex == ETH_LINK_FULL_DUPLEX ?\n \t\t\t\t     \"full-duplex\" : \"half-duplex\");\n \t\t} else {\n-\t\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\\n\",\n+\t\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\",\n \t\t\t\t     dev->data->port_id);\n \t\t}\n \t\tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\",\n@@ -1923,14 +1921,14 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \tif (fc_conf->autoneg != hw->mac.autoneg)\n \t\treturn -ENOTSUP;\n \trx_buf_size = igb_get_rx_buffer_size(hw);\n-\tPMD_INIT_LOG(DEBUG, \"Rx packet buffer size = 0x%x \\n\", rx_buf_size);\n+\tPMD_INIT_LOG(DEBUG, \"Rx packet buffer size = 0x%x\", rx_buf_size);\n \n \t/* At least reserve one Ethernet frame for watermark */\n \tmax_high_water = rx_buf_size - ETHER_MAX_LEN;\n \tif ((fc_conf->high_water > max_high_water) ||\n \t    (fc_conf->high_water < fc_conf->low_water)) {\n-\t\tPMD_INIT_LOG(ERR, \"e1000 incorrect high/low water value \\n\");\n-\t\tPMD_INIT_LOG(ERR, \"high water must <=  0x%x \\n\", max_high_water);\n+\t\tPMD_INIT_LOG(ERR, \"e1000 incorrect high/low water value\");\n+\t\tPMD_INIT_LOG(ERR, \"high water must <=  0x%x\", max_high_water);\n \t\treturn (-EINVAL);\n \t}\n \n@@ -1960,7 +1958,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \t\treturn 0;\n \t}\n \n-\tPMD_INIT_LOG(ERR, \"e1000_setup_link_generic = 0x%x \\n\", err);\n+\tPMD_INIT_LOG(ERR, \"e1000_setup_link_generic = 0x%x\", err);\n \treturn (-EIO);\n }\n \n@@ -1995,7 +1993,7 @@ eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index)\n static void\n igbvf_intr_disable(struct e1000_hw *hw)\n {\n-\tPMD_INIT_LOG(DEBUG, \"igbvf_intr_disable\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \t/* Clear interrupt mask to stop from interrupts being generated */\n \tE1000_WRITE_REG(hw, E1000_EIMC, 0xFFFF);\n@@ -2077,7 +2075,7 @@ igbvf_dev_configure(struct rte_eth_dev *dev)\n {\n \tstruct rte_eth_conf* conf = &dev->data->dev_conf;\n \n-\tPMD_INIT_LOG(DEBUG, \"\\nConfigured Virtual Function port id: %d\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"Configured Virtual Function port id: %d\",\n \t\t     dev->data->port_id);\n \n \t/*\n@@ -2086,12 +2084,12 @@ igbvf_dev_configure(struct rte_eth_dev *dev)\n \t */\n #ifndef RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC\n \tif (!conf->rxmode.hw_strip_crc) {\n-\t\tPMD_INIT_LOG(INFO, \"VF can't disable HW CRC Strip\\n\");\n+\t\tPMD_INIT_LOG(INFO, \"VF can't disable HW CRC Strip\");\n \t\tconf->rxmode.hw_strip_crc = 1;\n \t}\n #else\n \tif (conf->rxmode.hw_strip_crc) {\n-\t\tPMD_INIT_LOG(INFO, \"VF can't enable HW CRC Strip\\n\");\n+\t\tPMD_INIT_LOG(INFO, \"VF can't enable HW CRC Strip\");\n \t\tconf->rxmode.hw_strip_crc = 0;\n \t}\n #endif\n@@ -2106,7 +2104,7 @@ igbvf_dev_start(struct rte_eth_dev *dev)\n \t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tint ret;\n \n-\tPMD_INIT_LOG(DEBUG, \"igbvf_dev_start\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \thw->mac.ops.reset_hw(hw);\n \n@@ -2129,7 +2127,7 @@ igbvf_dev_start(struct rte_eth_dev *dev)\n static void\n igbvf_dev_stop(struct rte_eth_dev *dev)\n {\n-\tPMD_INIT_LOG(DEBUG, \"igbvf_dev_stop\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \tigbvf_stop_adapter(dev);\n \n@@ -2147,7 +2145,7 @@ igbvf_dev_close(struct rte_eth_dev *dev)\n {\n \tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n-\tPMD_INIT_LOG(DEBUG, \"igbvf_dev_close\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \te1000_reset_hw(hw);\n \n@@ -2203,7 +2201,7 @@ igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)\n \tuint32_t vid_bit = 0;\n \tint ret = 0;\n \n-\tPMD_INIT_LOG(DEBUG, \"igbvf_vlan_filter_set\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \t/*vind is not used in VF driver, set to 0, check ixgbe_set_vfta_vf*/\n \tret = igbvf_set_vfta(hw, vlan_id, !!on);\ndiff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c\nindex 4946b8d..d615d3e 100644\n--- a/lib/librte_pmd_e1000/igb_rxtx.c\n+++ b/lib/librte_pmd_e1000/igb_rxtx.c\n@@ -417,7 +417,7 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\ttx_last = (uint16_t) (tx_last - txq->nb_tx_desc);\n \n \t\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u pktlen=%u\"\n-\t\t\t   \" tx_first=%u tx_last=%u\\n\",\n+\t\t\t   \" tx_first=%u tx_last=%u\",\n \t\t\t   (unsigned) txq->port_id,\n \t\t\t   (unsigned) txq->queue_id,\n \t\t\t   (unsigned) pkt_len,\n@@ -718,8 +718,8 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t * to happen by sending specific \"back-pressure\" flow control\n \t\t * frames to its peer(s).\n \t\t */\n-\t\tPMD_RX_LOG(DEBUG, \"\\nport_id=%u queue_id=%u rx_id=%u \"\n-\t\t\t   \"staterr=0x%x pkt_len=%u\\n\",\n+\t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n+\t\t\t   \"staterr=0x%x pkt_len=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) staterr,\n \t\t\t   (unsigned) rte_le_to_cpu_16(rxd.wb.upper.length));\n@@ -727,7 +727,7 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\tnmb = rte_rxmbuf_alloc(rxq->mb_pool);\n \t\tif (nmb == NULL) {\n \t\t\tPMD_RX_LOG(DEBUG, \"RX mbuf alloc failed port_id=%u \"\n-\t\t\t\t   \"queue_id=%u\\n\", (unsigned) rxq->port_id,\n+\t\t\t\t   \"queue_id=%u\", (unsigned) rxq->port_id,\n \t\t\t\t   (unsigned) rxq->queue_id);\n \t\t\trte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;\n \t\t\tbreak;\n@@ -814,7 +814,7 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tnb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold);\n \tif (nb_hold > rxq->rx_free_thresh) {\n \t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_tail=%u \"\n-\t\t\t   \"nb_hold=%u nb_rx=%u\\n\",\n+\t\t\t   \"nb_hold=%u nb_rx=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) nb_hold,\n \t\t\t   (unsigned) nb_rx);\n@@ -901,8 +901,8 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t * to happen by sending specific \"back-pressure\" flow control\n \t\t * frames to its peer(s).\n \t\t */\n-\t\tPMD_RX_LOG(DEBUG, \"\\nport_id=%u queue_id=%u rx_id=%u \"\n-\t\t\t   \"staterr=0x%x data_len=%u\\n\",\n+\t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n+\t\t\t   \"staterr=0x%x data_len=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) staterr,\n \t\t\t   (unsigned) rte_le_to_cpu_16(rxd.wb.upper.length));\n@@ -910,7 +910,7 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\tnmb = rte_rxmbuf_alloc(rxq->mb_pool);\n \t\tif (nmb == NULL) {\n \t\t\tPMD_RX_LOG(DEBUG, \"RX mbuf alloc failed port_id=%u \"\n-\t\t\t\t   \"queue_id=%u\\n\", (unsigned) rxq->port_id,\n+\t\t\t\t   \"queue_id=%u\", (unsigned) rxq->port_id,\n \t\t\t\t   (unsigned) rxq->queue_id);\n \t\t\trte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;\n \t\t\tbreak;\n@@ -1068,7 +1068,7 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tnb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold);\n \tif (nb_hold > rxq->rx_free_thresh) {\n \t\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_tail=%u \"\n-\t\t\t   \"nb_hold=%u nb_rx=%u\\n\",\n+\t\t\t   \"nb_hold=%u nb_rx=%u\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) nb_hold,\n \t\t\t   (unsigned) nb_rx);\n@@ -1290,7 +1290,7 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,\n \t\tigb_tx_queue_release(txq);\n \t\treturn (-ENOMEM);\n \t}\n-\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64\"\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64,\n \t\t     txq->sw_ring, txq->tx_ring, txq->tx_ring_phys_addr);\n \n \tigb_reset_tx_queue(txq, dev);\n@@ -1428,7 +1428,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,\n \t\tigb_rx_queue_release(rxq);\n \t\treturn (-ENOMEM);\n \t}\n-\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64\"\\n\",\n+\tPMD_INIT_LOG(DEBUG, \"sw_ring=%p hw_ring=%p dma_addr=0x%\"PRIx64,\n \t\t     rxq->sw_ring, rxq->rx_ring, rxq->rx_ring_phys_addr);\n \n \tdev->data->rx_queues[queue_idx] = rxq;\n@@ -1446,7 +1446,7 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n \tuint32_t desc = 0;\n \n \tif (rx_queue_id >= dev->data->nb_rx_queues) {\n-\t\tPMD_RX_LOG(ERR, \"Invalid RX queue id=%d\\n\", rx_queue_id);\n+\t\tPMD_RX_LOG(ERR, \"Invalid RX queue id=%d\", rx_queue_id);\n \t\treturn 0;\n \t}\n \n@@ -1745,7 +1745,7 @@ igb_is_vmdq_supported(const struct rte_eth_dev *dev)\n \tcase e1000_i210:\n \tcase e1000_i211:\n \tdefault:\n-\t\tPMD_INIT_LOG(ERR, \"Cannot support VMDq feature\\n\");\n+\t\tPMD_INIT_LOG(ERR, \"Cannot support VMDq feature\");\n \t\treturn 0;\n \t}\n }\n@@ -1758,7 +1758,8 @@ igb_vmdq_rx_hw_configure(struct rte_eth_dev *dev)\n \tuint32_t mrqc, vt_ctl, vmolr, rctl;\n \tint i;\n \n-\tPMD_INIT_LOG(DEBUG, \">>\");\n+\tPMD_INIT_FUNC_TRACE();\n+\n \thw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tcfg = &dev->data->dev_conf.rx_adv_conf.vmdq_rx_conf;\n \n@@ -1847,7 +1848,7 @@ igb_alloc_rx_queue_mbufs(struct igb_rx_queue *rxq)\n \n \t\tif (mbuf == NULL) {\n \t\t\tPMD_INIT_LOG(ERR, \"RX mbuf alloc failed \"\n-\t\t\t\t     \"queue_id=%hu\\n\", rxq->queue_id);\n+\t\t\t\t     \"queue_id=%hu\", rxq->queue_id);\n \t\t\treturn (-ENOMEM);\n \t\t}\n \t\tdma_addr =\n@@ -2292,7 +2293,7 @@ eth_igbvf_rx_init(struct rte_eth_dev *dev)\n \t\t\t * to avoid Write-Back not triggered sometimes\n \t\t\t */\n \t\t\trxdctl |= 0x10000;\n-\t\t\tPMD_INIT_LOG(DEBUG, \"Force set RX WTHRESH to 1 !\\n\");\n+\t\t\tPMD_INIT_LOG(DEBUG, \"Force set RX WTHRESH to 1 !\");\n \t\t}\n \t\telse\n \t\t\trxdctl |= ((rxq->wthresh & 0x1F) << 16);\n@@ -2360,7 +2361,7 @@ eth_igbvf_tx_init(struct rte_eth_dev *dev)\n \t\t\t * to avoid Write-Back not triggered sometimes\n \t\t\t */\n \t\t\ttxdctl |= 0x10000;\n-\t\t\tPMD_INIT_LOG(DEBUG, \"Force set TX WTHRESH to 1 !\\n\");\n+\t\t\tPMD_INIT_LOG(DEBUG, \"Force set TX WTHRESH to 1 !\");\n \t\t}\n \t\telse\n \t\t\ttxdctl |= ((txq->wthresh & 0x1F) << 16);\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "17/20"
    ]
}