devlink-port β devlink port configuration
| Use Case | Command | Description |
|---|---|---|
| π Show all ports | devlink port show | List all devlink ports on the system |
| π Show a specific port | devlink port show pci/0000:01:00.0/1 | Display attributes for one port |
| π§ Set port type | devlink port set pci/0000:01:00.0/1 type eth | Change port type to Ethernet (or ib, auto) |
| πͺ Split a port | devlink port split pci/0000:01:00.0/1 count 4 | Divide a port into multiple child ports |
| π Unsplit a port | devlink port unsplit pci/0000:01:00.0/1 | Merge split ports back into one |
| β Add a PCI SF port | devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 | Create a new SF port |
| β Delete a port | devlink port del pci/0000:06:00.0/1 | Remove a previously created port |
| βοΈ Set function HW address | devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33 | Configure MAC address for a function |
| β Activate function | devlink port function set pci/0000:01:00.0/1 state active | Enable the function and its device(s) |
| βΈοΈ Deactivate function | devlink port function set pci/0000:01:00.0/1 state inactive | Disable the function and its device(s) |
| βοΈ Set a parameter | devlink dev param set pci/0000:01:00.0/1 name internal_error_reset value true cmode runtime | Change a port configuration parameter |
| π Show parameters | devlink dev param show | Dump all port parameters |
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 } ]
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
devlink port set DEV/PORT_INDEX [ type { eth | ib | auto } ]
DEV/PORT_INDEX β specifies the devlink port to operate on. Format: BUS_NAME/BUS_ADDRESS/PORT_INDEX
devlink port split DEV/PORT_INDEX count COUNT
DEV/PORT_INDEX β specifies the devlink port to operate on.
devlink port unsplit DEV/PORT_INDEX
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 [ DEV/PORT_INDEX ]
DEV/PORT_INDEX β specifies the devlink port to show. If this argument is omitted all ports are listed.
Is an alias for devlink-health(8).
devlink port add { DEV | DEV/PORT_INDEX } [ flavour FLAVOUR ] [ pfnum PFNUMBER ] [ sfnum SFNUMBER ] [ controller CNUM ]
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 a unique port index.
devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { active | inactive } ]
DEV/PORT_INDEX β specifies the devlink port to operate on.
devlink port del DEV/PORT_INDEX
DEV/PORT_INDEX β specifies the devlink port to delete.
devlink dev param set DEV/PORT_INDEX name PARAMETER value VALUE cmode { runtime | driverinit | permanent }
DEV/PORT_INDEX β specifies the devlink port to operate on.
devlink dev param show [ DEV/PORT_INDEX name PARAMETER ]
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.
Is an alias for devlink-rate(8).
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
Unsplit 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 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.
devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-health(8)
Jiri Pirko <jiri AT mellanox.com>
Generated by phpman v4.9.25-25-g40dbf62 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-16 13:44 @2600:1f28:365:80b0:8802:8bb4:3873:328e
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format