devlink
[ OPTIONS ]
dev
{ COMMAND |
help }
OPTIONS := {
-V[ersion] |
-n[no-nice-names] }
devlink dev show
[ DEV ]
devlink dev help
devlink dev eswitch set
DEV
[
mode { legacy | switchdev }
] [
inline-mode { none | link | network | transport }
] [
encap-mode { none | basic }
]
devlink dev eswitch show
DEV
devlink dev param set
DEV
name
PARAMETER
value
VALUE
cmode { runtime | driverinit | permanent }
devlink dev param show
[
DEV
name
PARAMETER
]
devlink dev reload
DEV
[
netns
{ PID | NAME | ID }
]
devlink dev info
[
DEV
]
devlink dev flash
DEV
file
PATH
[
target
ID
]
DEV - specifies the devlink device to show. If this argument is omitted all devices are listed.
Format is: BUS_NAME/BUS_ADDRESS
legacy - Legacy SRIOV
switchdev - SRIOV switchdev offloads
none - None
link - L2 mode
network - L3 mode
transport - L4 mode
none - Disable encapsulation support
basic - Enable encapsulation support
runtime - Set new value while driver is running. This configuration mode doesn't require any reset to apply the new value.
driverinit - Set new value which will be applied during driver initialization. This configuration mode requires restart driver by devlink reload command to apply the new value.
permanent - New value is written to device's non-volatile memory. This configuration mode requires hard reset to apply the new value.
name PARAMETER Specify parameter name to show. If this argument is omitted all parameters supported by devlink devices are listed.
DEV - Specifies the devlink device to reload.
netns { PID | NAME | ID } - Specifies the network namespace to reload into, either by pid, name or id.
DEV - specifies the devlink device to show. If this argument is omitted all devices are listed.
DEV - specifies the devlink device to write to.
file PATH - Path to the file which will be written into device's flash. The path needs to be relative to one of the directories searched by the kernel firmware loaded, such as /lib/firmware.
component NAME - If device stores multiple firmware images in non-volatile memory, this parameter may be used to indicate which firmware image should be written. The value of NAME should match the component names from devlink dev info and may be driver-dependent.
devlink dev show
devlink dev show pci/0000:01:00.0
devlink dev eswitch show pci/0000:01:00.0
devlink dev eswitch set pci/0000:01:00.0 mode switchdev
devlink dev param show pci/0000:01:00.0 name max_macs
devlink dev param set pci/0000:01:00.0 name internal_error_reset value true cmode runtime
devlink dev reload pci/0000:01:00.0
devlink dev flash pci/0000:01:00.0 file firmware.bin