get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 46520,
    "url": "https://patches.dpdk.org/api/patches/46520/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20181010192330.21105-2-thomas@monjalon.net/",
    "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": "<20181010192330.21105-2-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181010192330.21105-2-thomas@monjalon.net",
    "date": "2018-10-10T19:23:27",
    "name": "[v2,1/4] kvargs: support list value",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f6eb26eb504ebae9eb247d2d192022da88bedcc1",
    "submitter": {
        "id": 685,
        "url": "https://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20181010192330.21105-2-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 1819,
            "url": "https://patches.dpdk.org/api/series/1819/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1819",
            "date": "2018-10-10T19:23:26",
            "name": "support more ethdev iterator filters",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/1819/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/46520/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/46520/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 02EE01B5D2;\n\tWed, 10 Oct 2018 21:23:39 +0200 (CEST)",
            "from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com\n\t[66.111.4.27]) by dpdk.org (Postfix) with ESMTP id C06541B5BB\n\tfor <dev@dpdk.org>; Wed, 10 Oct 2018 21:23:35 +0200 (CEST)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 6A5DB20D2D;\n\tWed, 10 Oct 2018 15:23:35 -0400 (EDT)",
            "from mailfrontend1 ([10.202.2.162])\n\tby compute1.internal (MEProxy); Wed, 10 Oct 2018 15:23:35 -0400",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 30D7FE489A;\n\tWed, 10 Oct 2018 15:23:34 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tfrom:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding; s=mesmtp; bh=kf2fiOdU/B\n\t5VEaMedEj1pgh78QtCL1ovvKofyK8o9Ks=; b=XHbbfmaq8quxkfw71JSNV74FKy\n\tSmCHmC2w+ydFGxpo6rZvvnmkGQoLHkAu6NmITQtUgjzS3IW5jbjJFH3UJrSaRgcv\n\t3gnZg60Cuah7vytyaHnWARHJkTcoE3aqu9hwVuFuGSd2gpGBiWMzBa7aQwx3lUM3\n\tFUdRh2ukx9zSCdVRE=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:date:from\n\t:in-reply-to:message-id:mime-version:references:subject:to\n\t:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm1; bh=kf2fiOdU/B5VEaMedEj1pgh78QtCL1ovvKofyK8o9Ks=; b=yP+RgpN3\n\tvI3S6ev+EmTSqsJYj3p+Z5yUIEeuxIc0sEPtRRIkBAI0PlS058ghMVOaZVVyvWyX\n\tyr1s3s4Zn5+t7WD8yXX++0uPqnPK7IbEWezZcS8KRYzhwibM+4IhOG5z1ofn8lg8\n\tQSmKckUEY9kK9/4z3IOLuXG76r7wpW3VbDJMSenlODPNHDbPJZahArJXbvI4ux5d\n\tmkYmcIG0BNx/ilsBVxV116tLsuuuerWGpdF+a2CeMOKWhMkC6g9mQqNigP9XspkN\n\tLA+p2kILfjwcWc2r78yN6C4hbK+RbKY/PPrMyVG1696zGJp5K0RgDDiWVxvK95JO\n\tRDrX96s1B1jSPA=="
        ],
        "X-ME-Sender": "<xms:t1G-W__WrAPBofJvbEqWhWKUhVOTDkbLDSrkQa4ortVnLMzFobET7Q>",
        "X-ME-Proxy": "<xmx:t1G-W4hKPN7z-e4Q0_50kYFzRjYcwG5rv0xR-93iCDCuJU_qnGGTKQ>\n\t<xmx:t1G-W7f5mjnMovwoW3UObiTZ0IZ1FshJ0GnfuKwkjndhJaZ4Yq5RzQ>\n\t<xmx:t1G-W3k7dfwKVgyWnBDv9UnCztNLdKNQ9d1RgyYpmN5jrbhdHAbfGA>\n\t<xmx:t1G-Wwwq1Q9jFPJY4eCzedqdb2SVtOze6cV1KVwNEFai7VLTMwdc4Q>\n\t<xmx:t1G-W6xOB9Istimp4GnBa-WQ0xsiHSczLNKh7S0KLUCIRFkvPyPaVQ>\n\t<xmx:t1G-WzwJlFeSpQTkJ9ChcMNsIvzYIu0MZq55toGH0dSrPPXZ_HJJPA>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "gaetan.rivet@6wind.com, ophirmu@mellanox.com, ferruh.yigit@intel.com,\n\tarybchenko@solarflare.com, olivier.matz@6wind.com,\n\tremy.horton@intel.com, bruce.richardson@intel.com",
        "Date": "Wed, 10 Oct 2018 21:23:27 +0200",
        "Message-Id": "<20181010192330.21105-2-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.19.0",
        "In-Reply-To": "<20181010192330.21105-1-thomas@monjalon.net>",
        "References": "<20181009021858.19216-1-thomas@monjalon.net>\n\t<20181010192330.21105-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 1/4] kvargs: support list value",
        "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": "If a value contains a comma, rte_kvargs_tokenize() will split here.\nIn order to support list syntax [a,b] as value, an extra parsing of\nthe square brackets is added.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n lib/librte_kvargs/rte_kvargs.c | 14 ++++++++++++++\n test/test/test_kvargs.c        | 21 +++++++++++++++++++++\n 2 files changed, 35 insertions(+)",
    "diff": "diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c\nindex a28f76945..e616da351 100644\n--- a/lib/librte_kvargs/rte_kvargs.c\n+++ b/lib/librte_kvargs/rte_kvargs.c\n@@ -44,6 +44,20 @@ rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params)\n \t\t    kvlist->pairs[i].value == NULL)\n \t\t\treturn -1;\n \n+\t\t/* Detect list [a,b] to skip comma delimiter in list. */\n+\t\tstr = kvlist->pairs[i].value;\n+\t\tif (str[0] == '[') {\n+\t\t\t/* Find the end of the list. */\n+\t\t\twhile (str[strlen(str) - 1] != ']') {\n+\t\t\t\t/* Restore the comma erased by strtok_r(). */\n+\t\t\t\tstr[strlen(str)] = ',';\n+\t\t\t\t/* Parse until next comma. */\n+\t\t\t\tstr = strtok_r(NULL, RTE_KVARGS_PAIRS_DELIM, &ctx1);\n+\t\t\t\tif (str == NULL)\n+\t\t\t\t\treturn -1; /* no closing bracket */\n+\t\t\t}\n+\t\t}\n+\n \t\tkvlist->count++;\n \t\tstr = NULL;\n \t}\ndiff --git a/test/test/test_kvargs.c b/test/test/test_kvargs.c\nindex e6738624e..a42056f36 100644\n--- a/test/test/test_kvargs.c\n+++ b/test/test/test_kvargs.c\n@@ -137,6 +137,26 @@ static int test_valid_kvargs(void)\n \t}\n \trte_kvargs_free(kvlist);\n \n+\t/* third test using list as value */\n+\targs = \"foo=[0,1],check=value2\";\n+\tvalid_keys = valid_keys_list;\n+\tkvlist = rte_kvargs_parse(args, valid_keys);\n+\tif (kvlist == NULL) {\n+\t\tprintf(\"rte_kvargs_parse() error\");\n+\t\tgoto fail;\n+\t}\n+\tif (strcmp(kvlist->pairs[0].value, \"[0,1]\") != 0) {\n+\t\tprintf(\"wrong value %s\", kvlist->pairs[0].value);\n+\t\tgoto fail;\n+\t}\n+\tcount = kvlist->count;\n+\tif (count != 2) {\n+\t\tprintf(\"invalid count value %d\\n\", count);\n+\t\trte_kvargs_free(kvlist);\n+\t\tgoto fail;\n+\t}\n+\trte_kvargs_free(kvlist);\n+\n \treturn 0;\n \n  fail:\n@@ -162,6 +182,7 @@ static int test_invalid_kvargs(void)\n \t\t\"foo=1,,foo=2\",    /* empty key/value */\n \t\t\"foo=1,foo\",       /* no value */\n \t\t\"foo=1,=2\",        /* no key */\n+\t\t\"foo=[1,2\",        /* no closing bracket in value */\n \t\t\",=\",              /* also test with a smiley */\n \t\tNULL };\n \tconst char **args;\n",
    "prefixes": [
        "v2",
        "1/4"
    ]
}