diff --git a/CHANGELOG.md b/CHANGELOG.md index 20344e29a..2c986ec9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The pci_whitelist and pci_blacklist members of struct spdk_app_opts have been deprecated. The new members are named pci_allowed and pci_blocked respectively. +The --pci-blacklist command line option has been deprecated, replaced with +--pci-blocked. + +The --pci-whitelist/-W command line options have been deprecated, replaced with +--pci-allowed/-A. + ### env The pci_whitelist and pci_blacklist members of struct spdk_env_opts have been diff --git a/doc/applications.md b/doc/applications.md index 9afbba27c..f80a5faf9 100644 --- a/doc/applications.md +++ b/doc/applications.md @@ -41,8 +41,8 @@ Param | Long Param | Type | Default | Descript | | --silence-noticelog | flag | | disable notice level logging to `stderr` -u | --no-pci | flag | | @ref cmd_arg_disable_pci_access. | | --wait-for-rpc | flag | | @ref cmd_arg_deferred_initialization --B | --pci-blacklist | B:D:F | | @ref cmd_arg_pci_blacklist_whitelist. --W | --pci-whitelist | B:D:F | | @ref cmd_arg_pci_blacklist_whitelist. +-B | --pci-blocked | B:D:F | | @ref cmd_arg_pci_blocked_allowed. +-A | --pci-allowed | B:D:F | | @ref cmd_arg_pci_blocked_allowed. -R | --huge-unlink | flag | | @ref cmd_arg_huge_unlink | | --huge-dir | string | the first discovered | allocate hugepages from a specific mount -L | --logflag | string | | @ref cmd_arg_log_flags @@ -121,12 +121,12 @@ If SPDK is run with PCI access disabled it won't detect any PCI devices. This includes primarily NVMe and IOAT devices. Also, the VFIO and UIO kernel modules are not required in this mode. -### PCI address blacklist and whitelist {#cmd_arg_pci_blacklist_whitelist} +### PCI address blocked and allowed lists {#cmd_arg_pci_blocked_allowed} -If blacklist is used, then all devices with the provided PCI address will be -ignored. If a whitelist is used, only whitelisted devices will be probed. -`-B` or `-W` can be used more than once, but cannot be mixed together. That is, -`-B` and `-W` cannot be used at the same time. +If blocked list is used, then all devices with the provided PCI address will be +ignored. If an allowed list is used, only allowed devices will be probed. +`-B` or `-A` can be used more than once, but cannot be mixed together. That is, +`-B` and `-A` cannot be used at the same time. ### Unlink hugepage files after initialization {#cmd_arg_huge_unlink} diff --git a/lib/event/app.c b/lib/event/app.c index bb6278b10..6123abdec 100644 --- a/lib/event/app.c +++ b/lib/event/app.c @@ -107,14 +107,17 @@ static const struct option g_cmdline_options[] = { {"no-pci", no_argument, NULL, NO_PCI_OPT_IDX}, #define VERSION_OPT_IDX 'v' {"version", no_argument, NULL, VERSION_OPT_IDX}, -#define PCI_BLACKLIST_OPT_IDX 'B' - {"pci-blacklist", required_argument, NULL, PCI_BLACKLIST_OPT_IDX}, +#define PCI_BLOCKED_OPT_IDX 'B' + {"pci-blocked", required_argument, NULL, PCI_BLOCKED_OPT_IDX}, + {"pci-blacklist", required_argument, NULL, PCI_BLOCKED_OPT_IDX}, /* deprecated */ #define LOGFLAG_OPT_IDX 'L' {"logflag", required_argument, NULL, LOGFLAG_OPT_IDX}, #define HUGE_UNLINK_OPT_IDX 'R' {"huge-unlink", no_argument, NULL, HUGE_UNLINK_OPT_IDX}, +#define PCI_ALLOWED_OPT_IDX 'A' + {"pci-allowed", required_argument, NULL, PCI_ALLOWED_OPT_IDX}, #define PCI_WHITELIST_OPT_IDX 'W' - {"pci-whitelist", required_argument, NULL, PCI_WHITELIST_OPT_IDX}, + {"pci-whitelist", required_argument, NULL, PCI_WHITELIST_OPT_IDX}, /* deprecated */ #define SILENCE_NOTICELOG_OPT_IDX 257 {"silence-noticelog", no_argument, NULL, SILENCE_NOTICELOG_OPT_IDX}, #define WAIT_FOR_RPC_OPT_IDX 258 @@ -571,12 +574,12 @@ usage(void (*app_usage)(void)) printf(" -u, --no-pci disable PCI access\n"); printf(" --wait-for-rpc wait for RPCs to initialize subsystems\n"); printf(" --max-delay maximum reactor delay (in microseconds)\n"); - printf(" -B, --pci-blacklist \n"); - printf(" pci addr to blacklist (can be used more than once)\n"); + printf(" -B, --pci-blocked \n"); + printf(" pci addr to block (can be used more than once)\n"); printf(" -R, --huge-unlink unlink huge files after initialization\n"); printf(" -v, --version print SPDK version\n"); - printf(" -W, --pci-whitelist \n"); - printf(" pci addr to whitelist (-B and -W cannot be used at the same time)\n"); + printf(" -A, --pci-allowed \n"); + printf(" pci addr to allow (-B and -A cannot be used at the same time)\n"); printf(" --huge-dir use a specific hugetlbfs mount to reserve memory from\n"); printf(" --iova-mode set IOVA mode ('pa' for IOVA_PA and 'va' for IOVA_VA)\n"); printf(" --base-virtaddr the base virtual address for DPDK (default: 0x200000000000)\n"); @@ -737,11 +740,11 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts, case WAIT_FOR_RPC_OPT_IDX: opts->delay_subsystem_init = true; break; - case PCI_BLACKLIST_OPT_IDX: + case PCI_BLOCKED_OPT_IDX: if (opts->pci_allowed) { free(opts->pci_allowed); opts->pci_allowed = NULL; - SPDK_ERRLOG("-B and -W cannot be used at the same time\n"); + SPDK_ERRLOG("-B and -A cannot be used at the same time\n"); usage(app_usage); goto out; } @@ -768,6 +771,9 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts, opts->unlink_hugepage = true; break; case PCI_WHITELIST_OPT_IDX: + SPDK_WARNLOG("-W/--pci-whitelist is deprecated. Use -A/--pci-allowed.\n"); + /* fallthrough */ + case PCI_ALLOWED_OPT_IDX: if (opts->pci_blocked) { free(opts->pci_blocked); opts->pci_blocked = NULL; diff --git a/scripts/bash-completion/spdk b/scripts/bash-completion/spdk index f3f818139..ce5280e46 100644 --- a/scripts/bash-completion/spdk +++ b/scripts/bash-completion/spdk @@ -115,7 +115,7 @@ _spdk_opt_to_complete() { local opt=$1 case "$opt" in - --pci-blacklist | -B | --pci-whitelist | -W) + --pci-blocked | -B | --pci-allowed | -A) local pcis if [[ -e /sys/bus/pci/devices ]]; then pcis=(/sys/bus/pci/devices/*)