Modern Linux servers and cloud hypervisors utilise sophisticated Network Interface Cards (NICs) and SmartNICs capable of advanced hardware acceleration, SR-IOV virtualisation, dynamic packet filtering, and on-chip health monitoring. Traditional network utilities like ifconfig or basic ip link commands operate at the netdevice level, treating each interface as an abstract network port. They lack direct visibility into the underlying ASIC hardware, physical PCI device parameters, firmware versions, or internal hardware error reporters.
To provide a unified, kernel-sanctioned interface for physical device management, Linux includes devlink within the standard iproute2 package. The devlink utility gives network engineers, system administrators, and kernel developers granular control over hardware resources: managing device-level parameters, flashing firmware, inspecting internal flash partitions, toggling switchdev modes, and capturing hardware crash dumps. If you manage high-performance Linux servers, you may also find our guides on managing multipath routing objects with ip nexthop and inspecting kernel cryptographic ciphers via /proc/crypto valuable.
Verifying devlink Availability on Your System
Because devlink is bundled directly with iproute2, it is preinstalled on nearly all modern Linux distributions (such as Ubuntu, Debian, Rocky Linux, and RHEL). Verify that the command is available by querying your system:
# Check devlink installation
devlink help
# List all physical network devices registered with the kernel devlink driver
devlink dev show
The command lists registered hardware handles following the format bus/device (for example, pci/0000:01:00.0 or pci/0000:03:00.0). All subsequent devlink subcommands reference this physical hardware handle.
Querying Hardware Info and Firmware Versions
One of the primary use cases for devlink is auditing hardware identifiers, serial numbers, and running firmware revisions without querying PCI registers manually:
# Query hardware and firmware metadata for a specific PCI device
devlink dev info pci/0000:01:00.0
The resulting output exposes structured hardware information:
- driver: The responsible kernel module (such as
mlx5_core,ice, orbnxt_en). - serial_number: The physical hardware serial number burned into the NIC.
- versions: Displays three tiers of firmware versions:
fixed:Factory-set hardware revisions (e.g., board ID, ASIC stepping).running:Currently executing firmware, management controller (BMC), and UEFI driver versions.stored:Firmware images written to non-volatile flash awaiting the next system reboot.
Inspecting and Modifying Device Parameters (devlink param)
Network chipsets expose configurable hardware parameters that dictate operational behaviour before interfaces are brought online. You can view and modify these parameters using devlink dev param:
# Display all available hardware parameters for the device
devlink dev param show pci/0000:01:00.0
# Set a parameter (such as enabling internal loopback or Flow Steering)
sudo devlink dev param set pci/0000:01:00.0 name enable_roce value false cmode runtime
The cmode (configuration mode) flag specifies when the setting takes effect:
runtime:Applies immediately to the running hardware without disruption.driverinit:Persists in kernel memory and applies upon the next driver reload.permanent:Written directly to the NIC’s non-volatile NVRAM.
Auditing Hardware Health and Diagnostic Reporters
Modern enterprise NICs continuously monitor internal temperature, PCIe bus error counters, firmware stalls, and TX/RX buffer states. When an anomaly occurs, devlink health reporters capture hardware diagnostic dumps:
# List active health reporters on the device
devlink health show pci/0000:01:00.0
# Inspect diagnostic status for a specific reporter (e.g., PCIe or FW)
devlink health diagnose pci/0000:01:00.0 reporter fw
# Recover a faulted device reporter
sudo devlink health recover pci/0000:01:00.0 reporter fw
If a hardware fault triggers a crash dump, administrators can dump the captured binary state directly to a file using devlink health dump show for vendor hardware analysis.
Configuring Physical Switch Ports (devlink port)
On SmartNICs and multi-port Ethernet controllers, devlink port manages physical port splitting (breakout cables) and switchdev offload mode:
# List physical ports and their associated netdevice mappings
devlink port show
# Split a 100GbE physical port into two 50GbE interfaces
sudo devlink port split pci/0000:01:00.0/1 count 2
By leveraging devlink, Linux network administrators gain uncompromised, low-level operational control over high-speed hardware infrastructure directly from the command line.