ConnectX®-3/ConnectX®-3 Pro/ConnectX®-4 ports can be individually configured to work as InfiniBand or Ethernet ports. By default both ConnectX®-5 VPI ports are initialized as InfiniBand ports. If you wish to change the port type use the mstconfig after the driver is loaded.
Install mstflint tools.
apt install mstflint
Check the device’s PCI address.
lspci | grep Mellanox Example:
00
:06.0
Infiniband controller: Mellanox Technologies MT27520 Family [ConnectX-3
Pro]Use mstconfig to change the link type as desired IB – for InfiniBand, ETH – for Ethernet.
mstconfig –d <device pci> s LINK_TYPE_P1/
2
=<ETH|IB|VPI>Example:
# mstconfig -d
00
:06.0
s LINK_TYPE_P1=ETH Device #1
: ---------- Device type: ConnectX3Pro PCI device:00
:06.0
Configurations: Current New LINK_TYPE_P1 IB(1
) ETH(2
) Applynew
Configuration? ? (y/n) [n] : y Applying... Done! -I- Please reboot machine to loadnew
configurations.Reboot your machine.
Query the device’s parameters to validate the new configuration.
# mstconfig -d
00
:06.0
q Device #1
: ---------- Device type: ConnectX3Pro PCI device: 0a:00.0
Configurations: Current SRIOV_EN True(1
) NUM_OF_VFS8
LINK_TYPE_P1 ETH(2
) LINK_TYPE_P2 IB(1
) LOG_BAR_SIZE3
BOOT_PKEY_P10
BOOT_PKEY_P20
BOOT_OPTION_ROM_EN_P1 True(1
) BOOT_VLAN_EN_P1 False(0
) BOOT_RETRY_CNT_P10
LEGACY_BOOT_PROTOCOL_P1 PXE(1
) BOOT_VLAN_P11
BOOT_OPTION_ROM_EN_P2 True(1
) BOOT_VLAN_EN_P2 False(0
) BOOT_RETRY_CNT_P20
LEGACY_BOOT_PROTOCOL_P2 PXE(1
) BOOT_VLAN_P21
IP_VER_P1 IPv4(0
) IP_VER_P2 IPv4(0
)