Port Type Management
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.0Infiniband controller: Mellanox Technologies MT27520 Family [ConnectX-3Pro]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.0s LINK_TYPE_P1=ETH Device #1: ---------- Device type: ConnectX3Pro PCI device:00:06.0Configurations: Current New LINK_TYPE_P1 IB(1) ETH(2) ApplynewConfiguration? ? (y/n) [n] : y Applying... Done! -I- Please reboot machine to loadnewconfigurations.Reboot your machine.
Query the device’s parameters to validate the new configuration.
# mstconfig -d
00:06.0q Device #1: ---------- Device type: ConnectX3Pro PCI device: 0a:00.0Configurations: Current SRIOV_EN True(1) NUM_OF_VFS8LINK_TYPE_P1 ETH(2) LINK_TYPE_P2 IB(1) LOG_BAR_SIZE3BOOT_PKEY_P10BOOT_PKEY_P20BOOT_OPTION_ROM_EN_P1 True(1) BOOT_VLAN_EN_P1 False(0) BOOT_RETRY_CNT_P10LEGACY_BOOT_PROTOCOL_P1 PXE(1) BOOT_VLAN_P11BOOT_OPTION_ROM_EN_P2 True(1) BOOT_VLAN_EN_P2 False(0) BOOT_RETRY_CNT_P20LEGACY_BOOT_PROTOCOL_P2 PXE(1) BOOT_VLAN_P21IP_VER_P1 IPv4(0) IP_VER_P2 IPv4(0)