Show a patch.

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

{
    "id": 411,
    "url": "https://patches.dpdk.org/api/patches/411/",
    "web_url": "https://patches.dpdk.org/patch/411/",
    "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-15-git-send-email-david.marchand@6wind.com>",
    "date": "2014-09-17T13:46:46",
    "name": "[dpdk-dev,v3,14/20] e1000: use the right debug macro",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2b50e3a634a4db390f64f089f758c0f13a2ed6db",
    "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/411/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/411/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/411/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=EEgTqWq9Fd+PEcbR434X7lzmnhwKztZLxuF5UVrBpu0=;\n\tb=YlPDDb5JX43N8jsqbXVX6y0E0aW0PWs+5mpdvqKYcRn5aSwJLV+B3/kq/QTZVZgqBr\n\t2l4NLZyNMkgNuww5Vk1Ot9WVlyrWy8pD1x3XrQyxeUmCn1ndcnAMSLXkL3tsly2u00fv\n\taQXc3BEaY62tAGI1tVycWADltRRUTJfgLEToqzWtzKzL7cbvzmoEQlfCcTyob99cuGJ/\n\tS70MBqzwFXVmtekD3BrL3TbLco24oFdROEJYTHlS6aITmILUpqfeOEZNBiRmkPV1nLF0\n\temirO37H9HsjaQx0onG4Ka/WrbKsYagjINmX4XsAmyaY9vCa7vT+rkUUp+AxY6aPv87e\n\tkpeQ==",
        "In-Reply-To": "<1410961612-8571-1-git-send-email-david.marchand@6wind.com>",
        "Precedence": "list",
        "Date": "Wed, 17 Sep 2014 15:46:46 +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": "ALoCoQl83eFIZMaNaPMWngIrKSCSdJR9QkzwnWyMH2Jgiann1BHQYVpaZSCUrj0j8MWJMZygxDct",
        "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 ABF1EB3E0;\n\tWed, 17 Sep 2014 15:41:48 +0200 (CEST)",
            "from mail-we0-f170.google.com (mail-we0-f170.google.com\n\t[74.125.82.170]) by dpdk.org (Postfix) with ESMTP id C371CB3A4\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 15:41:44 +0200 (CEST)",
            "by mail-we0-f170.google.com with SMTP id u57so1472045wes.15\n\tfor <dev@dpdk.org>; Wed, 17 Sep 2014 06:47:26 -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.24 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 17 Sep 2014 06:47:25 -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-15-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 14/20] e1000: use the right debug macro",
        "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.57.237 with SMTP id l13mr22174537wjq.102.1410961645956;\n\tWed, 17 Sep 2014 06:47:25 -0700 (PDT)",
        "X-Mailman-Version": "2.1.15"
    },
    "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>\nv2 Reviewed-by: Jay Rolette <rolette@infiniteio.com>\nv2 Acked-by: Bruce Richardson <bruce.richardson@intel.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 ba7e3a9..ce0c115 100644\n--- a/lib/librte_pmd_e1000/em_rxtx.c\n+++ b/lib/librte_pmd_e1000/em_rxtx.c\n@@ -1233,18 +1233,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+\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+\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@@ -1255,10 +1258,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)\", (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@@ -1388,7 +1391,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 \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..bc3816a 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\", 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+\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 d4a803e..5600d02 100644\n--- a/lib/librte_pmd_e1000/igb_rxtx.c\n+++ b/lib/librte_pmd_e1000/igb_rxtx.c\n@@ -1229,17 +1229,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 \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 \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 \t/* Free memory prior to re-allocation if needed */\n \tif (dev->data->tx_queues[queue_idx] != NULL) {\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "14/20"
    ]
}