--help, --usage:
Display usage information and quit
- --status:
+ -s, --status:
Print the current status of all known network interfaces.
For each device, it displays the PCI domain, bus, slot and function,
along with a text description of the device. Depending upon whether the
# check if we have at least one loaded module
if True not in [mod["Found"] for mod in mods] and b_flag is not None:
- print "Error - no supported modules are loaded"
- sys.exit(1)
+ if b_flag in dpdk_drivers:
+ print "Error - no supported modules(DPDK driver) are loaded"
+ sys.exit(1)
+ else:
+ print "Warning - no supported modules(DPDK driver) are loaded"
# change DPDK driver list to only contain drivers that are loaded
dpdk_drivers = [mod["Name"] for mod in mods if mod["Found"]]
unbind_one(d, force)
def bind_all(dev_list, driver, force=False):
- """Unbind method, takes a list of device locations"""
+ """Bind method, takes a list of device locations"""
global devices
dev_list = map(dev_id_from_dev_name, dev_list)
sys.exit(0)
try:
- opts, args = getopt.getopt(sys.argv[1:], "b:u",
+ opts, args = getopt.getopt(sys.argv[1:], "b:us",
["help", "usage", "status", "force",
"bind=", "unbind"])
except getopt.GetoptError, error:
if opt == "--help" or opt == "--usage":
usage()
sys.exit(0)
- if opt == "--status":
+ if opt == "--status" or opt == "-s":
status_flag = True
if opt == "--force":
force_flag = True