Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/285/?format=api
https://patches.dpdk.org/api/patches/285/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1409567080-27083-13-git-send-email-david.marchand@6wind.com/", "project": { "id": 1, "url": "https://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": "<1409567080-27083-13-git-send-email-david.marchand@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1409567080-27083-13-git-send-email-david.marchand@6wind.com", "date": "2014-09-01T10:24:35", "name": "[dpdk-dev,v2,12/17] e1000: use the right debug macro", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4035f15c0208b7300cbc64a1f3c2e1a73fa35fae", "submitter": { "id": 3, "url": "https://patches.dpdk.org/api/people/3/?format=api", "name": "David Marchand", "email": "david.marchand@6wind.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1409567080-27083-13-git-send-email-david.marchand@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/285/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/285/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<david.marchand@6wind.com>", "Received": [ "from mail-wi0-f171.google.com (mail-wi0-f171.google.com\n\t[209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 95E4AB3DB\n\tfor <dev@dpdk.org>; Mon, 1 Sep 2014 12:20:43 +0200 (CEST)", "by mail-wi0-f171.google.com with SMTP id hi2so12266644wib.10\n\tfor <dev@dpdk.org>; Mon, 01 Sep 2014 03:25:10 -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\tlm18sm24287018wic.22.2014.09.01.03.25.09 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 01 Sep 2014 03:25:09 -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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=CwzjB0+Ce4N+H3krcg40IF6VKMMcvvXmTPwwSHqH3m4=;\n\tb=RAB7ec27Ua0q0y5AgI8B1tHUuyx+xVTBC3gd04ZqMGR2H6kbzfkwA4ugrYQOc0wvkx\n\tixrYTecAN6fXjSj5+YQSUJEvjZrhkEGEixEGcRPJgeWIzxgua9N8wmX8kjoG4KnjWE+p\n\txAc3K31zjjkHPLBvYGNwvo6l0mwtZW5ILqL9t/Ma5WSP516Zqh7gx/daMPX0Y+xMJvyd\n\tOsPVH/uzPv4cZnM1hHjVlXew9WGDCbWGYJ25IoGMTefaKYPqCdN1XQS4QZZKXPTPEqR1\n\tg6AvaNoTxorQo6SypnBjAC+lgsa5yAC4XYsd76HmZxXEMT5L9BSFhrauv/AWL/QHHd0q\n\ty2RA==", "X-Gm-Message-State": "ALoCoQkO+QrzHUphWr664syXQMBmsqjm5QVHVOEa500JqNBXcq2c5Zpg5XXXQhQ+hmisLmwub8vN", "X-Received": "by 10.194.87.102 with SMTP id w6mr30722352wjz.24.1409567110493; \n\tMon, 01 Sep 2014 03:25:10 -0700 (PDT)", "From": "David Marchand <david.marchand@6wind.com>", "To": "dev@dpdk.org", "Date": "Mon, 1 Sep 2014 12:24:35 +0200", "Message-Id": "<1409567080-27083-13-git-send-email-david.marchand@6wind.com>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<1409567080-27083-1-git-send-email-david.marchand@6wind.com>", "References": "<1409567080-27083-1-git-send-email-david.marchand@6wind.com>", "Subject": "[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": "Mon, 01 Sep 2014 10:20:44 -0000" }, "content": "- We should not use DEBUGOUT* / DEBUGFUNC macros in non-shared code.\nThese macros come as compat wrappers for shared code.\n- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.\n\nSigned-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(-)", "diff": "diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c\nindex 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 \t\t\t\t\tDEFAULT_TX_RS_THRESH);\n \n \tif (tx_free_thresh >= (nb_desc - 3)) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_free_thresh must be less than the \"\n-\t\t\t\"number of TX descriptors minus 3. (tx_free_thresh=%u \"\n-\t\t\t\"port=%d queue=%d)\\n\", (unsigned int)tx_free_thresh,\n-\t\t\t\t(int)dev->data->port_id, (int)queue_idx);\n+\t\tPMD_INIT_LOG(ERR, \"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\",\n+\t\t\t (unsigned int)tx_free_thresh,\n+\t\t\t (int)dev->data->port_id, (int)queue_idx);\n \t\treturn -(EINVAL);\n \t}\n \tif (tx_rs_thresh > tx_free_thresh) {\n-\t\tRTE_LOG(ERR, PMD, \"tx_rs_thresh must be less than or equal to \"\n-\t\t\t\"tx_free_thresh. (tx_free_thresh=%u tx_rs_thresh=%u \"\n-\t\t\t\"port=%d queue=%d)\\n\", (unsigned int)tx_free_thresh,\n-\t\t\t(unsigned int)tx_rs_thresh, (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 equal to \"\n+\t\t\t \"tx_free_thresh. (tx_free_thresh=%u \"\n+\t\t\t \"tx_rs_thresh=%u port=%d queue=%d)\\n\",\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 -(EINVAL);\n \t}\n \n@@ -1233,10 +1236,10 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,\n \t * accumulates WTHRESH descriptors.\n \t */\n \tif (tx_conf->tx_thresh.wthresh != 0 && tx_rs_thresh != 1) {\n-\t\tRTE_LOG(ERR, PMD, \"TX WTHRESH must be set to 0 if \"\n-\t\t\t\"tx_rs_thresh is greater than 1. (tx_rs_thresh=%u \"\n-\t\t\t\"port=%d queue=%d)\\n\", (unsigned int)tx_rs_thresh,\n-\t\t\t\t(int)dev->data->port_id, (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. (tx_rs_thresh=%u \"\n+\t\t\t \"port=%d queue=%d)\\n\", (unsigned int)tx_rs_thresh,\n+\t\t\t (int)dev->data->port_id, (int)queue_idx);\n \t\treturn -(EINVAL);\n \t}\n \n@@ -1366,7 +1369,8 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,\n \t * EM devices don't support drop_en functionality\n \t */\n \tif (rx_conf->rx_drop_en) {\n-\t\tRTE_LOG(ERR, PMD, \"drop_en functionality not supported by device\\n\");\n+\t\tPMD_INIT_LOG(ERR, \"drop_en functionality not supported by \"\n+\t\t\t \"device\\n\");\n \t\treturn (-EINVAL);\n \t}\n \ndiff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c\nindex 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 \t * So force the release of the faulty lock.\n \t */\n \tif (e1000_get_hw_semaphore_generic(hw) < 0) {\n-\t\tDEBUGOUT(\"SMBI lock released\");\n+\t\tPMD_DRV_LOG(DEBUG, \"SMBI lock released\");\n \t}\n \te1000_put_hw_semaphore_generic(hw);\n \n@@ -416,7 +416,8 @@ igb_reset_swfw_lock(struct e1000_hw *hw)\n \t\tif (hw->bus.func > E1000_FUNC_1)\n \t\t\tmask <<= 2;\n \t\tif (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {\n-\t\t\tDEBUGOUT1(\"SWFW phy%d lock released\", hw->bus.func);\n+\t\t\tPMD_DRV_LOG(DEBUG, \"SWFW phy%d lock released\",\n+\t\t\t\t hw->bus.func);\n \t\t}\n \t\thw->mac.ops.release_swfw_sync(hw, mask);\n \n@@ -428,7 +429,7 @@ igb_reset_swfw_lock(struct e1000_hw *hw)\n \t\t */\n \t\tmask = E1000_SWFW_EEP_SM;\n \t\tif (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {\n-\t\t\tDEBUGOUT(\"SWFW common locks released\");\n+\t\t\tPMD_DRV_LOG(DEBUG, \"SWFW common locks released\");\n \t\t}\n \t\thw->mac.ops.release_swfw_sync(hw, mask);\n \t}\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 __rte_unused)\n {\n-\tDEBUGFUNC(\"rte_igbvf_pmd_init\");\n+\tPMD_INIT_FUNC_TRACE();\n \n \trte_eth_driver_register(&rte_igbvf_pmd);\n \treturn (0);\ndiff --git a/lib/librte_pmd_e1000/igb_pf.c b/lib/librte_pmd_e1000/igb_pf.c\nindex 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 vf)\n \n \tretval = e1000_read_mbx(hw, msgbuf, mbx_size, vf);\n \tif (retval) {\n-\t\tRTE_LOG(ERR, PMD, \"Error mbx recv msg from VF %d\\n\", vf);\n+\t\tPMD_INIT_LOG(ERR, \"Error mbx recv msg from VF %d\\n\", vf);\n \t\treturn retval;\n \t}\n \n@@ -432,7 +432,8 @@ igb_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n \t\tretval = igb_vf_set_vlan(dev, vf, msgbuf);\n \t\tbreak;\n \tdefault:\n-\t\tRTE_LOG(DEBUG, PMD, \"Unhandled Msg %8.8x\\n\", (unsigned) msgbuf[0]);\n+\t\tPMD_INIT_LOG(DEBUG, \"Unhandled Msg %8.8x\\n\",\n+\t\t\t (unsigned) msgbuf[0]);\n \t\tretval = E1000_ERR_MBX;\n \t\tbreak;\n \t}\ndiff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c\nindex 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 \t * driver.\n \t */\n \tif (tx_conf->tx_free_thresh != 0)\n-\t\tRTE_LOG(WARNING, PMD,\n-\t\t\t\"The tx_free_thresh parameter is not \"\n-\t\t\t\"used for the 1G driver.\\n\");\n+\t\tPMD_INIT_LOG(WARNING, \"The tx_free_thresh parameter is not \"\n+\t\t\t \"used for the 1G driver.\\n\");\n \tif (tx_conf->tx_rs_thresh != 0)\n-\t\tRTE_LOG(WARNING, PMD,\n-\t\t\t\"The tx_rs_thresh parameter is not \"\n-\t\t\t\"used for the 1G driver.\\n\");\n+\t\tPMD_INIT_LOG(WARNING, \"The tx_rs_thresh parameter is not \"\n+\t\t\t \"used for the 1G driver.\\n\");\n \tif (tx_conf->tx_thresh.wthresh == 0)\n-\t\tRTE_LOG(WARNING, PMD,\n-\t\t\t\"To improve 1G driver performance, consider setting \"\n-\t\t\t\"the TX WTHRESH value to 4, 8, or 16.\\n\");\n+\t\tPMD_INIT_LOG(WARNING, \"To improve 1G driver performance, \"\n+\t\t\t \"consider setting the TX WTHRESH value to 4, 8, \"\n+\t\t\t \"or 16.\\n\");\n \n \t/* Free memory prior to re-allocation if needed */\n \tif (dev->data->tx_queues[queue_idx] != NULL) {\n", "prefixes": [ "dpdk-dev", "v2", "12/17" ] }{ "id": 285, "url": "