usertools: fix binding regex or misc device
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 24 Nov 2020 09:46:56 +0000 (09:46 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 25 Nov 2020 13:04:58 +0000 (14:04 +0100)
The "misc" and "regex" device classes were missing from the list used to
check arguments, preventing them from being used with "--status-dev"
flag to list only devices of those types.

When adding them to the list, the list is also sorted alphabetically for
consistency.

Bugzilla ID: 582
Fixes: 81255f27c65c ("usertools: replace optparse with argparse")

Reported-by: Wei Ling <weix.ling@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Yu Jiang <yux.jiang@intel.com>
usertools/dpdk-devbind.py

index 054ad2e..c2ede3d 100755 (executable)
@@ -634,7 +634,8 @@ To bind 0000:02:00.0 and 0000:02:00.1 to the ixgbe kernel driver
     parser.add_argument(
         '--status-dev',
         help="Print the status of given device group.",
-        choices=['net', 'baseband', 'crypto', 'event', 'mempool', 'compress'])
+        choices=['baseband', 'compress', 'crypto', 'event',
+                'mempool', 'misc', 'net', 'regex'])
     bind_group = parser.add_mutually_exclusive_group()
     bind_group.add_argument(
         '-b',