get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56735,
    "url": "https://patches.dpdk.org/api/patches/56735/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190718171812.3209-3-stephen@networkplumber.org/",
    "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": "<20190718171812.3209-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190718171812.3209-3-stephen@networkplumber.org",
    "date": "2019-07-18T17:18:11",
    "name": "[v3,2/3] cfgfile: use RTE_LOG for errors",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c02ac7bd4c05cea081b40f1f28ee556a4f647a99",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190718171812.3209-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5601,
            "url": "https://patches.dpdk.org/api/series/5601/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5601",
            "date": "2019-07-18T17:18:09",
            "name": "cfgfile: cleanup patches",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/5601/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56735/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/56735/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 1D39D4C94;\n\tThu, 18 Jul 2019 19:18:26 +0200 (CEST)",
            "from mail-pf1-f194.google.com (mail-pf1-f194.google.com\n\t[209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 09D7F231E\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 19:18:18 +0200 (CEST)",
            "by mail-pf1-f194.google.com with SMTP id p184so12916693pfp.7\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 10:18:18 -0700 (PDT)",
            "from localhost.localdomain ([67.23.203.6])\n\tby smtp.gmail.com with ESMTPSA id\n\t137sm36038021pfz.112.2019.07.18.10.18.16\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tThu, 18 Jul 2019 10:18:16 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=tMQ3l7eSh2IG5E3ZjmkQhbshkvLKRygnPBc/DveCeQk=;\n\tb=Tk/6BlUa6AWXm1T+Wxc7kJfnV69w9pQ8rtP6Giw2ZcseKCzPU7o6uy2cUu5Ngge6Ki\n\tEfyALPZNnOFkKetUPGyWqtTniqUG4ekV0drMuh7aIb7syZNPchmKXv3Gza3YI8JPsvJI\n\tJriW8BKPf9bCYJ4Noi9sd1Oe0HW/B/MV5eF1Kl9urwux+ah7eSVT14wNRE1VfykOe8cP\n\tfQWtcnjo3m/pr1GWgaTxllkEZfyishvPJLaTu4WPJHQJdESBMWX6bMBGdnxQFE2CAZNv\n\tU/XwdaHZ2ZXvgLjBLXKGtyWF2/QnxYpqDI/QBJ8nCrVabtD1hhtq7aSWMRnyfn34+q8E\n\tHznw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=tMQ3l7eSh2IG5E3ZjmkQhbshkvLKRygnPBc/DveCeQk=;\n\tb=akOQY5CVt6xGcaZr9nIFtl67U4EmNQmt/T7XvN0EGaQ+bJzaG/sr7RzZf+yQApAfvW\n\tMhyqKrwmYXHtph5hL8Zt9k3B1PahVw59hLQzX4E+S2uRFJT93YhvYuPLsIOu/XTudy/j\n\tpSm8cNmoh/j+H8hoOQmxETJkBYMmlhPyNzEP1vTw2GRvIKSJcsQjtVUShf9c0uQxQnKa\n\tunDOTdmoQMmzz0CN+qXwYs8JYf4uLCZsfoatFwQZEAf+YKP8QHdzu1SXtjMviqm+2odX\n\tPakd4Zn/VZc9M7zQKkcDoJcDAWT0ETbVU6jiwUEVe9/Y1QZP/IBmiuTJ5c0rZIucmcpu\n\tTYFQ==",
        "X-Gm-Message-State": "APjAAAVxBg3jOWUY/DMpqA6SXTK+aMWxc6JuJHMiSYY31VDtlBIP6Lqq\n\tFgrazZyajTNukqfaAgGxcwCYWgAX",
        "X-Google-Smtp-Source": "APXvYqyQSjGWtOzYEQtoa1mKc5pr3HL9GgBupDcJlWQ22mDZUm+n9T7D7D1YXVzb9GL9i7NtVmdYUA==",
        "X-Received": "by 2002:a63:6ec6:: with SMTP id\n\tj189mr50033703pgc.168.1563470297824; \n\tThu, 18 Jul 2019 10:18:17 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Thu, 18 Jul 2019 10:18:11 -0700",
        "Message-Id": "<20190718171812.3209-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190718171812.3209-1-stephen@networkplumber.org>",
        "References": "<20190716172741.21399-1-stephen@networkplumber.org>\n\t<20190718171812.3209-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH v3 2/3] cfgfile: use RTE_LOG for errors",
        "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": "In general, DPDK libraries to not print error messages to\nstdout because that is often redirected to /dev/null for daemons.\nThis patch changes cfgfile library to use RTE_LOG with its\nown type.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/Makefile                     |  1 +\n lib/librte_cfgfile/rte_cfgfile.c | 38 +++++++++++++++++++++++---------\n 2 files changed, 29 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/Makefile b/lib/Makefile\nindex bdb8a67e2d9d..41c463d92139 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -19,6 +19,7 @@ DEPDIRS-librte_mbuf := librte_eal librte_mempool\n DIRS-$(CONFIG_RTE_LIBRTE_TIMER) += librte_timer\n DEPDIRS-librte_timer := librte_eal\n DIRS-$(CONFIG_RTE_LIBRTE_CFGFILE) += librte_cfgfile\n+DEPDIRS-librte_cfgfile := librte_eal\n DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline\n DEPDIRS-librte_cmdline := librte_eal librte_net\n DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ethdev\ndiff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c\nindex 1ef298592fa5..388415147930 100644\n--- a/lib/librte_cfgfile/rte_cfgfile.c\n+++ b/lib/librte_cfgfile/rte_cfgfile.c\n@@ -9,6 +9,7 @@\n #include <errno.h>\n #include <rte_string_fns.h>\n #include <rte_common.h>\n+#include <rte_log.h>\n \n #include \"rte_cfgfile.h\"\n \n@@ -26,6 +27,12 @@ struct rte_cfgfile {\n \tstruct rte_cfgfile_section *sections;\n };\n \n+static int cfgfile_logtype;\n+\n+#define CFG_LOG(level, fmt, args...)\t\t\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, cfgfile_logtype, \"%s(): \" fmt \"\\n\",\t\\\n+\t\t__func__, ## args)\n+\n /** when we resize a file structure, how many extra entries\n  * for new sections do we add in */\n #define CFG_ALLOC_SECTION_BATCH 8\n@@ -128,7 +135,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)\n \tunsigned int i;\n \n \tif (!params) {\n-\t\tprintf(\"Error - missing cfgfile parameters\\n\");\n+\t\tCFG_LOG(ERR, \"missing cfgfile parameters\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -141,7 +148,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)\n \t}\n \n \tif (valid_comment == 0)\t{\n-\t\tprintf(\"Error - invalid comment characters %c\\n\",\n+\t\tCFG_LOG(ERR, \"invalid comment characters %c\\n\",\n \t\t       params->comment_character);\n \t\treturn -ENOTSUP;\n \t}\n@@ -178,7 +185,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\tsize_t len = strnlen(buffer, sizeof(buffer));\n \t\tlineno++;\n \t\tif ((len >= sizeof(buffer) - 1) && (buffer[len-1] != '\\n')) {\n-\t\t\tprintf(\"Error line %d - no \\\\n found on string. \"\n+\t\t\tCFG_LOG(ERR, \" line %d - no \\\\n found on string. \"\n \t\t\t\t\t\"Check if line too long\\n\", lineno);\n \t\t\tgoto error1;\n \t\t}\n@@ -198,8 +205,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\t\t/* section heading line */\n \t\t\tchar *end = memchr(buffer, ']', len);\n \t\t\tif (end == NULL) {\n-\t\t\t\tprintf(\"Error line %d - no terminating ']'\"\n-\t\t\t\t\t\"character found\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - no terminating ']' character found\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \t\t\t*end = '\\0';\n@@ -213,8 +221,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\t\tsplit[0] = buffer;\n \t\t\tsplit[1] = memchr(buffer, '=', len);\n \t\t\tif (split[1] == NULL) {\n-\t\t\t\tprintf(\"Error line %d - no '='\"\n-\t\t\t\t\t\"character found\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - no '=' character found\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \t\t\t*split[1] = '\\0';\n@@ -236,8 +245,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \n \t\t\tif (!(flags & CFG_FLAG_EMPTY_VALUES) &&\n \t\t\t\t\t(*split[1] == '\\0')) {\n-\t\t\t\tprintf(\"Error at line %d - cannot use empty \"\n-\t\t\t\t\t\t\t\"values\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - cannot use empty values\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \n@@ -397,7 +407,8 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,\n \t\t\t\tsizeof(curr_section->entries[i].value));\n \t\t\treturn 0;\n \t\t}\n-\tprintf(\"Error - entry name doesn't exist\\n\");\n+\n+\tCFG_LOG(ERR, \"entry name doesn't exist\\n\");\n \treturn -EINVAL;\n }\n \n@@ -552,3 +563,10 @@ rte_cfgfile_has_entry(struct rte_cfgfile *cfg, const char *sectionname,\n {\n \treturn rte_cfgfile_get_entry(cfg, sectionname, entryname) != NULL;\n }\n+\n+RTE_INIT(cfgfile_init)\n+{\n+\tcfgfile_logtype = rte_log_register(\"lib.cfgfile\");\n+\tif (cfgfile_logtype >= 0)\n+\t\trte_log_set_level(cfgfile_logtype, RTE_LOG_INFO);\n+}\n",
    "prefixes": [
        "v3",
        "2/3"
    ]
}