Using mstconfig
Example:
# mstconfig -d 41
:00.0
Device 1
:
----------
Device type: ConnectX-3
PCI Device: 41
:00.0
Configurations: Next Boot
SRIOV_EN True(1
)
NUM_OF_VFS 16
WOL_MAGIC_EN_P1 False(0
)
WOL_MAGIC_EN_P2 False(0
)
In order to set VPI parameters through mstconfig, use the following command line:
# mstconfig -d <device> set [LINK_TYPE_P1=<link_type>] [LINK_TYPE_P2=<link_type>]
Example: Configuring both ports as InfiniBand:
# mstconfig 41
:00.0
set LINK_TYPE_P1=1
LINK_TYPE_P2=1
Device #1
:
----------
Device type: ConnectX3Pro
PCI device: 41
:00.0
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.
In order to set SR-IOV parameters through mstconfig, use the following command line:
# mstconfig -d <device> set [SRIOV_EN=<0
|1
>] [NUM_OF_VFS=<NUM>]
Example: Turning on SR-IOV and enabling 8 Virtual Functions per Physical Function:
# mstconfig -d 41
:00.0
set SRIOV_EN=1
NUM_OF_VFS=8
Device #1
:
----------
Device type: ConnectX4
PCI device: 41
:00.0
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.
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.
# mstconfig -d 41
:00.0
set BOOT_OPTION_ROM_EN_P1=1
BOOT_RETRY_CNT_P1=3
LEGACY_BOOT_PROTOCOL_P1=1
Device #1
:
----------
Device type: ConnectX3Pro
PCI device: 41
:00.0
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
# mstconfig -d 41
:00.0
set BOOT_VLAN_P2=3
Device #1
:
----------
Device type: ConnectX3Pro
PCI device: 41
:00.0
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.
mstconfig allows applying raw configuration file for a pre-set configuration. Raw configuration files are intended for advanced users. This document does not cover the generation of such files.
Set the raw configuration file:
# mstconfig -f ./tlv_file.conf -d 41
:00.0
set_raw
Raw TLV #1
Info:
Length: 0xc
Version: 0
OverrideEn: 1
Type: 0x00000080
Data: 0xa0000000
0xa0020010
0x00000000
Raw TLV #2
Info:
Length: 0x4
Version: 0
OverrideEn: 1
Type: 0x01020012
Data: 0x0000000b
Raw TLV #3
Info:
Length: 0x8
Version: 0
OverrideEn: 1
Type: 0x00000190
Data: 0x00000010
0x00007d00
Raw TLV #4
Info:
Length: 0x4
Version: 0
OverrideEn: 1
Type: 0x00000082
Data: 0x0000000c
Operation intended for
advanced users.
Are you sure you want to apply raw TLV file? ? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new
configurations.
Never apply files from an unreliable source.