mlx5io(4)
π mlx5io β the ioctl interface for Connect-X 4/5/6 Mellanox NICs π
okay bestie, welcome to the Kernel Interfaces Manual page for mlx5io, aka the little doorway that lets you boss around your Connect-X 4, 5 and 6 Mellanox network adapters when the normal network config just isn't enough. π
β¨ NAME β¨
mlx5io β the IOCTL interface to manage Connect-X 4/5/6 Mellanox network adapters π¦
β¨ SYNOPSIS β¨
#include <dev/mlx5/mlx5io.h>
β¨ DESCRIPTION β¨
so like, the mlx5io interface exists so you can manage the Connect-X4, 5 and 6 network adapters in the areas that the generic network configuration literally does not cover β mostly stuff about the PCIe attachment and the internal working of the card. π
The interface is made up of commands, and you pass them with ioctl(2) on a file descriptor that you opened from the /dev/mlx5ctl device node. iykyk. β¨
The following commands are implemented:
MLX5_FWDUMP_FORCEβ Takes the snapshot of the firmware registers state and stores it in the kernel buffer. π«Ά The buffer must be empty β meaning no dumps should have been written so far β or else the existing dump has to be cleared with theMLX5_FWDUMP_RESETcommand for the specified device. The argument for this command should point to thestruct mlx5_tool_addrstructure, which contains the PCIe bus address of the device.
struct mlx5_tool_addr {
uint32_t domain;
uint8_t bus;
uint8_t slot;
uint8_t func;
};
MLX5_FWDUMP_RESETβ Clears the stored firmware dump, getting the kernel buffer all ready and cute for the next dump. πΈ The argument for the command should point to thestruct mlx5_tool_addrstructure, which contains the PCIe bus address of the device.MLX5_FWDUMP_GETβ Fetches the stored firmware dump into the user memory. The argument to the command should point to the input/outputstruct mlx5_fwdump_getstructure. Itsdevaddrfield specifies the address of the device, thebuffield points to the array ofstruct mlx5_fwdump_regrecords of the register values, and the size of that array is specified in thereg_cntfield. π
struct mlx5_fwdump_get {
struct mlx5_tool_addr devaddr;
struct mlx5_fwdump_reg *buf;
size_t reg_cnt;
size_t reg_filled; /* out */
};
On successful return, the reg_filled field reports the number of buf array elements that were actually filled with the register values. If buf contains the NULL pointer, no registers get filled, but reg_filled still contains the number of registers that should be passed for the complete dump. no cap. π
The struct mlx5_fwdump_reg element contains the address of the register in the addr field, and its value in the val field. π¦
struct mlx5_fwdump_reg {
uint32_t addr;
uint32_t val;
};
MLX5_FW_UPDATEβ Requests a firmware update (flash) on the adapter specified by thedevaddr, using the firmware image in MFA2 format. π₯ The argument for the ioctl command is thestruct mlx5_fw_update, which has the following definition:
struct mlx5_fw_update {
struct mlx5_tool_addr devaddr;
void *img_fw_data;
size_t img_fw_data_len;
};
The image address in memory is passed in img_fw_data, and the length of the image is specified in the img_fw_data_len field. β¨
MLX5_FW_RESETβ Requests a PCIe link-level reset on the device. β The address of the device is specified by thestruct mlx5_tool_addrstructure, which should be passed as an argument.MLX5_EEPROM_GETβ Fetches EEPROM information. π The argument to the command should point to the input/outputstruct mlx5_eeprom_getstructure, where thedevaddrfield specifies the address of the device.
struct mlx5_eeprom_get {
struct mlx5_tool_addr devaddr;
size_t eeprom_info_page_valid;
uint32_t *eeprom_info_buf;
size_t eeprom_info_out_len;
};
On successful return, the eeprom_info_out_len field reports the length of the EEPROM information. The eeprom_info_buf field contains the actual EEPROM information. The eeprom_info_page_valid field reports the third page validity. πΈ
β¨ FILES β¨
- The
/dev/mlx5ctldevfs(5)node is what you use to pass commands to the driver. that's the whole vibe. π
β¨ RETURN VALUES β¨
If it works, the IOCTL returns zero. β¨ If not, it returns -1 and the global variable errno is set to indicate the error. π
β¨ SEE ALSO β¨
errno(2), ioctl(2), mlx5en(4), mlx5ib(4), mlx5tool(8) and pci(9). go read those too bestie, they're iconic. ππ
okay that's the whole page!! π this one came from Debian, dated October 2, 2019 β yeah it's a lil vintage but it still ate. π mwah, go manage those adapters responsibly, ily. π«Άπ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2018, 2019 Mellanox Technologies
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms