image image image image image

On This Page

Using mlxconfig to Set VPI Parameters

In order to set VPI parameters through mlxconfig, use the following command line:

# mlxconfig -d <device> set [LINK_TYPE_P1=<link_type>] [LINK_TYPE_P2=<link_type>]

Example: Configuring both ports as InfiniBand:

# mlxconfig -d /dev/mst/mt4103_pci_cr0 set LINK_TYPE_P1=1 LINK_TYPE_P2=1

Device #1:
----------
Device type:   ConnectX3Pro
PCI device:    /dev/mst/mt4103_pci_cr0
Configurations:        Next Boot        New
  LINK_TYPE_P1         ETH(2)           IB(1)
  LINK_TYPE_P2         ETH(2)           IB(1)

Apply new Configuration? ? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

Using mlxconfig to Set SR-IOV Parameters

In order to set SR-IOV parameters through mlxconfig, use the following command line:

# mlxconfig -d <device> set [SRIOV_EN=<0|1>] [NUM_OF_VFS=<NUM>]

Example: Turning on SR-IOV and enabling 8 Virtual Functions per Physical Function:

# mlxconfig -d /dev/mst/mt4115_pciconf0 set SRIOV_EN=1 NUM_OF_VFS=8

Device #1:
----------
Device type:    ConnectX4
PCI device:     /dev/mst/mt4115_pciconf0
Configurations:     Next Boot      New
  SRIOV_EN          0              1
  NUM_OF_VFS        0              8

Apply new Configuration? ? (y/n) [n] : y Applying... Done!
-I- Please reboot machine to load new configurations.

Using mlxconfig to Set Preboot Settings

For a full description of the preboot configurable parameters refer to Supported Configurations and their Parameters under "Preboot Settings".

Example: Enable boot option ROM on port 1, set boot retries to 3 and set the boot protocol to PXE.

# mlxconfig -d /dev/mst/mt4103_pciconf0 set BOOT_OPTION_ROM_EN_P1=1 BOOT_RETRY_CNT_P1=3 LEGACY_BOOT_PROTOCOL_P1=1

Device #1:
----------
Device type:   ConnectX3Pro
PCI device:    /dev/mst/mt4103_pciconf0
Configurations:             Next Boot     New
  BOOT_OPTION_ROM_EN_P1     False(0)      True(1)
  BOOT_RETRY_CNT_P1         0             3
  LEGACY_BOOT_PROTOCOL_P1   2             1

Apply new Configuration? ? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

Example: Configure VLAN ID to 3 on port 2

# mlxconfig -d /dev/mst/mt4103_pciconf0 set BOOT_VLAN_P2=3

Device #1:
----------
Device type: ConnectX3Pro
PCI device: /dev/mst/mt4103_pciconf0
Configurations:     Next Boot    New
  BOOT_VLAN_P2      1            3

Apply new Configuration? ? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

Using mlxconfig to Split a Port in a Remotely Managed Switch

The break-out cable is a unique Mellanox capability, where a single physical quad-lane QSFP port is divided into 2 dual-lane ports. It maximizes the flexibility of the end user to use the Mellanox switch with a combination of dual-lane and quad-lane interfaces according to the specific requirements of its network. All system ports may be split into 2-lane ports. Splitting a port changes the notation of that port from x/y to x/y/z with “x/y” indicating the previous notation of the port prior to the split and “z” indicating the number of the resulting sub-physical port (1,2). Each sub-physical port is then handled as an individual port. For example, splitting port 5 into 2 lanes gives the following new ports: 1/5/1 & 1/5/2.

Break-Out Cable

To enable the port split, the following actions are required:

Step 1. Set the Split Mode in a Remotely Managed Switch.

# mlxconfig -d <device>set SPLIT_MODE=1#

Example:

1# mlxconfig -d /dev/mst/mt54000_pciconf0 set SPLIT_MODE=1

Device #1:
----------
Device type:     Quantum
Name:            N/A
Description:     N/A
Device:          /dev/mst/mt54000_pciconf0
Configurations:    Next Boot                 New
  SPLIT_MODE       NO_SPLIT_SUPPORT(0)       SPLIT_2X(1)

To create a query for the Split Mode parameter using mlxconfig:

# mlxconfig -d <device> q SPLIT_MODE

Example:

# mlxconfig -d /dev/mst/mt54000_pciconf0 q SPLIT_MODE

Device #1:
----------
Device type:    Quantum
Name:           N/A
Description:    N/A
Device:         /dev/mst/mt54000_pciconf0
Configurations:   Next Boot
SPLIT_MODE        SPLIT_2X(1)

Step 2. Split a Port in a Remotely Managed Switch.

  • To split a specific port for one or more ports of the lower ports (1-32) using mlxconfig:

    # mlxconfig -d <device> set SPLIT_PORT_32_1[<port_num>/<port_range>]=1
  • To split a specific port for one or more ports of the higher ports (33-40) using mlxconfig:

    # mlxconfig -d <device> set SPLIT_PORT_64_33[<port_num>/<port_range>]=1

    Please note that although the command, is “set SPLIT_PORT_64_33”, it splits a specific port for one or more ports of the higher ports (33-40).

    Please note that the first port is set as 0, e.g., [0], [0..31].

  • How to turn on the split port for the first port only:

    mlxconfig -d /dev/mst/SW_MT54000_EVB-SX-1_L00_lid-0x0001 set SPLIT_PORT_32_1[0]=1
  • How to turn on the split port for the first 32 ports (range of ports):

    mlxconfig -d /dev/mst/SW_MT54000_EVB-SX-1_L00_lid-0x0001 set SPLIT_PORT_32_1[0..31]=1
  • How to turn on the split port for the last 8 ports:

    mlxconfig -d /dev/mst/SW_MT54000_EVB-SX-1_L00_lid-0x0001 set SPLIT_PORT_64_33 [0..7]=1
  • How to turn off the split port for port 40:

    mlxconfig -d /dev/mst/SW_MT54000_EVB-SX-1_L00_lid-0x0001 set SPLIT_PORT_64_33 [7]=0
  • How to query the split port for the first 32 ports:

    mlxconfig -d /dev/mst/SW_MT54000_EVB-SX-1_L00_lid-0x0001 query SPLIT_PORT_32_1[0..31]
  • To create a query for the split port parameter for one or more ports of the lower ports (1-32) using mlxconfig:

    # mlxconfig -d <device> query SPLIT_PORT_32_1 [<port_num>/<port_range>]
  • To create a query for the split port for one or more ports of the higher ports (33-40) using mlxconfig:

    # mlxconfig -d <device> query SPLIT_PORT_64_33 [<port_num>/<port_range>]

Step 3. Reboot the switch.


To disable the port split, the following actions are required:

Step 1. Disable the Split Ports in a Remotely Managed Switch:

  • To unsplit a specific port for one or more ports of the lower ports (1-32) using mlxconfig:

    # mlxconfig -d <device> set SPLIT_PORT_32_1[<port_num>/<port_range>]=0
  • To unsplit a specific port for one or more ports of the higher ports (33-40) using mlxconfig:

    # mlxconfig -d <device> set SPLIT_PORT_64_33[<port_num>/<port_range>]=0

Step 2. Disable the Split Mode in a Remotely Managed Switch.

# mlxconfig -d <device> set SPLIT_MODE=0