image image image image image

On This Page

This script is used to start mst service and to stop it. It is also used in other operations with NVIDIA devices, such as in resetting or enabling remote access.

mst Synopsis - Linux

mst <command> [switches]  

mst Commands and Switches Description - Linux 

mst start [--with_msix] [-- with_unknown] [--with_i2cdev] [-- with_lpcdev] [--with_fpga] [-- with_fpga_fw_access

Create special files that represent NVIDIA devices in directory /dev/mst. Load appropriate kernel modules and saves PCI configuration headers in directory /var/mst_pci. After successfully completion of this command the MST driver is ready to work. You can configure the start command by editing the configuration file: /etc/mft/mst.conf, for example you can rename you devices. 

Options:

  • --with_msix: Create the msix device.
  • --with_unknown: Do not check if the device ID is supported.
  • --with_i2cdev: Create Embedded I2C master
  • --with_fpga: Create MST device for the attached FPGA card (Access via Driver)
  • --with_fpga_fw_access: Create an extended MST device for the attached FPGA (Access via Firmware)

mst stop [--force]

Stop the MST driver service, remove all special files/ directories and unload kernel modules.

Options:

  • --force: Force try to stop mst driver even if it's in use.

mst restart [--with_msix] [-- with_unknown] [--with_i2cdev] [--with_lpcdev] [--with_fpga] [--with_fpga_fw_access]

Just like "mst stop" followed by "mst start [--with_msix] [--with_unknown] [--with_i2cdev] [--with_lpcdev] [-- with_fpga] [--with_fpga_fw_access]"

mst server start [port]

Start mst server to allow incoming connection. Default port is 23108

mst server stop

Stop mst server.

mst remote add <hostname>[:port]

Establish connection with specified host on specified port (default port is 23108). Add devices on remote peer to local devices list. <hostname> may be host name as well as an IP address.

mst remote del <hostname>[:port]

Remove all remote devices on specified hostname.

<hostname>[:port] should be specified exactly as in the "mst remote add" command.

mst ib add [OPTIONS] [local_hca_id] [local_hca_port]

Add devices found in the IB fabric for inband access. Requires OFED installation and an active IB link.

If local_hca_id and local_hca_port are given, the IB subnet connected

to the given port is scanned. Otherwise, the default subnet is scanned.

Options:

  • --discover-tool <discover-tool>: The tool that is used to discover the fabric.

Supported tools: ibnetdiscover, ibdiagnet. default: ibdiagnet

  • --add-non-mlnx: Add non NVIDIA nodes.
  • --topo-file <topology-file>: A prepared topology file which describes the fabric. For ibnetdiscover: provide an output of the tool. For ibdiagnet: provide LST file that ibdiagnet generates.
  • --use-ibdr: Access by direct route MADs. Available only when using ibnetdiscover tool, for SwitchX and ConnectIB devices.

NOTE: If a topology file is specified, device are taken from it. Otherwise, a discover tool is run to discover the fabric.

mst ib delRemove all inband devices.
mst cable add [OPTIONS] [params]

Add the cables that are connected to 5th generation devices.

There is an option to add the cables found in the IB fabric for Cable Info access, requires WinOF-2 installation and active IB links. If local_hca_id and local_hca_port are given, the IB subnet connected to the given port is scanned. Otherwise, all the devices will be scanned.

Options:

--with_ib: Add the inband cables in addition to the local PCI devices.

params: [local_hca_id] [local_hca_port]

mst cable delRemove all cable devices.
mst status

Print current status of NVIDIA devices

Options:

  • -v run with high verbosity level (print more info on each device)
mst saveSave PCI configuration headers in directory /var/mst_pci.
mst loadLoad PCI configuration headers from directory /var/mst_pci.
mst versionPrint the version info

Using mst.conf File in Linux

Edit the /etc/mft/mst.conf configuration file to configure the start operation in Linux (only).

The configuration file consists of lines of rules. Every line will be a rule for mst start. It must be valid, and the rules should be unique. There should also be no duplication of new names and/or serials.

The rule general format is the following:

$OPCODE $PARAMS

mst start Supported OPCODES 

OPCODEDefinitionDescription

RENAME

renames mst devices

  • Rule format: RENAME $TYPE $NEW_NAME $ID
  • Supported types: # MTUSB (where $ID is the iSerial)
  • Example: RENAME USB my 0x2A4C. 
  • Effect: MTUSB with serial 0x2A4C will be renamed to /dev/mst/mymtusb-1 (always mtusb-1 will be concatenated to the new name).

Examples of mst Usage - Linux

To start the mst driver service:

# mst start
Starting MST (Mellanox Software Tools) driver set
Loading MST PCI module - Success
Loading MST PCI configuration module - Success
Create devices
MTUSB-1 USB to I2C Bridge - Success

To stop the service:

Success# mst stop
Stopping MST (Mellanox Software Tools) driver set
Unloading MST PCI module - Success

To print the current status of NVIDIA devices:

Success# mst status
MST modules:
------------
   MST PCI module loaded
   MST PCI configuration module loaded

MST devices:
------------
/dev/mst/mt4099_pciconf0             - PCI configuration cycles access.
                                       domain:bus:dev.fn=0000:0b:00.0 addr.reg=88 data.reg=92
                                       Chip revision is: 01
/dev/mst/mt4099_pci_cr0              - PCI direct access.
                                       domain:bus:dev.fn=0000:0b:00.0 bar=0xd2600000 size=0x100000
                                       Chip revision is: 01
/dev/mst/mtusb-1                     - USB to I2C adapter as I2C master
                                       iSerial = 0x1683

To show the devices status with detailed information

# mst status -v
PCI devices:
DEVICE_TYPE        MST                           PCI        RDMA      NET        NUMA
ConnectX4(rev:0)   /dev/mst/mt4115_pciconf0      08:00.0    mlx5_0    net-ib2    -1
ConnectX4(rev:0)   /dev/mst/mt4115_pciconf0.1    08:00.1    mlx5_1    net-ib3    -1
ConnectIB(rev:0)   /dev/mst/mt4113_pciconf0      0b:00.0    mlx5_2    net-ib4, 
                                                                      net-ib5    -1
ConnectX3(rev:1)   /dev/mst/mt4099_pciconf0      
ConnectX3(rev:1)   /dev/mst/mt4099_pci_cr0       0e:00.0    mlx4_0    net-ib0, 
                                                                      net-ib1    -1
I2C devices:
-------------------
MST                Serial
/dev/mst/mtusb-1   0x1B5C

In case the device has Function Per Port (FPP) enabled on it, a new device will appear in the `mst status -v` output with information about the second physical function. Example:

DEVICE_TYPE        MST                           PCI        RDMA      NET        NUMA
ConnectX4(rev:0)   /dev/mst/mt4115_pciconf0      07:00.0    mlx5_4    net-ib4    -1
ConnectX4(rev:0)   /dev/mst/mt4115_pciconf0.1    07:00.1    mlx5_5    net-ib5    -1