get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83925,
    "url": "http://patches.dpdk.org/api/patches/83925/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201110225544.1876-4-stephen@networkplumber.org/",
    "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": "<20201110225544.1876-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201110225544.1876-4-stephen@networkplumber.org",
    "date": "2020-11-10T22:55:40",
    "name": "[v10,3/7] eal: replace pci-whitelist/pci-blacklist options",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "737c25886c1ed6627ea17fe05e903b55a373c75e",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "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/20201110225544.1876-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 13788,
            "url": "http://patches.dpdk.org/api/series/13788/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13788",
            "date": "2020-11-10T22:55:37",
            "name": "replace blacklist/whitelist with allow/block",
            "version": 10,
            "mbox": "http://patches.dpdk.org/series/13788/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83925/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/83925/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E4D9BA04E7;\n\tTue, 10 Nov 2020 23:56:50 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9F11E592C;\n\tTue, 10 Nov 2020 23:55:56 +0100 (CET)",
            "from mail-pf1-f196.google.com (mail-pf1-f196.google.com\n [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id F258C37B4\n for <dev@dpdk.org>; Tue, 10 Nov 2020 23:55:53 +0100 (CET)",
            "by mail-pf1-f196.google.com with SMTP id z3so218896pfb.10\n for <dev@dpdk.org>; Tue, 10 Nov 2020 14:55:53 -0800 (PST)",
            "from hermes.corp.microsoft.com (204-195-22-127.wavecable.com.\n [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id t9sm52934pjo.4.2020.11.10.14.55.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Nov 2020 14:55:50 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=4R1ByUJj/U3uORfVUIn8IKCTG10CZmvsdbF0UfYqZpM=;\n b=lYS1upnXj+HIV8JBt94Q8gV7Dx5KZAiQ6bb2KidZ0nOC0yod+pbCxrUuOTktLgK6Oi\n 6hmYs6npfaVAUJKvYoa1Mi4BN2bCjXV8csagDq+TTnGc7VGn52COa6aT1cl5cYDsLQud\n v5xw5hjhjfJg+qClzPShEkUErjrAlLuUDglPdDpvNfBLAQsjdSHvOxPT1n8AaONGy4vY\n daEuERaBRWJv6Uq3Jo8IpDHSOyb3WJ3t1zKgjFxgms6f250AZG8kENfAJKm+wUwUpfKC\n h8L4DZv8ZoDS5X++5jcZoH39JYctVTnxlIMsYy8hzMXBp0pnRAO3E5ji8zqLPpRp68Jw\n mC0w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=4R1ByUJj/U3uORfVUIn8IKCTG10CZmvsdbF0UfYqZpM=;\n b=gSnUQNkxJrrdYdAOKQJe/FMbrAZKpKUPomGNHdUEwitfjPa8lz1aGrh3aVnhK+MRli\n Y8pPERSrM4ElNiDEj89jyb5KvfVYu/7pDz2pQvN6/0KyzeQPdnYB+R02YRFkp11dFVbe\n MWYzYRIqVpiY7j7R0jGYzZCeAwgL+MMsxymrtP2AK+dW7CkYqjDVWncr1rMdJBGVfPeF\n 7S2iCVFyHkG/oJYva1yvYNUCoBWF8huGtp8uvPOb2JAUISaFXDGxdl67bv1NnDfaf/71\n 7EuxXmEioZGlnDoSssGx9p8R/+5fpyX8uihOKjPzkwgs4pAprjl1znGH2TRKvg2QTDao\n NXrQ==",
        "X-Gm-Message-State": "AOAM5311Rvxz+/4FMFVscI+uTmpvWDAdDssQ/OKDnBb09W3WuFSOLu00\n GUWvvLgNv9Gkl7ehG8GP70OqgFae0veDjulv",
        "X-Google-Smtp-Source": "\n ABdhPJz2BfB6VD5l9VJFYENjytZdieC2x/b8CSOROO/pQa0AuxmwNrjpeuvXrU3Ilre+LxVUJSybPw==",
        "X-Received": "by 2002:a63:1512:: with SMTP id\n v18mr19385681pgl.450.1605048951689;\n Tue, 10 Nov 2020 14:55:51 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Luca Boccassi <bluca@debian.org>",
        "Date": "Tue, 10 Nov 2020 14:55:40 -0800",
        "Message-Id": "<20201110225544.1876-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201110225544.1876-1-stephen@networkplumber.org>",
        "References": "<20200922143202.8755-1-stephen@networkplumber.org>\n <20201110225544.1876-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v10 3/7] eal: replace pci-whitelist/pci-blacklist\n\toptions",
        "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 <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": "Replace -w / --pci-whitelist with -a / --allow options\nand --pci-blacklist with --block.\nThe -b short option remains unchanged.\n\nAllow the old options for now, but print a nag\nwarning since old options are deprecated.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Luca Boccassi <bluca@debian.org>\n---\n lib/librte_eal/common/eal_common_options.c | 66 +++++++++++++---------\n lib/librte_eal/common/eal_options.h        | 13 ++++-\n 2 files changed, 49 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 7b3341683662..46a1ab8f670d 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -52,7 +52,8 @@\n \n const char\n eal_short_options[] =\n-\t\"b:\" /* pci-blacklist */\n+\t\"a:\" /* allow */\n+\t\"b:\" /* block */\n \t\"c:\" /* coremask */\n \t\"s:\" /* service coremask */\n \t\"d:\" /* driver */\n@@ -63,7 +64,7 @@ eal_short_options[] =\n \t\"n:\" /* memory channels */\n \t\"r:\" /* memory ranks */\n \t\"v\"  /* version */\n-\t\"w:\" /* pci-whitelist */\n+\t\"w:\" /* pci-whitelist (deprecated) */\n \t;\n \n const struct option\n@@ -89,8 +90,8 @@ eal_long_options[] = {\n \t{OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },\n \t{OPT_NO_SHCONF,         0, NULL, OPT_NO_SHCONF_NUM        },\n \t{OPT_IN_MEMORY,         0, NULL, OPT_IN_MEMORY_NUM        },\n-\t{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },\n-\t{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },\n+\t{OPT_DEV_BLOCK,         1, NULL, OPT_DEV_BLOCK_NUM        },\n+\t{OPT_DEV_ALLOW,\t\t1, NULL, OPT_DEV_ALLOW_NUM\t  },\n \t{OPT_PROC_TYPE,         1, NULL, OPT_PROC_TYPE_NUM        },\n \t{OPT_SOCKET_MEM,        1, NULL, OPT_SOCKET_MEM_NUM       },\n \t{OPT_SOCKET_LIMIT,      1, NULL, OPT_SOCKET_LIMIT_NUM     },\n@@ -105,6 +106,11 @@ eal_long_options[] = {\n \t{OPT_TELEMETRY,         0, NULL, OPT_TELEMETRY_NUM        },\n \t{OPT_NO_TELEMETRY,      0, NULL, OPT_NO_TELEMETRY_NUM     },\n \t{OPT_FORCE_MAX_SIMD_BITWIDTH, 1, NULL, OPT_FORCE_MAX_SIMD_BITWIDTH_NUM},\n+\n+\t/* legacy options that will be removed in next LTS */\n+\t{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },\n+\t{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },\n+\n \t{0,                     0, NULL, 0                        }\n };\n \n@@ -1448,28 +1454,31 @@ 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+\tstatic int a_used;\n \n \tswitch (opt) {\n-\t/* blacklist */\n+\tcase OPT_PCI_BLACKLIST_NUM:\n+\t\tfprintf(stderr,\n+\t\t\t\"Option --pci-blacklist is deprecated, use -b, --block instead\\n\");\n+\t\t/* fallthrough */\n \tcase 'b':\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\tif (a_used)\n+\t\t\tgoto ba_conflict;\n+\t\tif (eal_option_device_add(RTE_DEVTYPE_BLOCKED, optarg) < 0)\n \t\t\treturn -1;\n-\t\t}\n \t\tb_used = 1;\n \t\tbreak;\n-\t/* whitelist */\n+\n \tcase 'w':\n+\t\tfprintf(stderr,\n+\t\t\t\"Option -w, --pci-whitelist is deprecated, use -a, --allow option instead\\n\");\n+\t\t/* fallthrough */\n+\tcase 'a':\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\tgoto ba_conflict;\n+\t\tif (eal_option_device_add(RTE_DEVTYPE_ALLOWED, optarg) < 0)\n \t\t\treturn -1;\n-\t\t}\n-\t\tw_used = 1;\n+\t\ta_used = 1;\n \t\tbreak;\n \t/* coremask */\n \tcase 'c': {\n@@ -1760,9 +1769,10 @@ 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+\n+ba_conflict:\n+\tRTE_LOG(ERR, EAL,\n+\t\t\"Options allow (-a) and block (-b) can't be used at the same time\\n\");\n \treturn -1;\n }\n \n@@ -1997,14 +2007,14 @@ eal_common_usage(void)\n \t       \"  -n CHANNELS         Number of memory channels\\n\"\n \t       \"  -m MB               Memory to allocate (see also --\"OPT_SOCKET_MEM\")\\n\"\n \t       \"  -r RANKS            Force number of memory ranks (don't detect)\\n\"\n-\t       \"  -b, --\"OPT_PCI_BLACKLIST\" Add a PCI device in black list.\\n\"\n-\t       \"                      Prevent EAL from using this PCI device. The argument\\n\"\n-\t       \"                      format is <domain:bus:devid.func>.\\n\"\n-\t       \"  -w, --\"OPT_PCI_WHITELIST\" Add a PCI device in white list.\\n\"\n-\t       \"                      Only use the specified PCI devices. The argument format\\n\"\n-\t       \"                      is <[domain:]bus:devid.func>. This option can be present\\n\"\n-\t       \"                      several times (once per device).\\n\"\n-\t       \"                      [NOTE: PCI whitelist cannot be used with -b option]\\n\"\n+\t       \"  -b, --block         Add a device to the blocked list.\\n\"\n+\t       \"                      Prevent EAL from using this device. The argument\\n\"\n+\t       \"                      format for PCI devices is <domain:bus:devid.func>.\\n\"\n+\t       \"  -a, --allow         Add a device to the allow list.\\n\"\n+\t       \"                      Only use the specified devices. The argument format\\n\"\n+\t       \"                      for PCI devices is <[domain:]bus:devid.func>.\\n\"\n+\t       \"                      This option can be present several times.\\n\"\n+\t       \"                      [NOTE: \" OPT_DEV_ALLOW \" cannot be used with \"OPT_DEV_BLOCK\" option]\\n\"\n \t       \"  --\"OPT_VDEV\"              Add a virtual device.\\n\"\n \t       \"                      The argument format is <driver><id>[,key=val,...]\\n\"\n \t       \"                      (ex: --vdev=net_pcap0,iface=eth2).\\n\"\ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex aec8a17d722e..d9d26c962590 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -13,8 +13,12 @@ enum {\n \t/* long options mapped to a short option */\n #define OPT_HELP              \"help\"\n \tOPT_HELP_NUM            = 'h',\n-#define OPT_PCI_BLACKLIST     \"pci-blacklist\"\n-\tOPT_PCI_BLACKLIST_NUM   = 'b',\n+#define OPT_DEV_ALLOW\t      \"allow\"\n+\tOPT_DEV_ALLOW_NUM       = 'a',\n+#define OPT_DEV_BLOCK         \"block\"\n+\tOPT_DEV_BLOCK_NUM      = 'b',\n+\n+\t/* legacy option that will be removed in next LTS */\n #define OPT_PCI_WHITELIST     \"pci-whitelist\"\n \tOPT_PCI_WHITELIST_NUM   = 'w',\n \n@@ -89,6 +93,11 @@ enum {\n \tOPT_NO_TELEMETRY_NUM,\n #define OPT_FORCE_MAX_SIMD_BITWIDTH  \"force-max-simd-bitwidth\"\n \tOPT_FORCE_MAX_SIMD_BITWIDTH_NUM,\n+\n+\t/* legacy option that will be removed in next LTS */\n+#define OPT_PCI_BLACKLIST     \"pci-blacklist\"\n+\tOPT_PCI_BLACKLIST_NUM,\n+\n \tOPT_LONG_MAX_NUM\n };\n \n",
    "prefixes": [
        "v10",
        "3/7"
    ]
}