get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41243,
    "url": "https://patches.dpdk.org/api/patches/41243/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180619010457.61490-1-ferruh.yigit@intel.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": "<20180619010457.61490-1-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180619010457.61490-1-ferruh.yigit@intel.com",
    "date": "2018-06-19T01:04:55",
    "name": "[v4,1/3] ethdev: move log macro to header",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3a3d58cf46e18bfb093794bde50c5fd298c9b292",
    "submitter": {
        "id": 324,
        "url": "https://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180619010457.61490-1-ferruh.yigit@intel.com/mbox/",
    "series": [
        {
            "id": 159,
            "url": "https://patches.dpdk.org/api/series/159/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=159",
            "date": "2018-06-19T01:04:55",
            "name": "[v4,1/3] ethdev: move log macro to header",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/159/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/41243/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/41243/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BAA132BAF;\n\tTue, 19 Jun 2018 02:05:23 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 19B222BAF\n\tfor <dev@dpdk.org>; Tue, 19 Jun 2018 02:05:21 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Jun 2018 17:05:20 -0700",
            "from silpixa00399752.ir.intel.com (HELO\n\tsilpixa00399752.ger.corp.intel.com) ([10.237.222.212])\n\tby orsmga003.jf.intel.com with ESMTP; 18 Jun 2018 17:05:19 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,241,1526367600\"; d=\"scan'208\";a=\"60275251\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>",
        "Cc": "dev@dpdk.org,\n\tFerruh Yigit <ferruh.yigit@intel.com>",
        "Date": "Tue, 19 Jun 2018 02:04:55 +0100",
        "Message-Id": "<20180619010457.61490-1-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20180514155648.81149-1-ferruh.yigit@intel.com>",
        "References": "<20180514155648.81149-1-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 1/3] ethdev: move log macro to header",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Macro moved to header to be able to convert logging usage in header.\nAnd since it has been moved to public header changed naming and added\nRTE prefix, ethdev_log -> RTE_ETHDEV_LOG\n\nAlso need to add logtype variable to map file since logging macro used\nfrom other libraries.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nv2:\n* updated commit log\n\nv3: no update\n\nv4:\n* rename logtype variable to rte_eth_dev_logtype\n* add logtype variable to .map file\n---\n lib/librte_ethdev/rte_ethdev.c           | 37 ++++++++++++------------\n lib/librte_ethdev/rte_ethdev.h           |  5 ++++\n lib/librte_ethdev/rte_ethdev_version.map |  7 +++++\n 3 files changed, 30 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex a9977df97..2f696bfa9 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -42,10 +42,7 @@\n #include \"rte_ethdev_driver.h\"\n #include \"ethdev_profile.h\"\n \n-static int ethdev_logtype;\n-\n-#define ethdev_log(level, fmt, ...) \\\n-\trte_log(RTE_LOG_ ## level, ethdev_logtype, fmt \"\\n\", ## __VA_ARGS__)\n+int rte_eth_dev_logtype;\n \n static const char *MZ_RTE_ETH_DEV_DATA = \"rte_eth_dev_data\";\n struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS];\n@@ -303,14 +300,16 @@ rte_eth_dev_allocate(const char *name)\n \trte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);\n \n \tif (_rte_eth_dev_allocated(name) != NULL) {\n-\t\tethdev_log(ERR, \"Ethernet device with name %s already allocated\",\n-\t\t\t\tname);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethernet device with name %s already allocated\\n\",\n+\t\t\tname);\n \t\tgoto unlock;\n \t}\n \n \tport_id = rte_eth_dev_find_free_port();\n \tif (port_id == RTE_MAX_ETHPORTS) {\n-\t\tethdev_log(ERR, \"Reached maximum number of Ethernet ports\");\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Reached maximum number of Ethernet ports\\n\");\n \t\tgoto unlock;\n \t}\n \n@@ -663,7 +662,7 @@ rte_eth_dev_attach(const char *devargs, uint16_t *port_id)\n \n \t/* no point looking at the port count if no port exists */\n \tif (!rte_eth_dev_count_total()) {\n-\t\tethdev_log(ERR, \"No port found for device (%s)\", da.name);\n+\t\tRTE_ETHDEV_LOG(ERR, \"No port found for device (%s)\\n\", da.name);\n \t\tret = -1;\n \t\tgoto err;\n \t}\n@@ -698,8 +697,8 @@ rte_eth_dev_detach(uint16_t port_id, char *name __rte_unused)\n \n \tdev_flags = rte_eth_devices[port_id].data->dev_flags;\n \tif (dev_flags & RTE_ETH_DEV_BONDED_SLAVE) {\n-\t\tethdev_log(ERR,\n-\t\t\t\"Port %\" PRIu16 \" is bonded, cannot detach\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Port %\" PRIu16 \" is bonded, cannot detach\\n\", port_id);\n \t\treturn -ENOTSUP;\n \t}\n \n@@ -1164,7 +1163,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t/* Any requested offloading must be within its device capabilities */\n \tif ((local_conf.rxmode.offloads & dev_info.rx_offload_capa) !=\n \t     local_conf.rxmode.offloads) {\n-\t\tethdev_log(ERR, \"ethdev port_id=%d requested Rx offloads \"\n+\t\tRTE_ETHDEV_LOG(ERR, \"ethdev port_id=%d requested Rx offloads \"\n \t\t\t\t\"0x%\" PRIx64 \" doesn't match Rx offloads \"\n \t\t\t\t\"capabilities 0x%\" PRIx64 \" in %s()\\n\",\n \t\t\t\tport_id,\n@@ -1175,7 +1174,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t}\n \tif ((local_conf.txmode.offloads & dev_info.tx_offload_capa) !=\n \t     local_conf.txmode.offloads) {\n-\t\tethdev_log(ERR, \"ethdev port_id=%d requested Tx offloads \"\n+\t\tRTE_ETHDEV_LOG(ERR, \"ethdev port_id=%d requested Tx offloads \"\n \t\t\t\t\"0x%\" PRIx64 \" doesn't match Tx offloads \"\n \t\t\t\t\"capabilities 0x%\" PRIx64 \" in %s()\\n\",\n \t\t\t\tport_id,\n@@ -1572,7 +1571,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t */\n \tif ((local_conf.offloads & dev_info.rx_queue_offload_capa) !=\n \t     local_conf.offloads) {\n-\t\tethdev_log(ERR, \"Ethdev port_id=%d rx_queue_id=%d, new \"\n+\t\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%d rx_queue_id=%d, new \"\n \t\t\t\t\"added offloads 0x%\" PRIx64 \" must be \"\n \t\t\t\t\"within pre-queue offload capabilities 0x%\"\n \t\t\t\tPRIx64 \" in %s()\\n\",\n@@ -1737,7 +1736,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \t */\n \tif ((local_conf.offloads & dev_info.tx_queue_offload_capa) !=\n \t     local_conf.offloads) {\n-\t\tethdev_log(ERR, \"Ethdev port_id=%d tx_queue_id=%d, new \"\n+\t\tRTE_ETHDEV_LOG(ERR, \"Ethdev port_id=%d tx_queue_id=%d, new \"\n \t\t\t\t\"added offloads 0x%\" PRIx64 \" must be \"\n \t\t\t\t\"within pre-queue offload capabilities 0x%\"\n \t\t\t\tPRIx64 \" in %s()\\n\",\n@@ -3343,7 +3342,7 @@ rte_eth_dev_callback_register(uint16_t port_id,\n \t\treturn -EINVAL;\n \n \tif (!rte_eth_dev_is_valid_port(port_id) && port_id != RTE_ETH_ALL) {\n-\t\tethdev_log(ERR, \"Invalid port_id=%d\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid port_id=%d\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -3406,7 +3405,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,\n \t\treturn -EINVAL;\n \n \tif (!rte_eth_dev_is_valid_port(port_id) && port_id != RTE_ETH_ALL) {\n-\t\tethdev_log(ERR, \"Invalid port_id=%d\", port_id);\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid port_id=%d\\n\", port_id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -4522,7 +4521,7 @@ RTE_INIT(ethdev_init_log);\n static void\n ethdev_init_log(void)\n {\n-\tethdev_logtype = rte_log_register(\"lib.ethdev\");\n-\tif (ethdev_logtype >= 0)\n-\t\trte_log_set_level(ethdev_logtype, RTE_LOG_INFO);\n+\trte_eth_dev_logtype = rte_log_register(\"lib.ethdev\");\n+\tif (rte_eth_dev_logtype >= 0)\n+\t\trte_log_set_level(rte_eth_dev_logtype, RTE_LOG_INFO);\n }\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 36e3984ea..24f4b93b7 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -159,6 +159,11 @@ extern \"C\" {\n #include \"rte_eth_ctrl.h\"\n #include \"rte_dev_info.h\"\n \n+extern int rte_eth_dev_logtype;\n+\n+#define RTE_ETHDEV_LOG(level, ...) \\\n+\trte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, \"\" __VA_ARGS__)\n+\n struct rte_mbuf;\n \n /**\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex 40cf42b8a..9a0d12d41 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -213,6 +213,13 @@ DPDK_18.05 {\n \n } DPDK_18.02;\n \n+DPDK_18.08 {\n+\tglobal:\n+\n+\trte_eth_dev_logtype;\n+\n+} DPDK_18.05;\n+\n EXPERIMENTAL {\n \tglobal:\n \n",
    "prefixes": [
        "v4",
        "1/3"
    ]
}