-def usage():
- '''Print usage information for the program'''
- argv0 = basename(sys.argv[0])
- print("""
-Usage:
-------
-
- %(argv0)s [options] DEVICE1 DEVICE2 ....
-
-where DEVICE1, DEVICE2 etc, are specified via PCI "domain:bus:slot.func" syntax
-or "bus:slot.func" syntax. For devices bound to Linux kernel drivers, they may
-also be referred to by Linux interface name e.g. eth0, eth1, em0, em1, etc.
-
-Options:
- --help, --usage:
- Display usage information and quit
-
- -s, --status:
- Print the current status of all known network, crypto, event
- and mempool devices.
- For each device, it displays the PCI domain, bus, slot and function,
- along with a text description of the device. Depending upon whether the
- device is being used by a kernel driver, the igb_uio driver, or no
- driver, other relevant information will be displayed:
- * the Linux interface name e.g. if=eth0
- * the driver being used e.g. drv=igb_uio
- * any suitable drivers not currently using that device
- e.g. unused=igb_uio
- NOTE: if this flag is passed along with a bind/unbind option, the
- status display will always occur after the other operations have taken
- place.
-
- --status-dev:
- Print the status of given device group. Supported device groups are:
- "net", "crypto", "event", "mempool" and "compress"
-
- -b driver, --bind=driver:
- Select the driver to use or \"none\" to unbind the device
-
- -u, --unbind:
- Unbind a device (Equivalent to \"-b none\")
-
- --force:
- By default, network devices which are used by Linux - as indicated by
- having routes in the routing table - cannot be modified. Using the
- --force flag overrides this behavior, allowing active links to be
- forcibly unbound.
- WARNING: This can lead to loss of network connection and should be used
- with caution.