Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81611/?format=api
https://patches.dpdk.org/api/patches/81611/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201020162018.10058-4-stephen@networkplumber.org/", "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": "<20201020162018.10058-4-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20201020162018.10058-4-stephen@networkplumber.org", "date": "2020-10-20T16:20:16", "name": "[v2,3/5] eal: replace pci-whitelist/pci-blacklist options", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6df5de426c5b3dda26f76da95a4018428c22642c", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "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/20201020162018.10058-4-stephen@networkplumber.org/mbox/", "series": [ { "id": 13152, "url": "https://patches.dpdk.org/api/series/13152/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13152", "date": "2020-10-20T16:20:13", "name": "replace blacklist/whitelist with block/allow", "version": 2, "mbox": "https://patches.dpdk.org/series/13152/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/81611/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/81611/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 47FFCA04DD;\n\tTue, 20 Oct 2020 18:21:34 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 22CB5AC6D;\n\tTue, 20 Oct 2020 18:20:40 +0200 (CEST)", "from mail-pg1-f174.google.com (mail-pg1-f174.google.com\n [209.85.215.174]) by dpdk.org (Postfix) with ESMTP id 163A7A996\n for <dev@dpdk.org>; Tue, 20 Oct 2020 18:20:35 +0200 (CEST)", "by mail-pg1-f174.google.com with SMTP id t14so1386909pgg.1\n for <dev@dpdk.org>; Tue, 20 Oct 2020 09:20:35 -0700 (PDT)", "from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id 8sm2393015pjk.20.2020.10.20.09.20.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 20 Oct 2020 09:20:31 -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=wSXBanUGkpftdc9VROl87ThXzOAIkpBD3QpiumD9tsM=;\n b=GuMe6Ekq0leXu/ptoHVHBmoX63f5RZX8BivCsnkHW5aQDurvi+kxZO07/S8JteUFtR\n XNgqvMLyKSK/Pa56b5Pl+uVqbtsOboWhCUohTax5Gisl4cTQG3RJe8TENjWjUKLxOqvZ\n e5vX4/+CHL/3O62xxqcG9d3SLncBXIT6Mz8m681TE1FHulVd/Eh1C8nYCc/Go5mk6A0m\n 7Q2gE1ztJ7TQGk0XFiE+vXOzDHuYwh3M/XAmIm2f8PCUv33fnsgi59o+7RSwFA7U29v3\n PSYwFbcZ6BjFNUQrDh+dCSq3JxQch+SF1MWbSDSSThex8RCU60GBaMiDX0472woz30ry\n jPvQ==", "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=wSXBanUGkpftdc9VROl87ThXzOAIkpBD3QpiumD9tsM=;\n b=hkWtikrR5tTmRPf4j5JJfUOVVO44q1mweMcuj5rG+OGC5zj+aBqIwaIXw1nmMqjSMg\n 2jv3/zXbe1fW8u51WG3qRdA8wNxU/ZyJxRQ4buQykL9CSnDrC5TPV4OdCLrrBeQGuLJ2\n c2UsvAILI5tHDJGVP4S0DQzXbw7bei/RR/1ToKo+mG/F98Ib7sgR9nNlCue1++wT2dQA\n UakFB3yZLrpduhelPe0z5rBf1YHZTK0/Xxb6q0Spv1BOZTY4fXcuO7PBH0TodhvxqCP9\n qoFgKgXV5V6NE4ICFfU5yyt/ibUhkOvtXYH1SC5Lk/LseT8B/ODhP5QYfbdB0fsbgCR0\n Lk1g==", "X-Gm-Message-State": "AOAM530MprG2JG1qs0cxsdkJZJ5d7MZb9meoC2j9/mAI7lXB7RxnLAZw\n Z5Cxy6zb3vj3MbIp0C3oxduxTds+K9ceQA==", "X-Google-Smtp-Source": "\n ABdhPJw4LitfhFIb5gS/bppecs3v3hZgUAOwB6jLNzATBr/pobPhD4in2L55crZQQybxfPGexlbX2A==", "X-Received": "by 2002:a62:d0c1:0:b029:155:2e17:ea0 with SMTP id\n p184-20020a62d0c10000b02901552e170ea0mr3493322pfg.55.1603210832664;\n Tue, 20 Oct 2020 09:20:32 -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": "Tue, 20 Oct 2020 09:20:16 -0700", "Message-Id": "<20201020162018.10058-4-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20201020162018.10058-1-stephen@networkplumber.org>", "References": "<20200922143202.8755-1-stephen@networkplumber.org>\n <20201020162018.10058-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 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..96ba5fe9f632 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, \t1, NULL, OPT_DEV_BLOCK_NUM\t },\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": [ "v2", "3/5" ] }{ "id": 81611, "url": "