get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81799,
    "url": "http://patches.dpdk.org/api/patches/81799/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201022143925.30980-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": "<20201022143925.30980-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201022143925.30980-4-stephen@networkplumber.org",
    "date": "2020-10-22T14:39:23",
    "name": "[v3,3/5] eal: replace pci-whitelist/pci-blacklist options",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c92efcf9ab66b8775015f5943ccb38d45e351cc2",
    "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/20201022143925.30980-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 13216,
            "url": "http://patches.dpdk.org/api/series/13216/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13216",
            "date": "2020-10-22T14:39:20",
            "name": "replace blacklist/whitelist with block/allow",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/13216/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/81799/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/81799/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 B6E84A04DD;\n\tThu, 22 Oct 2020 16:40:43 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 179F1AA21;\n\tThu, 22 Oct 2020 16:39:46 +0200 (CEST)",
            "from mail-pf1-f170.google.com (mail-pf1-f170.google.com\n [209.85.210.170]) by dpdk.org (Postfix) with ESMTP id B5C31AA0B\n for <dev@dpdk.org>; Thu, 22 Oct 2020 16:39:41 +0200 (CEST)",
            "by mail-pf1-f170.google.com with SMTP id 10so1262283pfp.5\n for <dev@dpdk.org>; Thu, 22 Oct 2020 07:39:41 -0700 (PDT)",
            "from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id y5sm2522020pgo.5.2020.10.22.07.39.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 22 Oct 2020 07:39:38 -0700 (PDT)"
        ],
        "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=bvfrtbwyKC75iDFlNAWklI89OVVcNXeqIESjZd9uyE0=;\n b=0Gxg4eywkny4fnNfxA0+OikOW8aVbFBlEcQjBZJ4U6wJvQkAJDeFOMnBobq1W+yCfc\n SUyvR4DaTSYixxd7MhmeefnZogKxGdzKWP/OgPcznsmQhdb+p+lBT42GbG4zl/ddQInU\n ysXWtRk09cU8SJ1NJvBKa8iTWeyAfp3l/a6qjeezmHjW5VJKOhlACZF+OXRURR6nEXOV\n irYNDpycRqew2Tk5pIIZCX3ua/Nw/5d/lMFtNRgsZSEkIMk6sK/URC2DeqJLsXvUo8Zm\n ag5O3+Vn5W09L7SsV1kOS1d7YEwXe2m6DHOtzpYdD9CXtjSnc/5YkyMGhCELEj/RKoKR\n GmEg==",
        "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=bvfrtbwyKC75iDFlNAWklI89OVVcNXeqIESjZd9uyE0=;\n b=i6yCFM67pfBzub71eOr3ezaKdNCRP6o1HgleoIL3aSB4WunrcfyhrG6FC3wNt/emOu\n fClOOU6owP5jPrOvn6vdwVZOQGHxgijUvnuaU7d6+3jFo0Qhw5eM1A+zHj9l8lFpxovR\n r2EbVs2nW9RP8/QTRkztNtGBI6AIdFqUAU4YRb7eap9STdVt4+akUx3WY8Sb1Y7+jVQJ\n a32fkgz1ZF5OJ/+PqRtapugNtg5eaIawm6IVXHIpr6vTj9gJsRQVIMRaFVlhPlQ+NkBR\n AlfUdaT4BFOris8zAHVIPe/ecSs2NmTBSW0PhxeumaLZ1x9MqC02w1JYoBkA4IHl3lCe\n 7ZXw==",
        "X-Gm-Message-State": "AOAM532lii+dOYKRwRTIp82KGpsk6fYmb7q3xfIddY1nFh3g9HceXNk/\n MHocNJ6dP1uYwJ9DLKb3J/4KO0qDKCL3W1FA",
        "X-Google-Smtp-Source": "\n ABdhPJxX4TydcQnfPsk/U4aKn3XU8eT/aSjfk8JrTfK9s21UdpDp/37DvvAGr7uVHsVK/QiKvfok5A==",
        "X-Received": "by 2002:a63:40c1:: with SMTP id\n n184mr2536989pga.215.1603377579353;\n Thu, 22 Oct 2020 07:39:39 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Luca Boccassi <bluca@debian.org>",
        "Date": "Thu, 22 Oct 2020 07:39:23 -0700",
        "Message-Id": "<20201022143925.30980-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201022143925.30980-1-stephen@networkplumber.org>",
        "References": "<20200922143202.8755-1-stephen@networkplumber.org>\n <20201022143925.30980-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 3/5] 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 | 70 +++++++++++++---------\n lib/librte_eal/common/eal_options.h        |  9 ++-\n 2 files changed, 51 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 7b3341683662..0518430b44bc 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,8 @@ 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:\" /* whitelist (deprecated) */\n+\t\"B:\" /* blacklist (deprecated) */\n \t;\n \n const struct option\n@@ -89,8 +91,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 +107,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@@ -1447,29 +1454,37 @@ 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+\tstatic bool x_used, i_used;\n \n \tswitch (opt) {\n-\t/* blacklist */\n+\tcase 'B':\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/* excluded list */\n+\t\tif (i_used)\n+\t\t\tgoto include_exclude;\n+\t\tif (eal_option_device_add(RTE_DEVTYPE_BLOCKED,\n \t\t\t\toptarg) < 0) {\n \t\t\treturn -1;\n \t\t}\n-\t\tb_used = 1;\n+\t\tx_used = true;\n \t\tbreak;\n-\t/* whitelist */\n+\n \tcase 'w':\n-\t\tif (b_used)\n-\t\t\tgoto bw_used;\n-\t\tif (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,\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 'i':\n+\t\t/* include device list */\n+\t\tif (x_used)\n+\t\t\tgoto include_exclude;\n+\t\tif (eal_option_device_add(RTE_DEVTYPE_ALLOWED,\n \t\t\t\toptarg) < 0) {\n \t\t\treturn -1;\n \t\t}\n-\t\tw_used = 1;\n+\t\ti_used = true;\n \t\tbreak;\n \t/* coremask */\n \tcase 'c': {\n@@ -1760,9 +1775,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+include_exclude:\n+\tRTE_LOG(ERR, EAL,\n+\t\t\"Options include (-i) and exclude (-x) can't be used at the same time\\n\");\n \treturn -1;\n }\n \n@@ -1997,14 +2013,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, --\"OPT_DEV_BLOCK\" Add a device to the excluded 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, --\"OPT_DEV_ALLOW\" Add a device to the included 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..e621c26098c3 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -13,8 +13,15 @@ enum {\n \t/* long options mapped to a short option */\n #define OPT_HELP              \"help\"\n \tOPT_HELP_NUM            = 'h',\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 options that will be removed in next LTS */\n #define OPT_PCI_BLACKLIST     \"pci-blacklist\"\n-\tOPT_PCI_BLACKLIST_NUM   = 'b',\n+\tOPT_PCI_BLACKLIST_NUM  = 'B',\n+\n #define OPT_PCI_WHITELIST     \"pci-whitelist\"\n \tOPT_PCI_WHITELIST_NUM   = 'w',\n \n",
    "prefixes": [
        "v3",
        "3/5"
    ]
}