Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/405/?format=api
http://patches.dpdk.org/api/patches/405/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1410961612-8571-9-git-send-email-david.marchand@6wind.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1410961612-8571-9-git-send-email-david.marchand@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1410961612-8571-9-git-send-email-david.marchand@6wind.com", "date": "2014-09-17T13:46:40", "name": "[dpdk-dev,v3,08/20] i40e: use the right debug macro", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "6525d8cb2c545cd45bde4bdee5e1e857ac1a0e3b", "submitter": { "id": 3, "url": "http://patches.dpdk.org/api/people/3/?format=api", "name": "David Marchand", "email": "david.marchand@6wind.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1410961612-8571-9-git-send-email-david.marchand@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/405/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/405/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C3148B3C9;\n\tWed, 17 Sep 2014 15:41:37 +0200 (CEST)", "from mail-we0-f172.google.com (mail-we0-f172.google.com\n\t[74.125.82.172]) by dpdk.org (Postfix) with ESMTP id 82857B39D\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 15:41:35 +0200 (CEST)", "by mail-we0-f172.google.com with SMTP id k48so1473631wev.31\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 06:47:16 -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.14 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 17 Sep 2014 06:47:15 -0700 (PDT)" ], "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=rGwd4jhS5tvsaNnM6H768UD1iuFurhO0P1CnQnOdeLU=;\n\tb=JiDFJ88MTiM7DVYbh2rq6o222Hs5aXfqd5a5DJcLnfDcBGnFlbFp/5JEE4Usn+iu3Y\n\tM+sO3hkEmA1ogq4Nu09FwOmhFaXTLESCwqZu57r+dVZhRZXGKB+jVMFRGO0RpCnB0kVo\n\tLspH8/6iGMgUTysKk15hbZs1xuwYq0rKYayTucskhqvd+wQrjH12LPRC3j0eRN/hEUu5\n\tYF3+glpllhRvhtaa9243R4VdYhGlJhmfL1chKr3USTSEbFbIXa3Zd8dbZME+pooGVlSe\n\tNfrjW055F+kbMJJFPehCd4OmLABadblbqpkmQz58lMTUDlo3CJ9GcGs/sSp5HTMfYZki\n\tS2sA==", "X-Gm-Message-State": "ALoCoQnVO6+/hy0E3xktvRUReixysk51OZV4leW2jZ7PR8Ixd7Kj7PF8lmxYCmYWEq4RSwbb3vnS", "X-Received": "by 10.194.184.101 with SMTP id et5mr51891088wjc.14.1410961636627;\n\tWed, 17 Sep 2014 06:47:16 -0700 (PDT)", "From": "David Marchand <david.marchand@6wind.com>", "To": "dev@dpdk.org", "Date": "Wed, 17 Sep 2014 15:46:40 +0200", "Message-Id": "<1410961612-8571-9-git-send-email-david.marchand@6wind.com>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<1410961612-8571-1-git-send-email-david.marchand@6wind.com>", "References": "<1410961612-8571-1-git-send-email-david.marchand@6wind.com>", "Subject": "[dpdk-dev] [PATCH v3 08/20] i40e: use the right debug macro", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "- Don't use DEBUGFUNC macro in non-shared code.\n- Don't use printf for logs.\n- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.\n- Replace some PMD_INIT_LOG(DEBUG, \"some_func\") with PMD_INIT_FUNC_TRACE().\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_i40e/i40e_ethdev.c | 146 +++++++++++++++++-----------------\n lib/librte_pmd_i40e/i40e_ethdev_vf.c | 4 +-\n lib/librte_pmd_i40e/i40e_pf.c | 6 +-\n lib/librte_pmd_i40e/i40e_rxtx.c | 64 +++++++--------\n 4 files changed, 111 insertions(+), 109 deletions(-)", "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex 4e65ca4..af2e1cb 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -1059,24 +1059,23 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)\n \t\t\t &oes->tx_errors, &nes->tx_errors);\n \tvsi->offset_loaded = true;\n \n-#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER\n-\tprintf(\"***************** VSI[%u] stats start *******************\\n\",\n-\t\t\t\t\t\t\t\tvsi->vsi_id);\n-\tprintf(\"rx_bytes: %lu\\n\", nes->rx_bytes);\n-\tprintf(\"rx_unicast: %lu\\n\", nes->rx_unicast);\n-\tprintf(\"rx_multicast: %lu\\n\", nes->rx_multicast);\n-\tprintf(\"rx_broadcast: %lu\\n\", nes->rx_broadcast);\n-\tprintf(\"rx_discards: %lu\\n\", nes->rx_discards);\n-\tprintf(\"rx_unknown_protocol: %lu\\n\", nes->rx_unknown_protocol);\n-\tprintf(\"tx_bytes: %lu\\n\", nes->tx_bytes);\n-\tprintf(\"tx_unicast: %lu\\n\", nes->tx_unicast);\n-\tprintf(\"tx_multicast: %lu\\n\", nes->tx_multicast);\n-\tprintf(\"tx_broadcast: %lu\\n\", nes->tx_broadcast);\n-\tprintf(\"tx_discards: %lu\\n\", nes->tx_discards);\n-\tprintf(\"tx_errors: %lu\\n\", nes->tx_errors);\n-\tprintf(\"***************** VSI[%u] stats end *******************\\n\",\n-\t\t\t\t\t\t\t\tvsi->vsi_id);\n-#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */\n+\tPMD_DRV_LOG(DEBUG, \"***************** VSI[%u] stats start *******************\",\n+\t\t vsi->vsi_id);\n+\tPMD_DRV_LOG(DEBUG, \"rx_bytes: %lu\", nes->rx_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"rx_unicast: %lu\", nes->rx_unicast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_multicast: %lu\", nes->rx_multicast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_broadcast: %lu\", nes->rx_broadcast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_discards: %lu\", nes->rx_discards);\n+\tPMD_DRV_LOG(DEBUG, \"rx_unknown_protocol: %lu\",\n+\t\t nes->rx_unknown_protocol);\n+\tPMD_DRV_LOG(DEBUG, \"tx_bytes: %lu\", nes->tx_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"tx_unicast: %lu\", nes->tx_unicast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_multicast: %lu\", nes->tx_multicast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_broadcast: %lu\", nes->tx_broadcast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_discards: %lu\", nes->tx_discards);\n+\tPMD_DRV_LOG(DEBUG, \"tx_errors: %lu\", nes->tx_errors);\n+\tPMD_DRV_LOG(DEBUG, \"***************** VSI[%u] stats end *******************\",\n+\t\t vsi->vsi_id);\n }\n \n /* Get all statistics of a port */\n@@ -1277,69 +1276,74 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tif (pf->main_vsi)\n \t\ti40e_update_vsi_stats(pf->main_vsi);\n \n-#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER\n-\tprintf(\"***************** PF stats start *******************\\n\");\n-\tprintf(\"rx_bytes: %lu\\n\", ns->eth.rx_bytes);\n-\tprintf(\"rx_unicast: %lu\\n\", ns->eth.rx_unicast);\n-\tprintf(\"rx_multicast: %lu\\n\", ns->eth.rx_multicast);\n-\tprintf(\"rx_broadcast: %lu\\n\", ns->eth.rx_broadcast);\n-\tprintf(\"rx_discards: %lu\\n\", ns->eth.rx_discards);\n-\tprintf(\"rx_unknown_protocol: %lu\\n\", ns->eth.rx_unknown_protocol);\n-\tprintf(\"tx_bytes: %lu\\n\", ns->eth.tx_bytes);\n-\tprintf(\"tx_unicast: %lu\\n\", ns->eth.tx_unicast);\n-\tprintf(\"tx_multicast: %lu\\n\", ns->eth.tx_multicast);\n-\tprintf(\"tx_broadcast: %lu\\n\", ns->eth.tx_broadcast);\n-\tprintf(\"tx_discards: %lu\\n\", ns->eth.tx_discards);\n-\tprintf(\"tx_errors: %lu\\n\", ns->eth.tx_errors);\n-\n-\tprintf(\"tx_dropped_link_down: %lu\\n\", ns->tx_dropped_link_down);\n-\tprintf(\"crc_errors: %lu\\n\", ns->crc_errors);\n-\tprintf(\"illegal_bytes: %lu\\n\", ns->illegal_bytes);\n-\tprintf(\"error_bytes: %lu\\n\", ns->error_bytes);\n-\tprintf(\"mac_local_faults: %lu\\n\", ns->mac_local_faults);\n-\tprintf(\"mac_remote_faults: %lu\\n\", ns->mac_remote_faults);\n-\tprintf(\"rx_length_errors: %lu\\n\", ns->rx_length_errors);\n-\tprintf(\"link_xon_rx: %lu\\n\", ns->link_xon_rx);\n-\tprintf(\"link_xoff_rx: %lu\\n\", ns->link_xoff_rx);\n+\tPMD_DRV_LOG(DEBUG, \"***************** PF stats start *******************\");\n+\tPMD_DRV_LOG(DEBUG, \"rx_bytes: %lu\", ns->eth.rx_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"rx_unicast: %lu\", ns->eth.rx_unicast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_multicast: %lu\", ns->eth.rx_multicast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_broadcast: %lu\", ns->eth.rx_broadcast);\n+\tPMD_DRV_LOG(DEBUG, \"rx_discards: %lu\", ns->eth.rx_discards);\n+\tPMD_DRV_LOG(DEBUG, \"rx_unknown_protocol: %lu\",\n+\t\t ns->eth.rx_unknown_protocol);\n+\tPMD_DRV_LOG(DEBUG, \"tx_bytes: %lu\", ns->eth.tx_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"tx_unicast: %lu\", ns->eth.tx_unicast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_multicast: %lu\", ns->eth.tx_multicast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_broadcast: %lu\", ns->eth.tx_broadcast);\n+\tPMD_DRV_LOG(DEBUG, \"tx_discards: %lu\", ns->eth.tx_discards);\n+\tPMD_DRV_LOG(DEBUG, \"tx_errors: %lu\", ns->eth.tx_errors);\n+\n+\tPMD_DRV_LOG(DEBUG, \"tx_dropped_link_down: %lu\",\n+\t\t ns->tx_dropped_link_down);\n+\tPMD_DRV_LOG(DEBUG, \"crc_errors: %lu\", ns->crc_errors);\n+\tPMD_DRV_LOG(DEBUG, \"illegal_bytes: %lu\",\n+\t\t ns->illegal_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"error_bytes: %lu\", ns->error_bytes);\n+\tPMD_DRV_LOG(DEBUG, \"mac_local_faults: %lu\",\n+\t\t ns->mac_local_faults);\n+\tPMD_DRV_LOG(DEBUG, \"mac_remote_faults: %lu\",\n+\t\t ns->mac_remote_faults);\n+\tPMD_DRV_LOG(DEBUG, \"rx_length_errors: %lu\",\n+\t\t ns->rx_length_errors);\n+\tPMD_DRV_LOG(DEBUG, \"link_xon_rx: %lu\", ns->link_xon_rx);\n+\tPMD_DRV_LOG(DEBUG, \"link_xoff_rx: %lu\", ns->link_xoff_rx);\n \tfor (i = 0; i < 8; i++) {\n-\t\tprintf(\"priority_xon_rx[%d]: %lu\\n\",\n+\t\tPMD_DRV_LOG(DEBUG, \"priority_xon_rx[%d]: %lu\",\n \t\t\t\ti, ns->priority_xon_rx[i]);\n-\t\tprintf(\"priority_xoff_rx[%d]: %lu\\n\",\n+\t\tPMD_DRV_LOG(DEBUG, \"priority_xoff_rx[%d]: %lu\",\n \t\t\t\ti, ns->priority_xoff_rx[i]);\n \t}\n-\tprintf(\"link_xon_tx: %lu\\n\", ns->link_xon_tx);\n-\tprintf(\"link_xoff_tx: %lu\\n\", ns->link_xoff_tx);\n+\tPMD_DRV_LOG(DEBUG, \"link_xon_tx: %lu\", ns->link_xon_tx);\n+\tPMD_DRV_LOG(DEBUG, \"link_xoff_tx: %lu\", ns->link_xoff_tx);\n \tfor (i = 0; i < 8; i++) {\n-\t\tprintf(\"priority_xon_tx[%d]: %lu\\n\",\n+\t\tPMD_DRV_LOG(DEBUG, \"priority_xon_tx[%d]: %lu\",\n \t\t\t\ti, ns->priority_xon_tx[i]);\n-\t\tprintf(\"priority_xoff_tx[%d]: %lu\\n\",\n+\t\tPMD_DRV_LOG(DEBUG, \"priority_xoff_tx[%d]: %lu\",\n \t\t\t\ti, ns->priority_xoff_tx[i]);\n-\t\tprintf(\"priority_xon_2_xoff[%d]: %lu\\n\",\n+\t\tPMD_DRV_LOG(DEBUG, \"priority_xon_2_xoff[%d]: %lu\",\n \t\t\t\ti, ns->priority_xon_2_xoff[i]);\n \t}\n-\tprintf(\"rx_size_64: %lu\\n\", ns->rx_size_64);\n-\tprintf(\"rx_size_127: %lu\\n\", ns->rx_size_127);\n-\tprintf(\"rx_size_255: %lu\\n\", ns->rx_size_255);\n-\tprintf(\"rx_size_511: %lu\\n\", ns->rx_size_511);\n-\tprintf(\"rx_size_1023: %lu\\n\", ns->rx_size_1023);\n-\tprintf(\"rx_size_1522: %lu\\n\", ns->rx_size_1522);\n-\tprintf(\"rx_size_big: %lu\\n\", ns->rx_size_big);\n-\tprintf(\"rx_undersize: %lu\\n\", ns->rx_undersize);\n-\tprintf(\"rx_fragments: %lu\\n\", ns->rx_fragments);\n-\tprintf(\"rx_oversize: %lu\\n\", ns->rx_oversize);\n-\tprintf(\"rx_jabber: %lu\\n\", ns->rx_jabber);\n-\tprintf(\"tx_size_64: %lu\\n\", ns->tx_size_64);\n-\tprintf(\"tx_size_127: %lu\\n\", ns->tx_size_127);\n-\tprintf(\"tx_size_255: %lu\\n\", ns->tx_size_255);\n-\tprintf(\"tx_size_511: %lu\\n\", ns->tx_size_511);\n-\tprintf(\"tx_size_1023: %lu\\n\", ns->tx_size_1023);\n-\tprintf(\"tx_size_1522: %lu\\n\", ns->tx_size_1522);\n-\tprintf(\"tx_size_big: %lu\\n\", ns->tx_size_big);\n-\tprintf(\"mac_short_packet_dropped: %lu\\n\",\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_64: %lu\", ns->rx_size_64);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_127: %lu\", ns->rx_size_127);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_255: %lu\", ns->rx_size_255);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_511: %lu\", ns->rx_size_511);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_1023: %lu\", ns->rx_size_1023);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_1522: %lu\", ns->rx_size_1522);\n+\tPMD_DRV_LOG(DEBUG, \"rx_size_big: %lu\", ns->rx_size_big);\n+\tPMD_DRV_LOG(DEBUG, \"rx_undersize: %lu\", ns->rx_undersize);\n+\tPMD_DRV_LOG(DEBUG, \"rx_fragments: %lu\", ns->rx_fragments);\n+\tPMD_DRV_LOG(DEBUG, \"rx_oversize: %lu\", ns->rx_oversize);\n+\tPMD_DRV_LOG(DEBUG, \"rx_jabber: %lu\", ns->rx_jabber);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_64: %lu\", ns->tx_size_64);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_127: %lu\", ns->tx_size_127);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_255: %lu\", ns->tx_size_255);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_511: %lu\", ns->tx_size_511);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_1023: %lu\", ns->tx_size_1023);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_1522: %lu\", ns->tx_size_1522);\n+\tPMD_DRV_LOG(DEBUG, \"tx_size_big: %lu\", ns->tx_size_big);\n+\tPMD_DRV_LOG(DEBUG, \"mac_short_packet_dropped: %lu\",\n \t\t\tns->mac_short_packet_dropped);\n-\tprintf(\"checksum_error: %lu\\n\", ns->checksum_error);\n-\tprintf(\"***************** PF stats end ********************\\n\");\n-#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */\n+\tPMD_DRV_LOG(DEBUG, \"checksum_error: %lu\",\n+\t\t ns->checksum_error);\n+\tPMD_DRV_LOG(DEBUG, \"***************** PF stats end ********************\");\n }\n \n /* Reset the statistics */\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\nindex d8552ad..ed62668 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n@@ -1132,7 +1132,7 @@ static int\n rte_i40evf_pmd_init(const char *name __rte_unused,\n \t\t const char *params __rte_unused)\n {\n-\tDEBUGFUNC(\"rte_i40evf_pmd_init\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \trte_eth_driver_register(&rte_i40evf_pmd);\n \n@@ -1384,7 +1384,7 @@ i40evf_dev_start(struct rte_eth_dev *dev)\n \tstruct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct ether_addr mac_addr;\n \n-\tPMD_DRV_LOG(DEBUG, \"i40evf_dev_start\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \tvf->max_pkt_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;\n \tif (dev->data->dev_conf.rxmode.jumbo_frame == 1) {\ndiff --git a/lib/librte_pmd_i40e/i40e_pf.c b/lib/librte_pmd_i40e/i40e_pf.c\nindex e8b154d..4e1e043 100644\n--- a/lib/librte_pmd_i40e/i40e_pf.c\n+++ b/lib/librte_pmd_i40e/i40e_pf.c\n@@ -253,10 +253,8 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf,\n \tret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval,\n \t\t\t\t\t\tmsg, msglen, NULL);\n \tif (ret) {\n-\t\tPMD_DRV_LOG(ERR, \"Fail to send message to VF, err %u\\n\",\n-\t\t\thw->aq.asq_last_status);\n-\t\tprintf(\"Fail to send message to VF, err %u\\n\",\n-\t\t\t\t\thw->aq.asq_last_status);\n+\t\tPMD_INIT_LOG(ERR, \"Fail to send message to VF, err %u\",\n+\t\t\t hw->aq.asq_last_status);\n \t}\n \n \treturn ret;\ndiff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c\nindex e41e8d0..70e2bd4 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.c\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.c\n@@ -1787,50 +1787,50 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \ttx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?\n \t\ttx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);\n \tif (tx_rs_thresh >= (nb_desc - 2)) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_rs_thresh must be less than the \"\n-\t\t\t\t\"number of TX descriptors minus 2. \"\n-\t\t\t\t\"(tx_rs_thresh=%u port=%d queue=%d)\\n\",\n-\t\t\t\t\t(unsigned int)tx_rs_thresh,\n-\t\t\t\t\t(int)dev->data->port_id,\n-\t\t\t\t\t\t(int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than the \"\n+\t\t\t \"number of TX descriptors minus 2. \"\n+\t\t\t \"(tx_rs_thresh=%u port=%d queue=%d)\",\n+\t\t\t (unsigned int)tx_rs_thresh,\n+\t\t\t (int)dev->data->port_id,\n+\t\t\t (int)queue_idx);\n \t\treturn I40E_ERR_PARAM;\n \t}\n \tif (tx_free_thresh >= (nb_desc - 3)) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_rs_thresh must be less than the \"\n-\t\t\t\t\"tx_free_thresh must be less than the \"\n-\t\t\t\t\"number of TX descriptors minus 3. \"\n-\t\t\t\t\"(tx_free_thresh=%u port=%d queue=%d)\\n\",\n-\t\t\t\t\t(unsigned int)tx_free_thresh,\n-\t\t\t\t\t\t(int)dev->data->port_id,\n-\t\t\t\t\t\t\t(int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than the \"\n+\t\t\t \"tx_free_thresh must be less than the \"\n+\t\t\t \"number of TX descriptors minus 3. \"\n+\t\t\t \"(tx_free_thresh=%u port=%d queue=%d)\",\n+\t\t\t (unsigned int)tx_free_thresh,\n+\t\t\t (int)dev->data->port_id,\n+\t\t\t (int)queue_idx);\n \t\treturn I40E_ERR_PARAM;\n \t}\n \tif (tx_rs_thresh > tx_free_thresh) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_rs_thresh must be less than or \"\n-\t\t\t\t\"equal to tx_free_thresh. (tx_free_thresh=%u\"\n-\t\t\t\t\" tx_rs_thresh=%u port=%d queue=%d)\\n\",\n-\t\t\t\t\t\t(unsigned int)tx_free_thresh,\n-\t\t\t\t\t\t(unsigned int)tx_rs_thresh,\n-\t\t\t\t\t\t(int)dev->data->port_id,\n-\t\t\t\t\t\t\t(int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than or \"\n+\t\t\t \"equal to tx_free_thresh. (tx_free_thresh=%u\"\n+\t\t\t \" tx_rs_thresh=%u port=%d queue=%d)\",\n+\t\t\t (unsigned int)tx_free_thresh,\n+\t\t\t (unsigned int)tx_rs_thresh,\n+\t\t\t (int)dev->data->port_id,\n+\t\t\t (int)queue_idx);\n \t\treturn I40E_ERR_PARAM;\n \t}\n \tif ((nb_desc % tx_rs_thresh) != 0) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_rs_thresh must be a divisor of the \"\n-\t\t\t\t\"number of TX descriptors. (tx_rs_thresh=%u\"\n-\t\t\t\t\t\t\" port=%d queue=%d)\\n\",\n-\t\t\t\t\t\t(unsigned int)tx_rs_thresh,\n-\t\t\t\t\t\t(int)dev->data->port_id,\n-\t\t\t\t\t\t\t(int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"tx_rs_thresh must be a divisor of the \"\n+\t\t\t \"number of TX descriptors. (tx_rs_thresh=%u\"\n+\t\t\t \" port=%d queue=%d)\",\n+\t\t\t (unsigned int)tx_rs_thresh,\n+\t\t\t (int)dev->data->port_id,\n+\t\t\t (int)queue_idx);\n \t\treturn I40E_ERR_PARAM;\n \t}\n \tif ((tx_rs_thresh > 1) && (tx_conf->tx_thresh.wthresh != 0)) {\n-\t\tRTE_LOG(ERR, PMD, \"TX WTHRESH must be set to 0 if \"\n-\t\t\t\t\"tx_rs_thresh is greater than 1. \"\n-\t\t\t\t\"(tx_rs_thresh=%u port=%d queue=%d)\\n\",\n-\t\t\t\t\t(unsigned int)tx_rs_thresh,\n-\t\t\t\t\t(int)dev->data->port_id,\n-\t\t\t\t\t\t(int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"TX WTHRESH must be set to 0 if \"\n+\t\t\t \"tx_rs_thresh is greater than 1. \"\n+\t\t\t \"(tx_rs_thresh=%u port=%d queue=%d)\",\n+\t\t\t (unsigned int)tx_rs_thresh,\n+\t\t\t (int)dev->data->port_id,\n+\t\t\t (int)queue_idx);\n \t\treturn I40E_ERR_PARAM;\n \t}\n \n", "prefixes": [ "dpdk-dev", "v3", "08/20" ] }{ "id": 405, "url": "