# devlink-port

## NAME



           devlink-port - devlink port configuration
    


## SYNOPSIS



           **devlink**[ _OPTIONS_ ] **port**{ _COMMAND_ | **help**}
    
           _OPTIONS_ := { **-V**[_ersion_] | **-n**[_no-nice-names_] }
    
           **devlink port set** _DEV/PORT_INDEX_ [ **type**{ **eth** | **ib** | **auto**} ]
    
           **devlink port split** _DEV/PORT_INDEX_ **count** _COUNT_
    
           **devlink port unsplit** _DEV/PORT_INDEX_
    
           **devlink port show**[ _DEV/PORT_INDEX_ ]
    
           **devlink port health**{ _show_ | _recover_ | _diagnose_ | _dump_ | _set_ }
    
           **devlink port add**{ _DEV | DEV/PORT_INDEX_ } [ **flavour** _FLAVOUR_ ] [
                   **pfnum** _PFNUMBER_ ] [ **sfnum** _SFNUMBER_ ] [ **controller** _CNUM_ ]
    
           **devlink port del** _DEV/PORT_INDEX_
    
           **devlink port function set** _DEV/PORT_INDEX_ [ **hw_addr** ADDR ] [ **state**
                   { **active** | **inactive**} ] [ **roce**{ **enable** | **disable**} ] [
                   **migratable**{ **enable** | **disable**} ] [ **ipsec_crypto**{ **enable**
                   | **disable**} ] [ **ipsec_packet**{ **enable** | **disable**} ] [
                   **max_io_eqs** EQS ]
    
           **devlink port function rate**{ _show_ | _set_ | _add_ | _del_ | _help_ }
    
           **devlink dev param set** _DEV/PORT_INDEX_ **name** _PARAMETER_ **value** _VALUE_
                   **cmode**{ **runtime** | **driverinit** | **permanent**}
    
           **devlink dev param show**[ _DEV/PORT_INDEX_ **name** _PARAMETER_ ]
    
           **devlink port help**
    


## DESCRIPTION



       **devlink port set - change devlink port attributes**
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
               Format is:
                 BUS_NAME/BUS_ADDRESS/PORT_INDEX
    
           **type**{ **eth** | **ib** | **auto**}
                  set port type
    
                  _eth_ - Ethernet
    
                  _ib_ - Infiniband
    
                  _auto_ - autoselect
    
       **devlink port split - split devlink port into more**
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
           **count** _COUNT_
                  number of ports to split to.
    
       **devlink port unsplit - unsplit previously split devlink port**
           Could be performed on any split port of the same split group.
    
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
       **devlink port show - display devlink port attributes**
           _DEV/PORT_INDEX_ - specifies the devlink port to show.  If this
           argument is omitted all ports are listed.
    
       **devlink port health - devlink health reporting and recovery**
           Is an alias for devlink-health(8).
    
       **devlink port add - add a devlink port**
           _DEV_ - specifies the devlink device to operate on. or
    
           _DEV/PORT_INDEX_ - specifies the devlink port index to use for the
           requested new port.  This is optional. When omitted, driver
           allocates unique port index.
    
           **flavour**{ **pcipf** | **pcisf**}
                  set port flavour
    
                  _pcipf_ - PCI PF port
    
                  _pcisf_ - PCI SF port
    
           **pfnum** _PFNUMBER_
                  Specifies PCI pfnumber to use on which a SF device to
                  create
    
           **sfnum** _SFNUMBER_
                  Specifies sfnumber to assign to the device of the SF.  This
                  field is optional for those devices which supports auto
                  assignment of the SF number.
    
           **controller** _CNUM_
                  Specifies controller number for which the SF port is
                  created.  This field is optional. It is used only when SF
                  port is created for the external controller.
    
       **devlink port function set - Set the port function attribute(s).**
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
           **hw_addr** _ADDR_
                  Hardware address of the function to set. This is a Ethernet
                  MAC address when port type is Ethernet.
    
           **state**{ **active** | **inactive**}
                  New state of the function to change to.
    
                  _active_ - Once configuration of the function is done,
                  activate the function.
    
                  _inactive_ - To inactivate the function and its device(s),
                  set to inactive.
    
           **roce**{ **enable** | **disable**}
                  Set the RoCE capability of the function.
    
           **migratable**{ **enable** | **disable**}
                  Set the migratable capability of the function.
    
           **ipsec_crypto**{ **enable** | **disable**}
                  Set the IPsec crypto offload capability of the function.
                  Controls XFRM state crypto operation (Encrypt/Decrypt)
                  offload.
    
           **ipsec_packet**{ **enable** | **disable**}
                  Set the IPsec packet offload capability of the function.
                  Controls XFRM state and policy offload (Encrypt/Decrypt
                  operation and IPsec encapsulation).
    
           **max_io_eqs** EQS
                  Set the maximum number of IO event queues of the function.
    
       **devlink port del - delete a devlink port**
           _DEV/PORT_INDEX_ - specifies the devlink port to delete.
    
       **devlink port param set - set new value to devlink port configuration**
           **parameter**
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
           **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 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.
    
       **devlink port param show - display devlink port supported configuration**
           **parameters attributes**
           _DEV/PORT_INDEX_ - specifies the devlink port to operate on.
    
           **name** _PARAMETER_ Specify parameter name to show.  If this argument,
           as well as port index, are omitted - all parameters supported by
           devlink device ports are listed.
    
       **devlink port function rate - manage devlink rate objects**
           Is an alias for devlink-rate(8).
    


## EXAMPLES



           devlink port show
               Shows the state of all devlink ports on the system.
    
           devlink port show pci/0000:01:00.0/1
               Shows the state of specified devlink port.
    
           devlink port set pci/0000:01:00.0/1 type eth
               Set type of specified devlink port to Ethernet.
    
           devlink port split pci/0000:01:00.0/1 count 4
               Split the specified devlink port into four ports.
    
           devlink port unsplit pci/0000:01:00.0/1
               Unplit the specified previously split devlink port.
    
           devlink port health show
               Shows status and configuration of all supported reporters
               registered on all devlink ports.
    
           devlink port health show pci/0000:01:00.0/1 reporter tx
               Shows status and configuration of tx reporter registered on
               pci/0000:01:00.0/1 devlink port.
    
           devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
               Add a devlink port of flavour PCI SF on PCI PF having number 0
               with SF number 88.  To make use of the function an example
               sequence is to add a port, configure the function attribute
               and activate the function. Once function usage is completed,
               inactivate the function and finally delete the port. When
               there is desire to reuse the port without deletion, it can be
               reconfigured and activated again when function is in inactive
               state and function's operational state is detached.
    
           devlink port del pci/0000:06:00.0/1
               Delete previously created devlink port. It is recommended to
               first deactivate the function if the function supports state
               management.
    
           devlink port function set pci/0000:01:00.0/1 hw_addr
           00:00:00:11:22:33
               Configure hardware address of the PCI function represented by
               devlink port.  If the port supports change in function state,
               hardware address must be configured before activating the
               function.
    
           devlink port function set pci/0000:01:00.0/1 state active
               Activate the function. This will initiate the function
               enumeration and driver loading.
    
           devlink port function set pci/0000:01:00.0/1 state inactive
               Deactivate the function. This will initiate the function
               teardown which results in driver unload and device removal.
    
           devlink port function set pci/0000:01:00.0/1 roce enable
               This will enable the RoCE functionality of the function.
    
           devlink port function set pci/0000:01:00.0/1 migratable enable
               This will enable the migratable functionality of the function.
    
           devlink port function set pci/0000:01:00.0/1 ipsec_crypto enable
               This will enable the IPsec crypto offload functionality of the
               function.
    
           devlink port function set pci/0000:01:00.0/1 ipsec_packet enable
               This will enable the IPsec packet offload functionality of the
               function.
    
           devlink port function set pci/0000:01:00.0/1 max_io_eqs 4
               This will set the maximum number of IO event queues of the
               function to 4.
    
           devlink port function set pci/0000:01:00.0/1 hw_addr
           00:00:00:11:22:33 state active
               Configure hardware address and also active the function. When
               a function is activated together with other configuration in a
               single command, all the configuration is applied first before
               changing the state to active.
    
           devlink dev param show
               Shows (dumps) all the port parameters across all the devices
               registered in the devlink.
    
           devlink dev param set pci/0000:01:00.0/1 name internal_error_reset
           value true cmode runtime
               Sets the parameter internal_error_reset of specified devlink
               port (#1) to true.
    
           devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
           controller 1
               Add a devlink port of flavour PCI SF on controller 1 which has
               PCI PF of number 0 with SF number 88. To make use of the
               function an example sequence is to add a port, configure the
               function attribute and activate the function. Once the
               function usage is completed, deactivate the function and
               finally delete the port. When there is desire to reuse the
               port without deletion, it can be reconfigured and activated
               again when function is in inactive state and function's
               operational state is detached.
    


* * *