get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44035,
    "url": "http://patches.dpdk.org/api/patches/44035/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/008cd730fca7697fab8b5b6391cca29043dee2f5.1535633784.git.gaetan.rivet@6wind.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": "<008cd730fca7697fab8b5b6391cca29043dee2f5.1535633784.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/008cd730fca7697fab8b5b6391cca29043dee2f5.1535633784.git.gaetan.rivet@6wind.com",
    "date": "2018-08-30T13:42:04",
    "name": "[v1,13/13] eal: add generic dev parameter",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8a70587f611dcd25d611fa056cd4b6df4de6465e",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/008cd730fca7697fab8b5b6391cca29043dee2f5.1535633784.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 1115,
            "url": "http://patches.dpdk.org/api/series/1115/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1115",
            "date": "2018-08-30T13:41:51",
            "name": "Implement new devargs framework",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1115/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44035/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44035/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 4D9AB5F17;\n\tThu, 30 Aug 2018 15:43:06 +0200 (CEST)",
            "from mail-wm0-f66.google.com (mail-wm0-f66.google.com\n\t[74.125.82.66]) by dpdk.org (Postfix) with ESMTP id A16245699\n\tfor <dev@dpdk.org>; Thu, 30 Aug 2018 15:42:48 +0200 (CEST)",
            "by mail-wm0-f66.google.com with SMTP id j192-v6so2097448wmj.1\n\tfor <dev@dpdk.org>; Thu, 30 Aug 2018 06:42:48 -0700 (PDT)",
            "from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tw10-v6sm5247731wrp.31.2018.08.30.06.42.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 30 Aug 2018 06:42:47 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=WTL7FZHHM0N1Hoq86X5ykuhokltoO+RdDvGFDi7Ue4U=;\n\tb=hMlGixDi84yZ5mZugOPC0qBQkne756CKB9asFWTj2w8cDwE2PUh5BnHClisg6PcpBV\n\t3t8lAPRBdPEEjtyNW94hUW4wSkMSjLdoBS93UY7kTuk+gJwcQyLroCCftYxloHriAuyq\n\tRD4NOKqHMKhI9XpCvWhhE2pStV8A0mi1LRVRk1SGGF3Efvbnap7/S2RKVMopDTrla9Yk\n\tfBUZMUg/PrpXqJiB5hdhPpwveOyEVMwpYHaScHtW3KsqlvVIyJwZrSIDQR3AoBRs2bcm\n\toHr4GScGYlClQxcr6o8Pc6HMaa6GGz6jp8OGQK+8ULK2Ma450aAhkTED/ug1bYR9hfl1\n\tFauw==",
        "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=WTL7FZHHM0N1Hoq86X5ykuhokltoO+RdDvGFDi7Ue4U=;\n\tb=obdWEiwrqz0h1ytfzf1ZbKEkaX5RVxfEraNKBkwNBC966AwkkCQ9Ms6g4CmwzQB3Ao\n\tXtj/6jiol/2n6XcIAFknicyVz/ThXcWEqj4ip0qidYxpqSMUSF4tXOrNhErlnfk9eIGH\n\tdSdif76cEDvfVZD25ywNGpeZ7jJ+c1kk4e+ESpwjPDtZwJczaeOc32uZ2UnwBW5kqChs\n\tX1PdShBr7pabAsMGHHxgD7HiZrsDhWw3xsqfOfGhAM187xqC1NOskV3Hwwuw3ivdbpPx\n\tf//obE0PPZ0OUZZi4PJ7JC53wowlulpLMRqhtvVCTlYdvlV5YVqAjbc9VQ4MvpFoze2V\n\ty0Vg==",
        "X-Gm-Message-State": "APzg51BQKvgcserHzdCaveWOqm/h9aVfXcERM0yTRFSfbkJ8zN1XM7vK\n\tmPv9ToSJe2/X/AoqJirCdggHRLaHDu0=",
        "X-Google-Smtp-Source": "ANB0VdbaaDt78QmluZ6OxFtnwHPQA+1iwTFUfUBegBgFv1z16Xn2EJ2h2OMuqt6cIMgrrCEB7T3Fbw==",
        "X-Received": "by 2002:a1c:7915:: with SMTP id\n\tl21-v6mr2034214wme.136.1535636568055; \n\tThu, 30 Aug 2018 06:42:48 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Thu, 30 Aug 2018 15:42:04 +0200",
        "Message-Id": "<008cd730fca7697fab8b5b6391cca29043dee2f5.1535633784.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<cover.1535633783.git.gaetan.rivet@6wind.com>",
        "References": "<cover.1535633783.git.gaetan.rivet@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v1 13/13] eal: add generic dev parameter",
        "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": "Add the --dev parameter to the EAL.\nThis new parameter takes a generic device declaration as argument.\n\nIt uses the new devargs parsing API.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_eal/common/eal_common_devargs.c |  4 +++\n lib/librte_eal/common/eal_common_options.c | 36 +++++++++++++++++++---\n lib/librte_eal/common/eal_options.h        |  2 ++\n 3 files changed, 37 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c\nindex dac2402a4..f1f4628db 100644\n--- a/lib/librte_eal/common/eal_common_devargs.c\n+++ b/lib/librte_eal/common/eal_common_devargs.c\n@@ -219,6 +219,10 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev)\n \tif (da == NULL)\n \t\treturn -EINVAL;\n \n+\tif (strncmp(dev, \"bus=\", 4) == 0 ||\n+\t    strncmp(dev, \"class=\", 6) == 0)\n+\t\treturn rte_devargs_layers_parse(da, dev);\n+\n \t/* Retrieve eventual bus info */\n \tdo {\n \t\tdevname = dev;\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex dd5f97402..4a8b87676 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -54,6 +54,7 @@ const struct option\n eal_long_options[] = {\n \t{OPT_BASE_VIRTADDR,     1, NULL, OPT_BASE_VIRTADDR_NUM    },\n \t{OPT_CREATE_UIO_DEV,    0, NULL, OPT_CREATE_UIO_DEV_NUM   },\n+\t{OPT_DEV,               1, NULL, OPT_DEV_NUM              },\n \t{OPT_FILE_PREFIX,       1, NULL, OPT_FILE_PREFIX_NUM      },\n \t{OPT_HELP,              0, NULL, OPT_HELP_NUM             },\n \t{OPT_HUGE_DIR,          1, NULL, OPT_HUGE_DIR_NUM         },\n@@ -111,6 +112,7 @@ TAILQ_HEAD(device_option_list, device_option);\n struct device_option {\n \tTAILQ_ENTRY(device_option) next;\n \n+\tint new;\n \tenum rte_devtype type;\n \tchar arg[];\n };\n@@ -123,7 +125,8 @@ static int mem_parsed;\n static int core_parsed;\n \n static int\n-eal_option_device_add(enum rte_devtype type, const char *optarg)\n+eal_option_device_add(enum rte_devtype type, const char *optarg,\n+\t\t      int new)\n {\n \tstruct device_option *devopt;\n \tsize_t optlen;\n@@ -137,6 +140,7 @@ eal_option_device_add(enum rte_devtype type, const char *optarg)\n \t}\n \n \tdevopt->type = type;\n+\tdevopt->new = new;\n \tret = snprintf(devopt->arg, optlen, \"%s\", optarg);\n \tif (ret < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Unable to copy device option\\n\");\n@@ -156,7 +160,22 @@ eal_option_device_parse(void)\n \n \tTAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {\n \t\tif (ret == 0) {\n-\t\t\tret = rte_devargs_add(devopt->type, devopt->arg);\n+\t\t\tif (devopt->new) {\n+\t\t\t\tstruct rte_devargs *da;\n+\n+\t\t\t\tda = calloc(1, sizeof(*da));\n+\t\t\t\tret = rte_devargs_parse(da, devopt->arg);\n+\t\t\t\tif (ret) {\n+\t\t\t\t\tfree(da);\n+\t\t\t\t} else {\n+\t\t\t\t\tret = rte_devargs_insert(da);\n+\t\t\t\t\tif (ret)\n+\t\t\t\t\t\tfree(da);\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tret = rte_devargs_add(devopt->type,\n+\t\t\t\t\t\t      devopt->arg);\n+\t\t\t}\n \t\t\tif (ret)\n \t\t\t\tRTE_LOG(ERR, EAL, \"Unable to parse device '%s'\\n\",\n \t\t\t\t\tdevopt->arg);\n@@ -1088,7 +1107,7 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\tif (w_used)\n \t\t\tgoto bw_used;\n \t\tif (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,\n-\t\t\t\toptarg) < 0) {\n+\t\t\t\toptarg, 0) < 0) {\n \t\t\treturn -1;\n \t\t}\n \t\tb_used = 1;\n@@ -1098,7 +1117,7 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\tif (b_used)\n \t\t\tgoto bw_used;\n \t\tif (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,\n-\t\t\t\toptarg) < 0) {\n+\t\t\t\toptarg, 0) < 0) {\n \t\t\treturn -1;\n \t\t}\n \t\tw_used = 1;\n@@ -1234,9 +1253,16 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\t}\n \t\tbreak;\n \n+\tcase OPT_DEV_NUM:\n+\t\tif (eal_option_device_add(RTE_DEVTYPE_VIRTUAL,\n+\t\t\t\toptarg, 1) < 0) {\n+\t\t\treturn -1;\n+\t\t}\n+\t\tbreak;\n+\n \tcase OPT_VDEV_NUM:\n \t\tif (eal_option_device_add(RTE_DEVTYPE_VIRTUAL,\n-\t\t\t\toptarg) < 0) {\n+\t\t\t\toptarg, 0) < 0) {\n \t\t\treturn -1;\n \t\t}\n \t\tbreak;\ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex 96e166787..8a17eb22c 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -21,6 +21,8 @@ enum {\n \tOPT_BASE_VIRTADDR_NUM,\n #define OPT_CREATE_UIO_DEV    \"create-uio-dev\"\n \tOPT_CREATE_UIO_DEV_NUM,\n+#define OPT_DEV               \"dev\"\n+\tOPT_DEV_NUM,\n #define OPT_FILE_PREFIX       \"file-prefix\"\n \tOPT_FILE_PREFIX_NUM,\n #define OPT_HUGE_DIR          \"huge-dir\"\n",
    "prefixes": [
        "v1",
        "13/13"
    ]
}