-
Notifications
You must be signed in to change notification settings - Fork 39
Updating Firmware
Firmware flashing is supported from within the mlxsw
driver ever
since kernel version 4.13 and firmware version 13.1420.122
. The supported
firmware version is packaged in the linux-firmware
package, relieving
users from the need to flash the firmware themselves and synchronize
the kernel and firmware versions.
The linux-firmware
package is based on the linux-firmware
repository and contains the kernel-required firmware binaries, which can
be found under the /lib/firmware/mellanox
directory in most
distributions given the linux-firmware
package is sufficiently up to
date.
To check the current firmware version, run:
$ ethtool -i <DEV>
Where DEV
is any switch port interface.
Upon driver initialization, the current firmware version used by the device is validated against the specific version supported by the driver. If the current version is different, the driver flashes its own firmware version.
Note that in-driver firmware flashing requires both the firmware and the kernel to be in a sufficiently up-to-date version, and if either the kernel or firmware versions are older than 4.13 or 13.1420.122 respectively, then in-driver firmware flashing fails.
Note: In-driver firmware flashing is performed using *.mfa2
files,
whereas flashing using external tools (described below) is performed
using *.mfa
files.
The ability to flash an ad hoc firmware version is mostly to be used when a firmware version is used for debugging and testing purposes. The driver is instructed not to flash the bundled firmware in this case. In order to use that firmware version permanently, it should bundled with a new mlxsw driver. In rare cases it is possible to keep this ad hoc firmware version in production, but it requires some modification. See the example below.
This option is supported from kernel 4.20 and corresponding iproute2
version.
Example:
- Query the devlink parameters supported by the device
$ devlink dev param show
pci/0000:03:00.0:
name fw_load_policy type generic
values:
cmode driverinit value driver
-
Flash new firmware using
ethtool
Where the ad hoc firmware file is a relative path to the
/lib/firmware
directory.
$ ethtool -f enp3s0np1 mellanox/mlxsw_spectrum-13.1703.4.mfa2
- Toggle parameter
$ devlink dev param set pci/0000:03:00.0 name fw_load_policy value flash cmode driverinit
- Driver reload via devlink
$ devlink dev reload pci/0000:03:00.0
- Query firmware version to validate correct firmware version is used
$ ethtool -i enp3s0np1
driver: mlxsw_spectrum
version: 1.0
firmware-version: 13.1703.4
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
As long as the firmware version is not bundled with the mlxsw driver, all the above steps should be done after each reboot.
If it is not possible to use in-driver firmware flashing, mstflint
software package should be used instead. The latest version of mstflint
is available here. In Fedora it can be installed using dnf
:
$ dnf install mstflint
mstflint capable firmware is packed in a tarball together with the
installation files, as an *.mfa
file. In addition, firmware files
are available separately here.
4.12+ kernel installations should use firmware matching the requirements of the
kernel as listed in its release notes; Earlier versions should use
firmware version 13.1302.120
.
To update the firmware, the utility mstfwmanager
from the mstflint
package should be used. Run:
$ mstfwmanager -d 01:00.0 -i mlxsw_spectrum-13.2000.2308.mfa -f -u
Where mlxsw_spectrum-13.2000.2308.mfa
is the firmware file described
in the previous section and 01:00.0
is the PCI address of the device.
Note: Changes take effect following reboot.
- man mstfwmanager
General information
System Maintenance
Network Interface Configuration
- Switch Port Configuration
- Netdevice Statistics
- Persistent Configuration
- Quality of Service
- Queues Management
- How To Configure Lossless RoCE
- Port Mirroring
- ACLs
- OVS
- Resource Management
- Precision Time Protocol (PTP)
Layer 2
Network Virtualization
Layer 3
- Static Routing
- Virtual Routing and Forwarding (VRF)
- Tunneling
- Multicast Routing
- Virtual Router Redundancy Protocol (VRRP)
Debugging