# DEVLINK-DEV(8) - man - phpman

[DEVLINK-DEV(8)](https://www.chedong.com/phpMan.php/man/DEVLINK-DEV/8/markdown)                                  Linux                                 [DEVLINK-DEV(8)](https://www.chedong.com/phpMan.php/man/DEVLINK-DEV/8/markdown)



## NAME
       devlink-dev - devlink device configuration

## SYNOPSIS
       **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_ } ] [ **action** { **driver**___**reinit** | **fw**___**activate** }
               ] [ **limit** **no**___**reset** ]

       **devlink** **dev** **info** [ _DEV_ ]

       **devlink** **dev** **flash** _DEV_ **file** _PATH_ [ **target** _ID_ ]


## DESCRIPTION
### devlink dev show - display devlink device attributes
       _DEV_ - specifies the devlink device to show.  If this argument is omitted all devices are
       listed.

           Format is:
             BUS_NAME/BUS_ADDRESS


### devlink dev eswitch show - display devlink device eswitch attributes
### devlink dev eswitch set - sets devlink device eswitch attributes
       **mode** { **legacy** | **switchdev** }
              Set eswitch mode

              _legacy_ - Legacy SRIOV

              _switchdev_ - SRIOV switchdev offloads


       **inline-mode** { **none** | **link** | **network** | **transport** }
              Some HWs need the VF driver to put part of the packet headers on the TX descriptor so
              the e-switch can do proper matching and steering.

              _none_ - None

              _link_ - L2 mode

              _network_ - L3 mode

              _transport_ - L4 mode


       **encap-mode** { **none** | **basic** }
              Set eswitch encapsulation support

              _none_ - Disable encapsulation support

              _basic_ - Enable encapsulation support


### devlink dev param set - set new value to devlink device configuration parameter
       **name** _PARAMETER_
              Specify parameter name to set.


       **value** _VALUE_
              New value to set.


       **cmode** { **runtime** | **driverinit** | **permanent** }
              Configuration mode in which the new value is set.

              _runtime_ - Set new value while driver is running. This configuration mode doesn't re‐
              quire 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.


### devlink dev param show - display devlink device supported configuration parameters attributes
       **name** _PARAMETER_ Specify parameter name to show.  If this argument is omitted all parameters
       supported by devlink devices are listed.


### devlink dev reload - perform hot reload of the driver.
       _DEV_ - Specifies the devlink device to reload.

       **netns** { _PID_ | _NAME_ | _ID_ } - Specifies the network namespace to reload into, either by pid,
       name or id.

       **action** { **driver**___**reinit** | **fw**___**activate** } - Specifies the reload action required.  If this argu‐
       ment is omitted _driver_reinit_ action will be used.  Note that even though user asks for a
       specific action, the driver implementation might require to perform another action alongside
       with it. For example, some driver do not support driver reinitialization being performed
       without fw activation. Therefore, the devlink reload command returns the list of actions
       which were actrually performed.

       _driver_reinit_ - Driver entities re-initialization, applying devlink-param and devlink-re‐
       source values.

       _fw_activate_ - Activates new firmware if such image is stored and pending activation. If no
       limitation specified this action may involve firmware reset. If no new image pending this ac‐
       tion will reload current firmware image.

       **limit** **no**___**reset** - Specifies limitation on reload action.  If this argument is omitted limit is
       unspecificed and the reload action is not limited. In such case driver implementation may in‐
       clude reset or downtime as needed to perform the actions.

       _no_reset_ - No reset allowed, no down time allowed, no link flap and no configuration is lost.


### devlink dev info - display device information.
       Display device information provided by the driver. This command can be used to query versions
       of the hardware components or device components which can't be updated ( _fixed_ ) as well as
       device firmware which can be updated. For firmware components _running_ displays the versions
       of firmware currently loaded into the device, while _stored_ reports the versions in device's
       flash.  _Running_ and _stored_ versions may differ after flash has been updated, but before re‐
       boot.


       _DEV_ - specifies the devlink device to show.  If this argument is omitted all devices are
       listed.


### devlink dev flash - write device's non-volatile memory.
       _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 pa‐
       rameter 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.


## EXAMPLES
       devlink dev show
           Shows the state of all devlink devices on the system.

       devlink dev show pci/0000:01:00.0
           Shows the state of specified devlink device.

       devlink dev eswitch show pci/0000:01:00.0
           Shows the eswitch mode of specified devlink device.

       devlink dev eswitch set pci/0000:01:00.0 mode switchdev
           Sets the eswitch mode of specified devlink device to switchdev.

       devlink dev param show pci/0000:01:00.0 name max_macs
           Shows the parameter max_macs attributes.

       devlink dev param set pci/0000:01:00.0 name internal_error_reset value true cmode runtime
           Sets the parameter internal_error_reset of specified devlink device to true.

       devlink dev reload pci/0000:01:00.0
           Performs hot reload of specified devlink device.

       devlink dev flash pci/0000:01:00.0 file firmware.bin
           Flashes the specified devlink device with provided firmware file name. If the driver sup‐
           ports it, user gets updates about the flash status. For example:
           Preparing to flash
           Flashing 100%
           Flashing done


## SEE ALSO
       [**devlink**(8)](https://www.chedong.com/phpMan.php/man/devlink/8/markdown), [**devlink-port**(8)](https://www.chedong.com/phpMan.php/man/devlink-port/8/markdown), [**devlink-sb**(8)](https://www.chedong.com/phpMan.php/man/devlink-sb/8/markdown), [**devlink-monitor**(8)](https://www.chedong.com/phpMan.php/man/devlink-monitor/8/markdown),


## AUTHOR
       Jiri Pirko <<jiri@mellanox.com>>



iproute2                                     14 Mar 2016                              [DEVLINK-DEV(8)](https://www.chedong.com/phpMan.php/man/DEVLINK-DEV/8/markdown)
