[dpdk-dev,v7,17/17] eal: change whitelist / blacklist command line doc

Message ID d31638b4db9105e7f3fa50651e34e12d8eb8d59b.1499384591.git.gaetan.rivet@6wind.com (mailing list archive)
State Rejected, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Gaëtan Rivet July 7, 2017, 12:04 a.m. UTC
  The use of these commands have evolved.
It is now possible to use whitelist and blacklist on any bus.

Update the source code accordingly.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 18 +++++++++---------
 lib/librte_eal/common/eal_options.h        |  8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)
  

Comments

Thomas Monjalon July 8, 2017, 10:25 p.m. UTC | #1
07/07/2017 02:04, Gaetan Rivet:
> The use of these commands have evolved.
> It is now possible to use whitelist and blacklist on any bus.
> 
> Update the source code accordingly.
> 
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>
> ---
[...]
> --- a/lib/librte_eal/common/eal_options.h
> +++ b/lib/librte_eal/common/eal_options.h
> @@ -37,10 +37,10 @@ enum {
>  	/* long options mapped to a short option */
>  #define OPT_HELP              "help"
>  	OPT_HELP_NUM            = 'h',
> -#define OPT_PCI_BLACKLIST     "pci-blacklist"
> -	OPT_PCI_BLACKLIST_NUM   = 'b',
> -#define OPT_PCI_WHITELIST     "pci-whitelist"
> -	OPT_PCI_WHITELIST_NUM   = 'w',
> +#define OPT_BUS_BLACKLIST     "bus-blacklist"
> +	OPT_BUS_BLACKLIST_NUM   = 'b',
> +#define OPT_BUS_WHITELIST     "bus-whitelist"
> +	OPT_BUS_WHITELIST_NUM   = 'w',

No, we cannot drop an existing option without a prior notice.
Let's discuss what should be the command line syntax and agree
on a good and complete deprecation notice.
There will be more to change, like making bus explicit.
  

Patch

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 075b0ea..245a276 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -86,8 +86,8 @@  eal_long_options[] = {
 	{OPT_NO_HUGE,           0, NULL, OPT_NO_HUGE_NUM          },
 	{OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },
 	{OPT_NO_SHCONF,         0, NULL, OPT_NO_SHCONF_NUM        },
-	{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },
-	{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },
+	{OPT_BUS_BLACKLIST,     1, NULL, OPT_BUS_BLACKLIST_NUM    },
+	{OPT_BUS_WHITELIST,     1, NULL, OPT_BUS_WHITELIST_NUM    },
 	{OPT_PROC_TYPE,         1, NULL, OPT_PROC_TYPE_NUM        },
 	{OPT_SOCKET_MEM,        1, NULL, OPT_SOCKET_MEM_NUM       },
 	{OPT_SYSLOG,            1, NULL, OPT_SYSLOG_NUM           },
@@ -1049,14 +1049,14 @@  eal_common_usage(void)
 	       "  -n CHANNELS         Number of memory channels\n"
 	       "  -m MB               Memory to allocate (see also --"OPT_SOCKET_MEM")\n"
 	       "  -r RANKS            Force number of memory ranks (don't detect)\n"
-	       "  -b, --"OPT_PCI_BLACKLIST" Add a PCI device in black list.\n"
-	       "                      Prevent EAL from using this PCI device. The argument\n"
-	       "                      format is <domain:bus:devid.func>.\n"
-	       "  -w, --"OPT_PCI_WHITELIST" Add a PCI device in white list.\n"
-	       "                      Only use the specified PCI devices. The argument format\n"
-	       "                      is <[domain:]bus:devid.func>. This option can be present\n"
+	       "  -b, --"OPT_BUS_BLACKLIST" Black list a device on its bus.\n"
+	       "                      Prevents EAL from using this device. The argument\n"
+	       "                      format depends on the bus.\n"
+	       "  -w, --"OPT_BUS_WHITELIST" White list a device on its bus.\n"
+	       "                      Only use the specified devices. The argument format\n"
+	       "                      depends on the bus. This option can be present\n"
 	       "                      several times (once per device).\n"
-	       "                      [NOTE: PCI whitelist cannot be used with -b option]\n"
+	       "                      [NOTE: whitelist cannot be used with -b option]\n"
 	       "  --"OPT_VDEV"              Add a virtual device.\n"
 	       "                      The argument format is <driver><id>[,key=val,...]\n"
 	       "                      (ex: --vdev=net_pcap0,iface=eth2).\n"
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index a881c62..4c5db07 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -37,10 +37,10 @@  enum {
 	/* long options mapped to a short option */
 #define OPT_HELP              "help"
 	OPT_HELP_NUM            = 'h',
-#define OPT_PCI_BLACKLIST     "pci-blacklist"
-	OPT_PCI_BLACKLIST_NUM   = 'b',
-#define OPT_PCI_WHITELIST     "pci-whitelist"
-	OPT_PCI_WHITELIST_NUM   = 'w',
+#define OPT_BUS_BLACKLIST     "bus-blacklist"
+	OPT_BUS_BLACKLIST_NUM   = 'b',
+#define OPT_BUS_WHITELIST     "bus-whitelist"
+	OPT_BUS_WHITELIST_NUM   = 'w',
 
 	/* first long only option value must be >= 256, so that we won't
 	 * conflict with short options */