Show a patch.

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

{
    "id": 234,
    "url": "http://patches.dpdk.org/api/patches/234/",
    "web_url": "http://patches.dpdk.org/patch/234/",
    "project": {
        "id": 1,
        "url": "http://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": "<1409062162-19575-9-git-send-email-david.marchand@6wind.com>",
    "date": "2014-08-26T14:09:18",
    "name": "[dpdk-dev,08/11] e1000: clean log messages",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c3cd51eb6dbee40fe40ad05c7909ceaec19f2c86",
    "submitter": {
        "id": 3,
        "url": "http://patches.dpdk.org/api/people/3/",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/234/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/234/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/234/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<david.marchand@6wind.com>",
        "References": "<1409062162-19575-1-git-send-email-david.marchand@6wind.com>",
        "X-Mailman-Version": "2.1.15",
        "From": "David Marchand <david.marchand@6wind.com>",
        "X-List-Received-Date": "Tue, 26 Aug 2014 14:05:41 -0000",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1409062162-19575-9-git-send-email-david.marchand@6wind.com>",
        "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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=weKf8HORxbrKpobM50aUjLyYYHygAu+gjkhdxL9Feoc=;\n\tb=VYqc7PYmYAwaJhxKoyNUD54P3L2N+gTLDm7zA6lTdhzJ1v3Il8Y9rXg2ywWpwWcY17\n\t1Orr+cqGCj72quOcfzmKblKLLHGPZkXHELV6N4qj3Nlqz6eCebSLCG3pK+eB2xyyOcRz\n\t+YGeKlhVrH8vku7NR9sVaEDSKqYey5rY1/NsUOVRwVNFVcX6n6pC1k9N5yJju58zIdYJ\n\tk+iavhjJSkPzaUcIcfFYN/WeTHeguc9X+Q6455rDpZ7yq2tyrg6w6QuOcB9fQDWlD+d+\n\t3jI+4eRnQuEbsfdDfpAItmHL8C5XCFqIco/EaRTVtzAZ7QniphbnMFongM1IAmqCOWUN\n\tU3VA==",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Received": "by 10.180.80.225 with SMTP id u1mr21763123wix.69.1409062181676; \n\tTue, 26 Aug 2014 07:09:41 -0700 (PDT)",
        "X-Mailer": "git-send-email 1.7.10.4",
        "Precedence": "list",
        "X-Gm-Message-State": "ALoCoQnD+YySMeu4WuOtX3hcKiXv+ScGwPFbAeA8kRgqUAxzlgECAQ9gHR6pb6Ar9cs5p2Y1zJft",
        "Date": "Tue, 26 Aug 2014 16:09:18 +0200",
        "Subject": "[dpdk-dev] [PATCH 08/11] e1000: clean log messages",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Received": [
            "from mail-wg0-f51.google.com (mail-wg0-f51.google.com\n\t[74.125.82.51]) by dpdk.org (Postfix) with ESMTP id A1A03B363\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 16:05:41 +0200 (CEST)",
            "by mail-wg0-f51.google.com with SMTP id b13so14525992wgh.10\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 07:09:41 -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\tcy9sm12543569wib.18.2014.08.26.07.09.40 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Aug 2014 07:09:41 -0700 (PDT)"
        ],
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "In-Reply-To": "<1409062162-19575-1-git-send-email-david.marchand@6wind.com>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "To": "dev@dpdk.org"
    },
    "content": "Clean log messages:\n- remove superfluous \\n in log macros and add some \\n where needed,\n- remove leading \\n in some messages,\n- split multi lines messages,\n- introduce PMD_INIT_FUNC_TRACE and replace some PMD_INIT_LOG(DEBUG, \"func\\n\").\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_pmd_e1000/e1000_logs.h |   12 +++---\n lib/librte_pmd_e1000/em_ethdev.c  |   47 +++++++++++------------\n lib/librte_pmd_e1000/em_rxtx.c    |   35 ++++++++---------\n lib/librte_pmd_e1000/igb_ethdev.c |   75 ++++++++++++++++++-------------------\n lib/librte_pmd_e1000/igb_rxtx.c   |    9 +++--\n 5 files changed, 85 insertions(+), 93 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_e1000/e1000_logs.h b/lib/librte_pmd_e1000/e1000_logs.h\nindex b6b3bb7..02f5930 100644\n--- a/lib/librte_pmd_e1000/e1000_logs.h\n+++ b/lib/librte_pmd_e1000/e1000_logs.h\n@@ -36,35 +36,37 @@\n \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+\tRTE_LOG(level, PMD, \"%s(): \" fmt, __func__, ## args)\n+#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, \" >>\\n\")\n #else\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\n #define PMD_RX_LOG(level, fmt, args...) \\\n-\tRTE_LOG(level, PMD, \"%s(): \" fmt \"\\n\", __func__, ## args)\n+\tRTE_LOG(level, PMD, \"%s(): \" fmt, __func__, ## args)\n #else\n #define PMD_RX_LOG(level, fmt, args...) do { } while(0)\n #endif\n \n #ifdef RTE_LIBRTE_E1000_DEBUG_TX\n #define PMD_TX_LOG(level, fmt, args...) \\\n-\tRTE_LOG(level, PMD, \"%s(): \" fmt \"\\n\", __func__, ## args)\n+\tRTE_LOG(level, PMD, \"%s(): \" fmt, __func__, ## args)\n #else\n #define PMD_TX_LOG(level, fmt, args...) do { } while(0)\n #endif\n \n #ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE\n #define PMD_TX_FREE_LOG(level, fmt, args...) \\\n-\tRTE_LOG(level, PMD, \"%s(): \" fmt \"\\n\", __func__, ## args)\n+\tRTE_LOG(level, PMD, \"%s(): \" fmt, __func__, ## args)\n #else\n #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)\n #endif\n \n #ifdef RTE_LIBRTE_E1000_DEBUG_DRIVER\n #define PMD_DRV_LOG(level, fmt, args...) \\\n-\tRTE_LOG(level, PMD, \"%s(): \" fmt \"\\n\", __func__, ## args)\n+\tRTE_LOG(level, PMD, \"%s(): \" fmt, __func__, ## args)\n #else\n #define PMD_DRV_LOG(level, fmt, args...) do { } while(0)\n #endif\ndiff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c\nindex 4555294..f359774 100644\n--- a/lib/librte_pmd_e1000/em_ethdev.c\n+++ b/lib/librte_pmd_e1000/em_ethdev.c\n@@ -249,9 +249,9 @@ eth_em_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \tif (e1000_setup_init_funcs(hw, TRUE) != E1000_SUCCESS ||\n \t\t\tem_hw_init(hw) != 0) {\n \t\tPMD_INIT_LOG(ERR, \"port_id %d vendorID=0x%x deviceID=0x%x: \"\n-\t\t\t\"failed to init HW\",\n-\t\t\teth_dev->data->port_id, pci_dev->id.vendor_id,\n-\t\t\tpci_dev->id.device_id);\n+\t\t\t     \"failed to init HW\\n\",\n+\t\t\t     eth_dev->data->port_id, pci_dev->id.vendor_id,\n+\t\t\t     pci_dev->id.device_id);\n \t\treturn -(ENODEV);\n \t}\n \n@@ -260,8 +260,8 @@ eth_em_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t\t\thw->mac.rar_entry_count, 0);\n \tif (eth_dev->data->mac_addrs == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Failed to allocate %d bytes needed to \"\n-\t\t\t\"store MAC addresses\",\n-\t\t\tETHER_ADDR_LEN * hw->mac.rar_entry_count);\n+\t\t\t     \"store MAC addresses\\n\",\n+\t\t\t     ETHER_ADDR_LEN * hw->mac.rar_entry_count);\n \t\treturn -(ENOMEM);\n \t}\n \n@@ -350,7 +350,7 @@ em_hw_init(struct e1000_hw *hw)\n \t\t */\n \t\tdiag = e1000_validate_nvm_checksum(hw);\n \t\tif (diag < 0) {\n-\t\t\tPMD_INIT_LOG(ERR, \"EEPROM checksum invalid\");\n+\t\t\tPMD_INIT_LOG(ERR, \"EEPROM checksum invalid\\n\");\n \t\t\tgoto error;\n \t\t}\n \t}\n@@ -358,14 +358,14 @@ em_hw_init(struct e1000_hw *hw)\n \t/* Read the permanent MAC address out of the EEPROM */\n \tdiag = e1000_read_mac_addr(hw);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"EEPROM error while reading MAC address\");\n+\t\tPMD_INIT_LOG(ERR, \"EEPROM error while reading MAC address\\n\");\n \t\tgoto error;\n \t}\n \n \t/* Now initialize the hardware */\n \tdiag = em_hardware_init(hw);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"Hardware initialization failed\");\n+\t\tPMD_INIT_LOG(ERR, \"Hardware initialization failed\\n\");\n \t\tgoto error;\n \t}\n \n@@ -375,7 +375,7 @@ em_hw_init(struct e1000_hw *hw)\n \tdiag = e1000_check_reset_block(hw);\n \tif (diag < 0) {\n \t\tPMD_INIT_LOG(ERR, \"PHY reset is blocked due to \"\n-\t\t\t\"SOL/IDER session\");\n+\t\t\t     \"SOL/IDER session\\n\");\n \t}\n \treturn (0);\n \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@@ -478,7 +477,7 @@ eth_em_start(struct rte_eth_dev *dev)\n \n \t/* Initialize the hardware */\n \tif (em_hardware_init(hw)) {\n-\t\tPMD_INIT_LOG(ERR, \"Unable to initialize the hardware\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to initialize the hardware\\n\");\n \t\treturn (-EIO);\n \t}\n \n@@ -491,7 +490,7 @@ eth_em_start(struct rte_eth_dev *dev)\n \n \tret = eth_em_rx_init(dev);\n \tif (ret) {\n-\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\\n\");\n \t\tem_dev_clear_queues(dev);\n \t\treturn ret;\n \t}\n@@ -562,7 +561,7 @@ eth_em_start(struct rte_eth_dev *dev)\n \tif (dev->data->dev_conf.intr_conf.lsc != 0) {\n \t\tret = eth_em_interrupt_setup(dev);\n \t\tif (ret) {\n-\t\t\tPMD_INIT_LOG(ERR, \"Unable to setup interrupts\");\n+\t\t\tPMD_INIT_LOG(ERR, \"Unable to setup interrupts\\n\");\n \t\t\tem_dev_clear_queues(dev);\n \t\t\treturn ret;\n \t\t}\n@@ -1305,11 +1304,9 @@ eth_em_interrupt_action(struct rte_eth_dev *dev)\n \t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\\n\",\n \t\t\t\t\tdev->data->port_id);\n \t}\n-\tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\",\n-\t\t\t\tdev->pci_dev->addr.domain,\n-\t\t\t\tdev->pci_dev->addr.bus,\n-\t\t\t\tdev->pci_dev->addr.devid,\n-\t\t\t\tdev->pci_dev->addr.function);\n+\tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\\n\",\n+\t\t     dev->pci_dev->addr.domain, dev->pci_dev->addr.bus,\n+\t\t     dev->pci_dev->addr.devid, dev->pci_dev->addr.function);\n \ttctl = E1000_READ_REG(hw, E1000_TCTL);\n \trctl = E1000_READ_REG(hw, E1000_RCTL);\n \tif (link.link_status) {\n@@ -1429,14 +1426,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\\n\", 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\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\");\n+\t\tPMD_INIT_LOG(ERR, \"high water must <= 0x%x\\n\", max_high_water);\n \t\treturn (-EINVAL);\n \t}\n \n@@ -1466,7 +1463,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\\n\", 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 f254858..fd082f8 100644\n--- a/lib/librte_pmd_e1000/em_rxtx.c\n+++ b/lib/librte_pmd_e1000/em_rxtx.c\n@@ -317,10 +317,8 @@ em_xmit_cleanup(struct em_tx_queue *txq)\n \tdesc_to_clean_to = sw_ring[desc_to_clean_to].last_id;\n \tif (! (txr[desc_to_clean_to].upper.fields.status & E1000_TXD_STAT_DD))\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\tPMD_TX_FREE_LOG(DEBUG, \"TX descriptor %4u is not done\"\n+\t\t\t\t\"(port=%d queue=%d)\\n\", 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@@ -334,11 +332,10 @@ em_xmit_cleanup(struct em_tx_queue *txq)\n \t\tnb_tx_to_clean = (uint16_t)(desc_to_clean_to -\n \t\t\t\t\t\tlast_desc_cleaned);\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+\tPMD_TX_FREE_LOG(DEBUG, \"Cleaning %4u TX descriptors: %4u to %4u \"\n+\t\t\t\"(port=%d queue=%d)\\n\", 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@@ -464,10 +461,9 @@ 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\t\"(port=%d queue=%d)\\n\",\n \t\t\t\t\tnb_used, txq->nb_tx_free,\n \t\t\t\t\ttxq->port_id, txq->queue_id);\n \n@@ -588,9 +584,8 @@ eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \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\tPMD_TX_FREE_LOG(DEBUG, \"Setting RS bit on TXD id=%4u \"\n+\t\t\t\t\t\"(port=%d queue=%d)\\n\",\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@@ -606,9 +601,9 @@ end_of_tx:\n \t/*\n \t * Set the Transmit Descriptor Tail (TDT)\n \t */\n-\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u tx_tail=%u nb_tx=%u\",\n-\t\t(unsigned) txq->port_id, (unsigned) txq->queue_id,\n-\t\t(unsigned) tx_id, (unsigned) nb_tx);\n+\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u tx_tail=%u nb_tx=%u\\n\",\n+\t\t   (unsigned) txq->port_id, (unsigned) txq->queue_id,\n+\t\t   (unsigned) tx_id, (unsigned) nb_tx);\n \tE1000_PCI_REG_WRITE(txq->tdt_reg_addr, tx_id);\n \ttxq->tx_tail = tx_id;\n \n@@ -712,7 +707,7 @@ 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\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n \t\t\t\"status=0x%x pkt_len=%u\\n\",\n \t\t\t(unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t(unsigned) rx_id, (unsigned) status,\n@@ -892,7 +887,7 @@ 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\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n \t\t\t\"status=0x%x data_len=%u\\n\",\n \t\t\t(unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t(unsigned) rx_id, (unsigned) status,\ndiff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c\nindex 3187d92..4d91aa7 100644\n--- a/lib/librte_pmd_e1000/igb_ethdev.c\n+++ b/lib/librte_pmd_e1000/igb_ethdev.c\n@@ -509,7 +509,7 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t\t * if it fails a second time its a real issue.\n \t\t */\n \t\tif (e1000_validate_nvm_checksum(hw) < 0) {\n-\t\t\tPMD_INIT_LOG(ERR, \"EEPROM checksum invalid\");\n+\t\t\tPMD_INIT_LOG(ERR, \"EEPROM checksum invalid\\n\");\n \t\t\terror = -EIO;\n \t\t\tgoto err_late;\n \t\t}\n@@ -517,7 +517,7 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \n \t/* Read the permanent MAC address out of the EEPROM */\n \tif (e1000_read_mac_addr(hw) != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"EEPROM error while reading MAC address\");\n+\t\tPMD_INIT_LOG(ERR, \"EEPROM error while reading MAC address\\n\");\n \t\terror = -EIO;\n \t\tgoto err_late;\n \t}\n@@ -527,8 +527,8 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t\tETHER_ADDR_LEN * hw->mac.rar_entry_count, 0);\n \tif (eth_dev->data->mac_addrs == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Failed to allocate %d bytes needed to \"\n-\t\t\t\t\t\t\"store MAC addresses\",\n-\t\t\t\tETHER_ADDR_LEN * hw->mac.rar_entry_count);\n+\t\t\t     \"store MAC addresses\\n\",\n+\t\t\t     ETHER_ADDR_LEN * hw->mac.rar_entry_count);\n \t\terror = -ENOMEM;\n \t\tgoto err_late;\n \t}\n@@ -541,7 +541,7 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \n \t/* Now initialize the hardware */\n \tif (igb_hardware_init(hw) != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"Hardware initialization failed\");\n+\t\tPMD_INIT_LOG(ERR, \"Hardware initialization failed\\n\");\n \t\trte_free(eth_dev->data->mac_addrs);\n \t\teth_dev->data->mac_addrs = NULL;\n \t\terror = -ENODEV;\n@@ -552,7 +552,7 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t/* Indicate SOL/IDER usage */\n \tif (e1000_check_reset_block(hw) < 0) {\n \t\tPMD_INIT_LOG(ERR, \"PHY reset is blocked due to\"\n-\t\t\t\t\t\"SOL/IDER session\");\n+\t\t\t     \"SOL/IDER session\\n\");\n \t}\n \n \t/* initialize PF if max_vfs not zero */\n@@ -597,7 +597,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@@ -621,8 +621,8 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \t/* Initialize the shared code (base driver) */\n \tdiag = e1000_setup_init_funcs(hw, TRUE);\n \tif (diag != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"Shared code init failed for igbvf: %d\",\n-\t\t\tdiag);\n+\t\tPMD_INIT_LOG(ERR, \"Shared code init failed for igbvf: %d\\n\",\n+\t\t\t     diag);\n \t\treturn -EIO;\n \t}\n \n@@ -638,10 +638,9 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,\n \teth_dev->data->mac_addrs = rte_zmalloc(\"igbvf\", ETHER_ADDR_LEN *\n \t\thw->mac.rar_entry_count, 0);\n \tif (eth_dev->data->mac_addrs == NULL) {\n-\t\tPMD_INIT_LOG(ERR,\n-\t\t\t\"Failed to allocate %d bytes needed to store MAC \"\n-\t\t\t\"addresses\",\n-\t\t\tETHER_ADDR_LEN * hw->mac.rar_entry_count);\n+\t\tPMD_INIT_LOG(ERR, \"Failed to allocate %d bytes needed to \"\n+\t\t\t     \"store MAC addresses\\n\",\n+\t\t\t     ETHER_ADDR_LEN * hw->mac.rar_entry_count);\n \t\treturn -ENOMEM;\n \t}\n \n@@ -649,7 +648,7 @@ 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+\tPMD_INIT_LOG(DEBUG, \"port %d vendorID=0x%x deviceID=0x%x \"\n \t\t\t\"mac.type=%s\\n\",\n \t\t\teth_dev->data->port_id, pci_dev->id.vendor_id,\n \t\t\tpci_dev->id.device_id,\n@@ -719,11 +718,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 +733,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@@ -758,7 +755,7 @@ eth_igb_start(struct rte_eth_dev *dev)\n \n \t/* Initialize the hardware */\n \tif (igb_hardware_init(hw)) {\n-\t\tPMD_INIT_LOG(ERR, \"Unable to initialize the hardware\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to initialize the hardware\\n\");\n \t\treturn (-EIO);\n \t}\n \n@@ -781,7 +778,7 @@ eth_igb_start(struct rte_eth_dev *dev)\n \t/* This can fail when allocating mbufs for descriptor rings */\n \tret = eth_igb_rx_init(dev);\n \tif (ret) {\n-\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\\n\");\n \t\tigb_dev_clear_queues(dev);\n \t\treturn ret;\n \t}\n@@ -1797,11 +1794,11 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev)\n \t\t\tPMD_INIT_LOG(INFO, \" Port %d: Link Down\\n\",\n \t\t\t\t\t\tdev->data->port_id);\n \t\t}\n-\t\tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\",\n-\t\t\t\t\tdev->pci_dev->addr.domain,\n-\t\t\t\t\tdev->pci_dev->addr.bus,\n-\t\t\t\t\tdev->pci_dev->addr.devid,\n-\t\t\t\t\tdev->pci_dev->addr.function);\n+\t\tPMD_INIT_LOG(INFO, \"PCI Address: %04d:%02d:%02d:%d\\n\",\n+\t\t\t     dev->pci_dev->addr.domain,\n+\t\t\t     dev->pci_dev->addr.bus,\n+\t\t\t     dev->pci_dev->addr.devid,\n+\t\t\t     dev->pci_dev->addr.function);\n \t\ttctl = E1000_READ_REG(hw, E1000_TCTL);\n \t\trctl = E1000_READ_REG(hw, E1000_RCTL);\n \t\tif (link.link_status) {\n@@ -1922,14 +1919,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\\n\", 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\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\");\n+\t\tPMD_INIT_LOG(ERR, \"high water must <=  0x%x\\n\", max_high_water);\n \t\treturn (-EINVAL);\n \t}\n \n@@ -1959,7 +1956,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\\n\", err);\n \treturn (-EIO);\n }\n \n@@ -1994,7 +1991,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@@ -2076,7 +2073,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\",\n \t\tdev->data->port_id);\n \n \t/*\n@@ -2105,7 +2102,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@@ -2117,7 +2114,7 @@ igbvf_dev_start(struct rte_eth_dev *dev)\n \t/* This can fail when allocating mbufs for descriptor rings */\n \tret = eth_igbvf_rx_init(dev);\n \tif (ret) {\n-\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to initialize RX hardware\\n\");\n \t\tigb_dev_clear_queues(dev);\n \t\treturn ret;\n \t}\n@@ -2128,7 +2125,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@@ -2146,7 +2143,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@@ -2202,12 +2199,12 @@ 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);\n \tif(ret){\n-\t\tPMD_INIT_LOG(ERR, \"Unable to set VF vlan\");\n+\t\tPMD_INIT_LOG(ERR, \"Unable to set VF vlan\\n\");\n \t\treturn ret;\n \t}\n \tvid_idx = (uint32_t) ((vlan_id >> 5) & 0x7F);\n@@ -2431,7 +2428,7 @@ eth_igb_add_ethertype_filter(struct rte_eth_dev *dev, uint16_t index,\n \n \tif (filter->priority_en) {\n \t\tPMD_INIT_LOG(ERR, \"vlan and priority (%d) is not supported\"\n-\t\t\t\" in E1000.\", filter->priority);\n+\t\t\t     \" in E1000.\\n\", filter->priority);\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c\nindex 977c4a2..9a34710 100644\n--- a/lib/librte_pmd_e1000/igb_rxtx.c\n+++ b/lib/librte_pmd_e1000/igb_rxtx.c\n@@ -555,7 +555,7 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t * Set the Transmit Descriptor Tail (TDT).\n \t */\n \tE1000_PCI_REG_WRITE(txq->tdt_reg_addr, tx_id);\n-\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u tx_tail=%u nb_tx=%u\",\n+\tPMD_TX_LOG(DEBUG, \"port_id=%u queue_id=%u tx_tail=%u nb_tx=%u\\n\",\n \t\t   (unsigned) txq->port_id, (unsigned) txq->queue_id,\n \t\t   (unsigned) tx_id, (unsigned) nb_tx);\n \ttxq->tx_tail = tx_id;\n@@ -697,7 +697,7 @@ 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\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n \t\t\t   \"staterr=0x%x pkt_len=%u\\n\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) staterr,\n@@ -881,7 +881,7 @@ 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\tPMD_RX_LOG(DEBUG, \"port_id=%u queue_id=%u rx_id=%u \"\n \t\t\t   \"staterr=0x%x data_len=%u\\n\",\n \t\t\t   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,\n \t\t\t   (unsigned) rx_id, (unsigned) staterr,\n@@ -1741,7 +1741,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",
    "prefixes": [
        "dpdk-dev",
        "08/11"
    ]
}