get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 90212,
    "url": "http://patches.dpdk.org/api/patches/90212/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210331095254.2454439-2-qi.z.zhang@intel.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": "<20210331095254.2454439-2-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210331095254.2454439-2-qi.z.zhang@intel.com",
    "date": "2021-03-31T09:52:47",
    "name": "[v6,1/8] ether: refine debug build option",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "32dfb8b255f5dee2845cba077053bc363bd902d2",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210331095254.2454439-2-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 16008,
            "url": "http://patches.dpdk.org/api/series/16008/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16008",
            "date": "2021-03-31T09:52:46",
            "name": "ether: refine debug build option",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/16008/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/90212/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/90212/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 40E4CA034F;\n\tWed, 31 Mar 2021 11:49:21 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D5D64140E53;\n\tWed, 31 Mar 2021 11:49:18 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id CD0EC140E42\n for <dev@dpdk.org>; Wed, 31 Mar 2021 11:49:13 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 31 Mar 2021 02:49:13 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by fmsmga002.fm.intel.com with ESMTP; 31 Mar 2021 02:49:10 -0700"
        ],
        "IronPort-SDR": [
            "\n M+NGUu3bUtlguU5TomzLHVUW9iJ/4I743Yn5oSBkYQj1quaX4c7x75+OcAsO7BtJNUWbtPxdHV\n fYqw+Rg1vBMw==",
            "\n Dpj8vylwwZ92Y1J9kGB9faVfiA6HgR1qt65GhuSJUmdZ90HGY4Ada86nmB/Z5puDYF4KWYwNDo\n BqLeonWASy+A=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9939\"; a=\"191448497\"",
            "E=Sophos;i=\"5.81,293,1610438400\"; d=\"scan'208\";a=\"191448497\"",
            "E=Sophos;i=\"5.81,293,1610438400\"; d=\"scan'208\";a=\"445603395\""
        ],
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, thomas@monjalon.net, bruce.richardson@intel.com,\n xiao.w.wang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com,\n jia.guo@intel.com, qiming.yang@intel.com, haiyue.wang@intel.com,\n Qi Zhang <qi.z.zhang@intel.com>",
        "Date": "Wed, 31 Mar 2021 17:52:47 +0800",
        "Message-Id": "<20210331095254.2454439-2-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20210331095254.2454439-1-qi.z.zhang@intel.com>",
        "References": "<20210310121626.2019863-1-qi.z.zhang@intel.com>\n <20210331095254.2454439-1-qi.z.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 1/8] ether: refine debug build option",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "PMDs use RTE_LIBRTE_<PMD_NAME>_DEBUG_RX|TX as build option to wrap\ndata path debug code. As .config has been removed since the meson build,\nIt is not friendly for new DPDK users to notice those debug options.\n\nThe patch introduces below build options for data path debug, so PMD\ncan choose to reuse them to avoid maintain their own.\n\n- RTE_ETHDEV_DEBUG_RX\n- RTE_ETHDEV_DEBUG_TX\n\nAll the build options are documented at programming guide\n\"3.1 Driver Option\", so users can easily find them.\n\nThe original undocumented RTE_LIBRTE_ETHDEV_DEBUG will alias to\nboth RTE_ETHDEV_DEBUG_RX and RTE_ETHDEV_DEBUG_TX for backward\ncompatibility.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n doc/guides/nics/build_and_test.rst | 16 ++++++++++++++++\n lib/librte_ethdev/rte_ethdev.h     | 22 ++++++++++++++--------\n 2 files changed, 30 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst\nindex e83dd4628c..e8b29c2277 100644\n--- a/doc/guides/nics/build_and_test.rst\n+++ b/doc/guides/nics/build_and_test.rst\n@@ -26,6 +26,22 @@ This will also build testpmd.\n Detailed instructions are available\n in the :doc:`meson build guide <../prog_guide/build-sdk-meson>`.\n \n+The ethdev layer supports below build options for debug purpose:\n+\n+- ``RTE_ETHDEV_DEBUG_RX`` (default **disabled**)\n+\n+  Build with debug code on Rx path.\n+\n+- ``RTE_ETHDEV_DEBUG_TX`` (default **disabled**)\n+\n+  Build with debug code on Tx path.\n+\n+.. Note::\n+\n+   The ethdev library use above options to wrap debug code to trace invalid parameters\n+   on data path APIs, so performance downgrade is expected when enabling those options.\n+   Each PMD can decide to reuse them to wrap their own debug code in the Rx/Tx path.\n+\n Running testpmd in Linux\n ------------------------\n \ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex efda3137f7..6c7c72890f 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -148,6 +148,12 @@ extern \"C\" {\n /* Use this macro to check if LRO API is supported */\n #define RTE_ETHDEV_HAS_LRO_SUPPORT\n \n+/* Alias RTE_LIBRTE_ETHDEV_DEBUG for backward compatibility. */\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#define RTE_ETHDEV_DEBUG_RX\n+#define RTE_ETHDEV_DEBUG_TX\n+#endif\n+\n #include <rte_compat.h>\n #include <rte_log.h>\n #include <rte_interrupts.h>\n@@ -4941,7 +4947,7 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \tuint16_t nb_rx;\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_RX\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);\n \n@@ -5075,11 +5081,11 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n \tstruct rte_eth_dev *dev;\n \tvoid *rxq;\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_RX\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n #endif\n \tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_RX\n \tif (queue_id >= dev->data->nb_rx_queues)\n \t\treturn -ENODEV;\n #endif\n@@ -5132,11 +5138,11 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,\n \tstruct rte_eth_dev *dev;\n \tvoid *txq;\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_TX\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n #endif\n \tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_TX\n \tif (queue_id >= dev->data->nb_tx_queues)\n \t\treturn -ENODEV;\n #endif\n@@ -5218,7 +5224,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_TX\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);\n \n@@ -5316,7 +5322,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n {\n \tstruct rte_eth_dev *dev;\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_TX\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n \t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX port_id=%u\\n\", port_id);\n \t\trte_errno = ENODEV;\n@@ -5326,7 +5332,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,\n \n \tdev = &rte_eth_devices[port_id];\n \n-#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+#ifdef RTE_ETHDEV_DEBUG_TX\n \tif (queue_id >= dev->data->nb_tx_queues) {\n \t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n \t\trte_errno = EINVAL;\n",
    "prefixes": [
        "v6",
        "1/8"
    ]
}