get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 88764,
    "url": "http://patchwork.dpdk.org/api/patches/88764/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210309233116.1934666-5-thomas@monjalon.net/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210309233116.1934666-5-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210309233116.1934666-5-thomas@monjalon.net",
    "date": "2021-03-09T23:31:08",
    "name": "[04/11] eal: move private log functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9e7572d9a4b73e19214a2176420e6becee3491ad",
    "submitter": {
        "id": 685,
        "url": "http://patchwork.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210309233116.1934666-5-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 15554,
            "url": "http://patchwork.dpdk.org/api/series/15554/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15554",
            "date": "2021-03-09T23:31:04",
            "name": "improve options help",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/15554/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/88764/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/88764/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 11679A0567;\n\tWed, 10 Mar 2021 00:32:10 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C613A22A566;\n\tWed, 10 Mar 2021 00:31:47 +0100 (CET)",
            "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id AB11A22A55D\n for <dev@dpdk.org>; Wed, 10 Mar 2021 00:31:45 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id 5DDB25C009A;\n Tue,  9 Mar 2021 18:31:45 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Tue, 09 Mar 2021 18:31:45 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 8557B240057;\n Tue,  9 Mar 2021 18:31:44 -0500 (EST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm3; bh=abEB2/vtZL7+n\n p7LAevGDf9oDnCLt0wbqa3xKtjKC7Y=; b=oKjXkXeIPMalysITEYPARptEgrIhE\n z9xaylWsis3gR/G8xRt5L8I93flPhgUPNpVAHOwb+at95UEbDLvA/9Rzq2pVa78T\n 6r0D3srbz0p9Cu0g2kFxiPUnEaljxq6C1+xOzv83MMp4la+G8iRsFFdUhWcmLwxS\n 4Q3lIgkLOlqZrhLaiKtXy52IUCr0TxBjWQOAeI7L9n3E9ll3KitjhXTWy6wIh8Pf\n NbM+LEZ9HUy9psBxjbihs6oSDz2rTHiOo0wNtSkTLNyl42OEGLYpI/3ZohpYq9Fx\n F0CpaIMiQlXgd2fsxJIU4IilgYQ9+vynWoXQtn2W9LUNS6cMLQnA2+1FA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm2; bh=abEB2/vtZL7+np7LAevGDf9oDnCLt0wbqa3xKtjKC7Y=; b=gdvkD8GL\n K1Kzooh2Nd2MmiHiQqvIySOL5Qml+Dc8BJb1sHdVLWlY/IHyTnEUI6eTFP8ZZPZ1\n kRPkNUVrIumdl8W5SVD0p7xDgzIg2BvP6IpD6YM1s6e/OO0STfMSDFmsDOjlXFZC\n YX+yPIhDvIu2iRlnGJr6RUH6bEh4FD+l9PbG9cvmHCbztRrkuOdSgYd1XF2SSTG+\n mAdAW652OoKjquR2ysAIueUMo16FIZhgqRtH5QF1F2oxjzc9b/JISMV2zGcvKWIU\n XwTNWJB0E5527uyOHCk2uEmXmZEbloM/l6g/nvP20BfhznXCdp9Qu1AiD+4aqJLY\n RLG2jO5SZvPEGg=="
        ],
        "X-ME-Sender": "<xms:YQVIYAcmFADObQuTf1sZP-bLuNMEYV-YmT9Mvn6VPaAa2-Pt_y2ZRg>\n <xme:YQVIYCOXKIt4plXaGhhi6qkre3hUDAB5GkOli_Mi3_HUWN62O0nNcb1Um3dR8ziq9\n urK5brRnp4H4iNlrA>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduledrudduiedgudejgecutefuodetggdotefrod\n ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh\n necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd\n enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm\n rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc\n ggtffrrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedt\n gfeutdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh\n fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr\n lhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:YQVIYBgktl2nMHjOGFGcqahf00suhVX11D1loJ-CBm0c7GC9IyGWMA>\n <xmx:YQVIYF9a_uVGh5upTCDwLbfAj9YXFV2jPzDUj_Ab9XNJwoSb65Z7LQ>\n <xmx:YQVIYMuYVWBACHcl9rF2oE2ivdwO9lmpOV_JpR1kenZPOLXmbv4EpQ>\n <xmx:YQVIYILpnUsqZh_JfOck2DpxKTZfNyLm0Z3QxxrOLefL2TTmSWEQYA>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>",
        "Date": "Wed, 10 Mar 2021 00:31:08 +0100",
        "Message-Id": "<20210309233116.1934666-5-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.30.1",
        "In-Reply-To": "<20210309233116.1934666-1-thomas@monjalon.net>",
        "References": "<20210309233116.1934666-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 04/11] eal: move private log functions",
        "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": "Some private log functions had a wrong \"rte_\" prefix.\n\nAll private log functions are moved from eal_private.h\nto the new file eal_log.h:\n\trte_eal_log_init -> eal_log_init\n\trte_log_save_regexp -> eal_log_save_regexp\n\trte_log_save_pattern -> eal_log_save_pattern\n\teal_log_set_default\n\nThe static functions in the file eal_common_log.c are renamed:\n\trte_log_save_level -> log_save_level\n\trte_log_init -> log_init\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n lib/librte_eal/common/eal_common_log.c     | 18 ++++++++------\n lib/librte_eal/common/eal_common_options.c |  5 ++--\n lib/librte_eal/common/eal_log.h            | 27 ++++++++++++++++++++\n lib/librte_eal/common/eal_private.h        | 29 ----------------------\n lib/librte_eal/linux/eal.c                 |  3 ++-\n lib/librte_eal/linux/eal_log.c             |  4 +--\n lib/librte_eal/windows/eal.c               |  3 ++-\n lib/librte_eal/windows/eal_log.c           |  6 +++--\n 8 files changed, 50 insertions(+), 45 deletions(-)\n create mode 100644 lib/librte_eal/common/eal_log.h",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c\nindex c5554badb2..85364ee47a 100644\n--- a/lib/librte_eal/common/eal_common_log.c\n+++ b/lib/librte_eal/common/eal_common_log.c\n@@ -15,7 +15,7 @@\n #include <rte_log.h>\n #include <rte_per_lcore.h>\n \n-#include \"eal_private.h\"\n+#include \"eal_log.h\"\n \n struct rte_log_dynamic_type {\n \tconst char *name;\n@@ -178,8 +178,8 @@ rte_log_set_level_regexp(const char *regex, uint32_t level)\n  * Save the type string and the loglevel for later dynamic\n  * logtypes which may register later.\n  */\n-static int rte_log_save_level(int priority,\n-\t\t\t      const char *regex, const char *pattern)\n+static int\n+log_save_level(int priority, const char *regex, const char *pattern)\n {\n \tstruct rte_eal_opt_loglevel *opt_ll = NULL;\n \n@@ -207,9 +207,10 @@ static int rte_log_save_level(int priority,\n \treturn -1;\n }\n \n-int rte_log_save_regexp(const char *regex, int tmp)\n+int\n+eal_log_save_regexp(const char *regex, int tmp)\n {\n-\treturn rte_log_save_level(tmp, regex, NULL);\n+\treturn log_save_level(tmp, regex, NULL);\n }\n \n /* set log level based on globbing pattern */\n@@ -232,9 +233,10 @@ rte_log_set_level_pattern(const char *pattern, uint32_t level)\n \treturn 0;\n }\n \n-int rte_log_save_pattern(const char *pattern, int priority)\n+int\n+eal_log_save_pattern(const char *pattern, int priority)\n {\n-\treturn rte_log_save_level(priority, NULL, pattern);\n+\treturn log_save_level(priority, NULL, pattern);\n }\n \n /* get the current loglevel for the message being processed */\n@@ -376,7 +378,7 @@ static const struct logtype logtype_strings[] = {\n };\n \n /* Logging should be first initializer (before drivers and bus) */\n-RTE_INIT_PRIO(rte_log_init, LOG)\n+RTE_INIT_PRIO(log_init, LOG)\n {\n \tuint32_t i;\n \ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 52fedb81e5..02374ee09e 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -41,6 +41,7 @@\n #include \"eal_options.h\"\n #include \"eal_filesystem.h\"\n #include \"eal_private.h\"\n+#include \"eal_log.h\"\n #ifndef RTE_EXEC_ENV_WINDOWS\n #include \"eal_trace.h\"\n #endif\n@@ -1299,7 +1300,7 @@ eal_parse_log_level(const char *arg)\n \t\t\t\tregex, priority);\n \t\t\tgoto fail;\n \t\t}\n-\t\tif (rte_log_save_regexp(regex, priority) < 0)\n+\t\tif (eal_log_save_regexp(regex, priority) < 0)\n \t\t\tgoto fail;\n \t} else if (pattern) {\n \t\tif (rte_log_set_level_pattern(pattern, priority) < 0) {\n@@ -1307,7 +1308,7 @@ eal_parse_log_level(const char *arg)\n \t\t\t\tpattern, priority);\n \t\t\tgoto fail;\n \t\t}\n-\t\tif (rte_log_save_pattern(pattern, priority) < 0)\n+\t\tif (eal_log_save_pattern(pattern, priority) < 0)\n \t\t\tgoto fail;\n \t} else {\n \t\trte_log_set_global_level(priority);\ndiff --git a/lib/librte_eal/common/eal_log.h b/lib/librte_eal/common/eal_log.h\nnew file mode 100644\nindex 0000000000..c057301769\n--- /dev/null\n+++ b/lib/librte_eal/common/eal_log.h\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2021 Mellanox Technologies, Ltd\n+ */\n+\n+#ifndef EAL_LOG_H\n+#define EAL_LOG_H\n+\n+#include <stdio.h>\n+#include <stdint.h>\n+\n+/*\n+ * Initialize the default log stream.\n+ */\n+int eal_log_init(const char *id, int facility);\n+\n+/*\n+ * Determine where log data is written when no call to rte_openlog_stream.\n+ */\n+void eal_log_set_default(FILE *default_log);\n+\n+/*\n+ * Save a log option for later.\n+ */\n+int eal_log_save_regexp(const char *regexp, int priority);\n+int eal_log_save_pattern(const char *pattern, int priority);\n+\n+#endif /* EAL_LOG_H */\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex b8a0d20021..e3512111d9 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -79,19 +79,6 @@ struct rte_config *rte_eal_get_configuration(void);\n  */\n int rte_eal_memzone_init(void);\n \n-/**\n- * Common log initialization function (private to eal).  Determines\n- * where log data is written when no call to rte_openlog_stream is\n- * in effect.\n- *\n- * @param default_log\n- *   The default log stream to be used.\n- * @return\n- *   - 0 on success\n- *   - Negative on error\n- */\n-void eal_log_set_default(FILE *default_log);\n-\n /**\n  * Fill configuration with number of physical and logical processors\n  *\n@@ -143,22 +130,6 @@ int rte_eal_memory_init(void);\n  */\n int rte_eal_timer_init(void);\n \n-/**\n- * Init the default log stream\n- *\n- * This function is private to EAL.\n- *\n- * @return\n- *   0 on success, negative on error\n- */\n-int rte_eal_log_init(const char *id, int facility);\n-\n-/**\n- * Save the log regexp for later\n- */\n-int rte_log_save_regexp(const char *type, int priority);\n-int rte_log_save_pattern(const char *pattern, int priority);\n-\n /**\n  * Init tail queues for non-EAL library structures. This is to allow\n  * the rings, mempools, etc. lists to be shared among multiple processes\ndiff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c\nindex 6f73616f86..e4feeb2b0e 100644\n--- a/lib/librte_eal/linux/eal.c\n+++ b/lib/librte_eal/linux/eal.c\n@@ -58,6 +58,7 @@\n #include \"eal_hugepages.h\"\n #include \"eal_memcfg.h\"\n #include \"eal_trace.h\"\n+#include \"eal_log.h\"\n #include \"eal_options.h\"\n #include \"eal_vfio.h\"\n #include \"hotplug_mp.h\"\n@@ -1160,7 +1161,7 @@ rte_eal_init(int argc, char **argv)\n #endif\n \t}\n \n-\tif (rte_eal_log_init(logid, internal_conf->syslog_facility) < 0) {\n+\tif (eal_log_init(logid, internal_conf->syslog_facility) < 0) {\n \t\trte_eal_init_alert(\"Cannot init logging.\");\n \t\trte_errno = ENOMEM;\n \t\t__atomic_store_n(&run_once, 0, __ATOMIC_RELAXED);\ndiff --git a/lib/librte_eal/linux/eal_log.c b/lib/librte_eal/linux/eal_log.c\nindex 43c8460bfb..1a08139eb5 100644\n--- a/lib/librte_eal/linux/eal_log.c\n+++ b/lib/librte_eal/linux/eal_log.c\n@@ -17,7 +17,7 @@\n #include <rte_spinlock.h>\n #include <rte_log.h>\n \n-#include \"eal_private.h\"\n+#include \"eal_log.h\"\n \n /*\n  * default log function\n@@ -46,7 +46,7 @@ static cookie_io_functions_t console_log_func = {\n  * once memzones are available.\n  */\n int\n-rte_eal_log_init(const char *id, int facility)\n+eal_log_init(const char *id, int facility)\n {\n \tFILE *log_stream;\n \ndiff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c\nindex 4dd2fc1403..5bca3ace1c 100644\n--- a/lib/librte_eal/windows/eal.c\n+++ b/lib/librte_eal/windows/eal.c\n@@ -22,6 +22,7 @@\n \n #include \"eal_hugepages.h\"\n #include \"eal_trace.h\"\n+#include \"eal_log.h\"\n #include \"eal_windows.h\"\n \n #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL)\n@@ -265,7 +266,7 @@ rte_eal_init(int argc, char **argv)\n \t\teal_get_internal_configuration();\n \tint ret;\n \n-\trte_eal_log_init(NULL, 0);\n+\teal_log_init(NULL, 0);\n \n \teal_log_level_parse(argc, argv);\n \ndiff --git a/lib/librte_eal/windows/eal_log.c b/lib/librte_eal/windows/eal_log.c\nindex 875981f139..d4ea47f1c8 100644\n--- a/lib/librte_eal/windows/eal_log.c\n+++ b/lib/librte_eal/windows/eal_log.c\n@@ -2,11 +2,13 @@\n  * Copyright(c) 2017-2018 Intel Corporation\n  */\n \n-#include \"eal_private.h\"\n+#include <rte_common.h>\n+#include <rte_log.h>\n+#include \"eal_log.h\"\n \n /* set the log to default function, called during eal init process. */\n int\n-rte_eal_log_init(__rte_unused const char *id, __rte_unused int facility)\n+eal_log_init(__rte_unused const char *id, __rte_unused int facility)\n {\n \trte_openlog_stream(stderr);\n \n",
    "prefixes": [
        "04/11"
    ]
}