List patch comments

GET /api/patches/285/comments/?format=api&order=-submitter
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/285/comments/?format=api&order=-submitter&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/285/comments/?format=api&order=-submitter&page=1>; rel="last"
Vary: Accept
[ { "id": 627, "web_url": "https://patches.dpdk.org/comment/627/", "msgid": "<CADNuJVqR1J08Vj8BiiiJqQC7yVY_bxBSynbyYx7XkF+FaHQgWg@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CADNuJVqR1J08Vj8BiiiJqQC7yVY_bxBSynbyYx7XkF+FaHQgWg@mail.gmail.com", "date": "2014-09-02T18:29:30", "subject": "Re: [dpdk-dev] [PATCH v2 12/17] e1000: use the right debug macro", "submitter": { "id": 61, "url": "https://patches.dpdk.org/api/people/61/?format=api", "name": "Jay Rolette", "email": "rolette@infiniteio.com" }, "content": "On Mon, Sep 1, 2014 at 5:24 AM, David Marchand <david.marchand@6wind.com>\nwrote:\n\n> - We should not use DEBUGOUT* / DEBUGFUNC macros in non-shared code.\n> These macros come as compat wrappers for shared code.\n> - We should avoid calling RTE_LOG directly as pmd provides a wrapper for\n> logs.\n>\n> Signed-off-by: David Marchand <david.marchand@6wind.com>\n> ---\n> lib/librte_pmd_e1000/em_rxtx.c | 32 ++++++++++++++++++--------------\n> lib/librte_pmd_e1000/igb_ethdev.c | 9 +++++----\n> lib/librte_pmd_e1000/igb_pf.c | 5 +++--\n> lib/librte_pmd_e1000/igb_rxtx.c | 16 +++++++---------\n> 4 files changed, 33 insertions(+), 29 deletions(-)\n>\n> diff --git a/lib/librte_pmd_e1000/em_rxtx.c\n> b/lib/librte_pmd_e1000/em_rxtx.c\n> index f254858..01efa50 100644\n> --- a/lib/librte_pmd_e1000/em_rxtx.c\n> +++ b/lib/librte_pmd_e1000/em_rxtx.c\n> @@ -1211,18 +1211,21 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,\n> DEFAULT_TX_RS_THRESH);\n>\n> if (tx_free_thresh >= (nb_desc - 3)) {\n> - RTE_LOG(ERR, PMD, \"tx_free_thresh must be less than the \"\n> - \"number of TX descriptors minus 3.\n> (tx_free_thresh=%u \"\n> - \"port=%d queue=%d)\\n\", (unsigned\n> int)tx_free_thresh,\n> - (int)dev->data->port_id, (int)queue_idx);\n> + PMD_INIT_LOG(ERR, \"tx_free_thresh must be less than the \"\n> + \"number of TX descriptors minus 3. \"\n> + \"(tx_free_thresh=%u port=%d queue=%d)\\n\",\n> + (unsigned int)tx_free_thresh,\n> + (int)dev->data->port_id, (int)queue_idx);\n> return -(EINVAL);\n> }\n> if (tx_rs_thresh > tx_free_thresh) {\n> - RTE_LOG(ERR, PMD, \"tx_rs_thresh must be less than or equal\n> to \"\n> - \"tx_free_thresh. (tx_free_thresh=%u\n> tx_rs_thresh=%u \"\n> - \"port=%d queue=%d)\\n\", (unsigned\n> int)tx_free_thresh,\n> - (unsigned int)tx_rs_thresh,\n> (int)dev->data->port_id,\n> - (int)queue_idx);\n> + PMD_INIT_LOG(ERR, \"tx_rs_thresh must be less than or equal\n> to \"\n> + \"tx_free_thresh. (tx_free_thresh=%u \"\n> + \"tx_rs_thresh=%u port=%d queue=%d)\\n\",\n> + (unsigned int)tx_free_thresh,\n> + (unsigned int)tx_rs_thresh,\n> + (int)dev->data->port_id,\n> + (int)queue_idx);\n> return -(EINVAL);\n> }\n>\n> @@ -1233,10 +1236,10 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,\n> * accumulates WTHRESH descriptors.\n> */\n> if (tx_conf->tx_thresh.wthresh != 0 && tx_rs_thresh != 1) {\n> - RTE_LOG(ERR, PMD, \"TX WTHRESH must be set to 0 if \"\n> - \"tx_rs_thresh is greater than 1. (tx_rs_thresh=%u \"\n> - \"port=%d queue=%d)\\n\", (unsigned int)tx_rs_thresh,\n> - (int)dev->data->port_id, (int)queue_idx);\n> + PMD_INIT_LOG(ERR, \"TX WTHRESH must be set to 0 if \"\n> + \"tx_rs_thresh is greater than 1.\n> (tx_rs_thresh=%u \"\n> + \"port=%d queue=%d)\\n\", (unsigned\n> int)tx_rs_thresh,\n> + (int)dev->data->port_id, (int)queue_idx);\n> return -(EINVAL);\n> }\n>\n> @@ -1366,7 +1369,8 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,\n> * EM devices don't support drop_en functionality\n> */\n> if (rx_conf->rx_drop_en) {\n> - RTE_LOG(ERR, PMD, \"drop_en functionality not supported by\n> device\\n\");\n> + PMD_INIT_LOG(ERR, \"drop_en functionality not supported by \"\n> + \"device\\n\");\n> return (-EINVAL);\n> }\n>\n> diff --git a/lib/librte_pmd_e1000/igb_ethdev.c\n> b/lib/librte_pmd_e1000/igb_ethdev.c\n> index 3187d92..b45eb24 100644\n> --- a/lib/librte_pmd_e1000/igb_ethdev.c\n> +++ b/lib/librte_pmd_e1000/igb_ethdev.c\n> @@ -400,7 +400,7 @@ igb_reset_swfw_lock(struct e1000_hw *hw)\n> * So force the release of the faulty lock.\n> */\n> if (e1000_get_hw_semaphore_generic(hw) < 0) {\n> - DEBUGOUT(\"SMBI lock released\");\n> + PMD_DRV_LOG(DEBUG, \"SMBI lock released\");\n> }\n> e1000_put_hw_semaphore_generic(hw);\n>\n> @@ -416,7 +416,8 @@ igb_reset_swfw_lock(struct e1000_hw *hw)\n> if (hw->bus.func > E1000_FUNC_1)\n> mask <<= 2;\n> if (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {\n> - DEBUGOUT1(\"SWFW phy%d lock released\",\n> hw->bus.func);\n> + PMD_DRV_LOG(DEBUG, \"SWFW phy%d lock released\",\n> + hw->bus.func);\n> }\n> hw->mac.ops.release_swfw_sync(hw, mask);\n>\n> @@ -428,7 +429,7 @@ igb_reset_swfw_lock(struct e1000_hw *hw)\n> */\n> mask = E1000_SWFW_EEP_SM;\n> if (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {\n> - DEBUGOUT(\"SWFW common locks released\");\n> + PMD_DRV_LOG(DEBUG, \"SWFW common locks released\");\n> }\n> hw->mac.ops.release_swfw_sync(hw, mask);\n> }\n> @@ -707,7 +708,7 @@ igb_vmdq_vlan_hw_filter_enable(struct rte_eth_dev *dev)\n> static int\n> rte_igbvf_pmd_init(const char *name __rte_unused, const char *params\n> __rte_unused)\n> {\n> - DEBUGFUNC(\"rte_igbvf_pmd_init\");\n> + PMD_INIT_FUNC_TRACE();\n>\n> rte_eth_driver_register(&rte_igbvf_pmd);\n> return (0);\n> diff --git a/lib/librte_pmd_e1000/igb_pf.c b/lib/librte_pmd_e1000/igb_pf.c\n> index 3d405f0..76033ad 100644\n> --- a/lib/librte_pmd_e1000/igb_pf.c\n> +++ b/lib/librte_pmd_e1000/igb_pf.c\n> @@ -404,7 +404,7 @@ igb_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t\n> vf)\n>\n> retval = e1000_read_mbx(hw, msgbuf, mbx_size, vf);\n> if (retval) {\n> - RTE_LOG(ERR, PMD, \"Error mbx recv msg from VF %d\\n\", vf);\n> + PMD_INIT_LOG(ERR, \"Error mbx recv msg from VF %d\\n\", vf);\n> return retval;\n> }\n>\n> @@ -432,7 +432,8 @@ igb_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t\n> vf)\n> retval = igb_vf_set_vlan(dev, vf, msgbuf);\n> break;\n> default:\n> - RTE_LOG(DEBUG, PMD, \"Unhandled Msg %8.8x\\n\", (unsigned)\n> msgbuf[0]);\n> + PMD_INIT_LOG(DEBUG, \"Unhandled Msg %8.8x\\n\",\n> + (unsigned) msgbuf[0]);\n> retval = E1000_ERR_MBX;\n> break;\n> }\n> diff --git a/lib/librte_pmd_e1000/igb_rxtx.c\n> b/lib/librte_pmd_e1000/igb_rxtx.c\n> index 977c4a2..3aa9609 100644\n> --- a/lib/librte_pmd_e1000/igb_rxtx.c\n> +++ b/lib/librte_pmd_e1000/igb_rxtx.c\n> @@ -1210,17 +1210,15 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,\n> * driver.\n> */\n> if (tx_conf->tx_free_thresh != 0)\n> - RTE_LOG(WARNING, PMD,\n> - \"The tx_free_thresh parameter is not \"\n> - \"used for the 1G driver.\\n\");\n> + PMD_INIT_LOG(WARNING, \"The tx_free_thresh parameter is not\n> \"\n> + \"used for the 1G driver.\\n\");\n> if (tx_conf->tx_rs_thresh != 0)\n> - RTE_LOG(WARNING, PMD,\n> - \"The tx_rs_thresh parameter is not \"\n> - \"used for the 1G driver.\\n\");\n> + PMD_INIT_LOG(WARNING, \"The tx_rs_thresh parameter is not \"\n> + \"used for the 1G driver.\\n\");\n> if (tx_conf->tx_thresh.wthresh == 0)\n> - RTE_LOG(WARNING, PMD,\n> - \"To improve 1G driver performance, consider\n> setting \"\n> - \"the TX WTHRESH value to 4, 8, or 16.\\n\");\n> + PMD_INIT_LOG(WARNING, \"To improve 1G driver performance, \"\n> + \"consider setting the TX WTHRESH value to 4,\n> 8, \"\n> + \"or 16.\\n\");\n>\n> /* Free memory prior to re-allocation if needed */\n> if (dev->data->tx_queues[queue_idx] != NULL) {\n> --\n> 1.7.10.4\n>\n> Reviewed-by: Jay Rolette <rolette@infiniteio.com>", "headers": { "Return-Path": "<rolette@infiniteio.com>", "Received": [ "from mail-yh0-f41.google.com (mail-yh0-f41.google.com\n\t[209.85.213.41]) by dpdk.org (Postfix) with ESMTP id A2DB45947\n\tfor <dev@dpdk.org>; Tue, 2 Sep 2014 20:24:58 +0200 (CEST)", "by mail-yh0-f41.google.com with SMTP id 29so4599329yhl.0\n\tfor <dev@dpdk.org>; Tue, 02 Sep 2014 11:29:31 -0700 (PDT)", "by 10.170.96.213 with HTTP; Tue, 2 Sep 2014 11:29:30 -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:mime-version:in-reply-to:references:date\n\t:message-id:subject:from:to:cc:content-type;\n\tbh=z7Dmk7HTBfEPFVtesrQL7XxpRrpL6jQIzC5fu6qmvps=;\n\tb=Mv0U4HaSKfOY0Bn3ZfRZUQ/7bhZzMG9ZIGQlnieymIUj9DSR8hBO2Ki7f4ql2eBulb\n\tG23HKB2N8iTDCosq+GGueNAIBfyYAkJ1rNgsFdZwh6jeMWJm9CH7QWB3qgZU84vjfQEv\n\tpcP1aasWmDn8rffJQTDbyDdQEB86qEdXU2PJ7JwI5ka07f7qSuZU0Qt1ofR/2NwWeyS7\n\tb6PFdkZrHTbxKLFvuhvTG5CxGmqR7iUwYY7nqI/SEpJUK8E6YiaTGphBdPj63yQVJ6MR\n\tvUZ/XkxVIaDv+bXldPDG3/gD0OrQmXLl4WLNMHNCGUcVH2ErOwFzbWAzhvdB7VeMEUX9\n\tsEvA==", "X-Gm-Message-State": "ALoCoQn+ccu6aKJJOsTZsYg+8Ux9/h5Dfn0Hk1iety6ZPNmQo4dEbtMelx5SwPLUYtQOtJIqQcG1", "MIME-Version": "1.0", "X-Received": "by 10.236.220.101 with SMTP id n95mr57695053yhp.63.1409682571020;\n\tTue, 02 Sep 2014 11:29:31 -0700 (PDT)", "In-Reply-To": "<1409567080-27083-13-git-send-email-david.marchand@6wind.com>", "References": "<1409567080-27083-1-git-send-email-david.marchand@6wind.com>\n\t<1409567080-27083-13-git-send-email-david.marchand@6wind.com>", "Date": "Tue, 2 Sep 2014 13:29:30 -0500", "Message-ID": "<CADNuJVqR1J08Vj8BiiiJqQC7yVY_bxBSynbyYx7XkF+FaHQgWg@mail.gmail.com>", "From": "Jay Rolette <rolette@infiniteio.com>", "To": "David Marchand <david.marchand@6wind.com>", "Content-Type": "text/plain; charset=UTF-8", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Cc": "\"dev@dpdk.org\" <dev@dpdk.org>", "Subject": "Re: [dpdk-dev] [PATCH v2 12/17] e1000: 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>", "X-List-Received-Date": "Tue, 02 Sep 2014 18:24:59 -0000" }, "addressed": null } ]