get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30192,
    "url": "https://patches.dpdk.org/api/patches/30192/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/b197aae84700de4e2c7a1ab9e42066544c769aa7.1507796085.git.gaetan.rivet@6wind.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": "<b197aae84700de4e2c7a1ab9e42066544c769aa7.1507796085.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/b197aae84700de4e2c7a1ab9e42066544c769aa7.1507796085.git.gaetan.rivet@6wind.com",
    "date": "2017-10-12T08:18:26",
    "name": "[dpdk-dev,v1,4/8] bus: add probe mode setter",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "07186cf9856d0b707a30edae01d8e625af392c11",
    "submitter": {
        "id": 269,
        "url": "https://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "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/b197aae84700de4e2c7a1ab9e42066544c769aa7.1507796085.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/30192/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/30192/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 2AF9E1B20A;\n\tThu, 12 Oct 2017 10:18:57 +0200 (CEST)",
            "from mail-wm0-f52.google.com (mail-wm0-f52.google.com\n\t[74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 811F929C6\n\tfor <dev@dpdk.org>; Thu, 12 Oct 2017 10:18:52 +0200 (CEST)",
            "by mail-wm0-f52.google.com with SMTP id k4so10985405wmc.1\n\tfor <dev@dpdk.org>; Thu, 12 Oct 2017 01:18:52 -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\ti76sm39971757wmd.2.2017.10.12.01.18.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 12 Oct 2017 01:18:50 -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\t:in-reply-to:references;\n\tbh=CG4UpxboK3f52zaIs8MWlawr3hZ46GuL4D1CGA0+EKI=;\n\tb=bhcJual59QXTjanDYEN52ELtv1NKkii8H5wcjxA89cyUC3sLCL4D3LxzTvN28jXYWy\n\tM/sedZwhK4SmY0gk++wMxVosPw4XDoQVDgXEdoIwCGfdOzV0gt/kZMYjNpn51inIWFbv\n\tIS0VSkrZUp6FEXcsjSE8Ch2Y+AuLzTgve83sKh9u+SpGGVBwEPuWpnY+HykV0DAwlsCj\n\tgaFk0H+2esVYw3EkEGQug0icqLTNDMcooJ/RdbV9kfIgjMAuG9uM2ynsoySmhJS7lAf/\n\tczacqWLqw4S3Uj1WmzA0ZoIyh/sdPsn9w0m6T2WrsGgr7vJvwiwzi7tyNG335G0oG+ah\n\t23eA==",
        "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:in-reply-to:references;\n\tbh=CG4UpxboK3f52zaIs8MWlawr3hZ46GuL4D1CGA0+EKI=;\n\tb=BpPTiqk+hfmHgScrkiU7pbyTvyRSWUzWhiaw1Q7od5OV3HU9wiMi4aLc6pvtn1qlft\n\t7DFos3zqiXoZ91ZCAHJTdy0/XLD3DS04xEvK8ia3p01PN5I/aQP235yesxiXTYqLPYPy\n\tcayg5h7zRZrgpapav/M+cOnPo7zGn6+iPWo/kc0fXGxlD/NC2YlKzE7+v9jw2xfcoysd\n\tPUADNrN6dy5HFqCcFB2LHT1tLI79OJbrt3FldDBollO9xPTnPGYwE/byRLPc7ACY0z03\n\tzO/4v+QIqbgsZPBsrJTWWQNGX+HkGx8mjxeUFS0oW4u9xdQ9lUBt3urbOVqnaKRdmqYX\n\tBcfg==",
        "X-Gm-Message-State": "AMCzsaVzQTh1mrf2OCDK5gR2YDE6LSlquYvOwE6We4lhGDdfdFC3M3ir\n\tVAOKBzz2hqnGRF8hI9LPg7MKFlcb",
        "X-Google-Smtp-Source": "AOwi7QCvMoHBAqOzflesOoM3XTJTnp+USMZCFYlD4siJ7LPjTgDEPmz2df6E35e1UoXHHOUvi1jK2Q==",
        "X-Received": "by 10.223.129.228 with SMTP id 91mr1410693wra.233.1507796331756; \n\tThu, 12 Oct 2017 01:18:51 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Thu, 12 Oct 2017 10:18:26 +0200",
        "Message-Id": "<b197aae84700de4e2c7a1ab9e42066544c769aa7.1507796085.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": [
            "<cover.1507796085.git.gaetan.rivet@6wind.com>",
            "<cover.1507796085.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1507796085.git.gaetan.rivet@6wind.com>",
            "<cover.1507796085.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v1 4/8] bus: add probe mode setter",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Introduce new rte_bus operation to configure the probe policy.\n\nImplementation is required from buses interested in supporting\nthis configuration element.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_eal/common/eal_common_bus.c     | 24 ++++++++++++++++++++++++\n lib/librte_eal/common/eal_common_options.c | 17 ++++-------------\n lib/librte_eal/common/include/rte_bus.h    | 16 ++++++++++++++++\n 3 files changed, 44 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c\nindex 65d7229..5b155c6 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -120,6 +120,30 @@ rte_bus_probe(void)\n \treturn 0;\n }\n \n+/* Configure the probing policy of a bus */\n+int\n+rte_bus_probe_mode_set(const char *busname,\n+\t\t       enum rte_bus_probe_mode mode)\n+{\n+\tstruct rte_bus *bus;\n+\trte_bus_ctrl_t probe_mode_set;\n+\n+\tbus = rte_bus_find_by_name(busname);\n+\tif (bus == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"Bus %s not found.\\n\",\n+\t\t\tbusname);\n+\t\treturn -EFAULT;\n+\t}\n+\tprobe_mode_set = bus->ctrl(RTE_BUS_CTRL_SET,\n+\t\t\t\t   RTE_BUS_CTRL_PROBE_MODE);\n+\tif (probe_mode_set == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"Bus %s: probe policy cannot be configured.\\n\",\n+\t\t\tbusname);\n+\t\treturn -ENOTSUP;\n+\t}\n+\treturn probe_mode_set(&mode);\n+}\n+\n /* Dump information of a single bus */\n static int\n bus_dump_one(FILE *f, struct rte_bus *bus)\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex e40c049..630c9d2 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -997,29 +997,24 @@ int\n eal_parse_common_option(int opt, const char *optarg,\n \t\t\tstruct internal_config *conf)\n {\n-\tstatic int b_used;\n-\tstatic int w_used;\n-\n \tswitch (opt) {\n \t/* blacklist */\n \tcase 'b':\n-\t\tif (w_used)\n-\t\t\tgoto bw_used;\n+\t\tif (rte_bus_probe_mode_set(\"pci\", RTE_BUS_PROBE_BLACKLIST) < 0)\n+\t\t\treturn -1;\n \t\tif (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,\n \t\t\t\toptarg) < 0) {\n \t\t\treturn -1;\n \t\t}\n-\t\tb_used = 1;\n \t\tbreak;\n \t/* whitelist */\n \tcase 'w':\n-\t\tif (b_used)\n-\t\t\tgoto bw_used;\n+\t\tif (rte_bus_probe_mode_set(\"pci\", RTE_BUS_PROBE_WHITELIST) < 0)\n+\t\t\treturn -1;\n \t\tif (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,\n \t\t\t\toptarg) < 0) {\n \t\t\treturn -1;\n \t\t}\n-\t\tw_used = 1;\n \t\tbreak;\n \t/* coremask */\n \tcase 'c':\n@@ -1165,10 +1160,6 @@ eal_parse_common_option(int opt, const char *optarg,\n \t}\n \n \treturn 0;\n-bw_used:\n-\tRTE_LOG(ERR, EAL, \"Options blacklist (-b) and whitelist (-w) \"\n-\t\t\"cannot be used at the same time\\n\");\n-\treturn -1;\n }\n \n static void\ndiff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex a8fb6b1..93108ce 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -289,6 +289,22 @@ int rte_bus_scan(void);\n int rte_bus_probe(void);\n \n /**\n+ * Configure bus probe policy.\n+ *\n+ * @param busname\n+ *\tName of the bus to configure.\n+ *\n+ * @param mode\n+ *\tConfigure the designated bus probe policy to this value.\n+ *\n+ * @return\n+ *\t0 on success\n+ *\t!0 otherwise\n+ */\n+int rte_bus_probe_mode_set(const char *busname,\n+\t\t\t   enum rte_bus_probe_mode mode);\n+\n+/**\n  * Dump information of all the buses registered with EAL.\n  *\n  * @param f\n",
    "prefixes": [
        "dpdk-dev",
        "v1",
        "4/8"
    ]
}