X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=usertools%2Fdpdk-devbind.py;h=c2ede3d4dfd3040d264ea0693b6b317bb5e68341;hb=2d30d42c0fd1eade46055ff7aca1cdf04ae3daf8;hp=47373e27bd74d8967da6e9f2364fa2139d7db985;hpb=1bb98a9083bbf1aebcfdf343aed8746a04fa07af;p=dpdk.git diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 47373e27bd..c2ede3d4df 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -557,28 +557,28 @@ def show_status(): Displays to the user what devices are bound to the igb_uio driver, the kernel driver or to no driver''' - if status_dev == "net" or status_dev == "all": + if status_dev in ["net", "all"]: show_device_status(network_devices, "Network", if_field=True) - if status_dev == "baseband" or status_dev == "all": + if status_dev in ["baseband", "all"]: show_device_status(baseband_devices, "Baseband") - if status_dev == "crypto" or status_dev == "all": + if status_dev in ["crypto", "all"]: show_device_status(crypto_devices, "Crypto") - if status_dev == "event" or status_dev == "all": + if status_dev in ["event", "all"]: show_device_status(eventdev_devices, "Eventdev") - if status_dev == "mempool" or status_dev == "all": + if status_dev in ["mempool", "all"]: show_device_status(mempool_devices, "Mempool") - if status_dev == "compress" or status_dev == "all": + if status_dev in ["compress", "all"]: show_device_status(compress_devices, "Compress") - if status_dev == "misc" or status_dev == "all": + if status_dev in ["misc", "all"]: show_device_status(misc_devices, "Misc (rawdev)") - if status_dev == "regex" or status_dev == "all": + if status_dev in ["regex", "all"]: show_device_status(regex_devices, "Regex") @@ -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', @@ -703,7 +704,7 @@ def do_arg_actions(): global force_flag global args - if b_flag == "none" or b_flag == "None": + if b_flag in ["none", "None"]: unbind_all(args, force_flag) elif b_flag is not None: bind_all(args, b_flag, force_flag)