MSTLINK(1)

okay bestie, sit down, hydrate, because we're doing link debugging and we're doing it right. This is the manual for mstlink, a user command, and it's giving main character energy from the very first line.


✨ NAME ✨

mstlink β€” check and debug link status and issues related to them πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

mstlink [OPTIONS]

that's it. that's the whole vibe. options go in, diagnostics come out. πŸŽ€


🌸 DESCRIPTION 🌸

So, the mlxlink tool β€” yes, mlxlink, the page says mlxlink, we're quoting it, no notes β€” is used to check and debug link status and issues related to them. That's the whole job. πŸ”₯

And it's not picky about which link, bestie. The tool can be used on different links and cables, including:

  • passive cables
  • active cables
  • transceiver
  • backplane

so basically whatever cable situation you've got going on, it's got you. πŸ’œ


🌈 OPTIONS 🌈

general flags first, then the queries, then the commands. we do not skip. we do not summarise. we are thorough in this house. πŸ‘‘

  • -h, --help β€” Display help message. (the "hello, what is this" button 🫢)
  • -v, --version β€” Display version info.
  • -d, --device <device> β€” Perform operation for a specified mst device.
  • -p, --port <port_number_or_list> β€” Port Number, or a comma-separated list of ports (e.g. 1,2,3). Heads up though: a list is currently supported only with -a/--port_state. πŸ’€
  • --port_type <port_type> β€” Port Type [NETWORK(Default)/PCIE]. default is NETWORK, iykyk.
  • --depth <depth> β€” depth level of the DUT of some hierarchy (PCIE only).
  • --pcie_index <pcie_index> β€” PCIe index number (Internal domain index) (PCIE only).
  • --node <node> β€” the node within each depth (PCIE only).
  • --json β€” Print the output in json format. for the girlies who pipe things into other things. ✨

🧚 QUERIES (aka the "just tell me things" era)

  • --show_links β€” Show valid PCIe links (PCIE only).
  • -m, --show_module β€” Show Module Info. And ooh, plot twist: when combined with --cable, shows the module pre-coding info (Host/Line Tx/Rx operational status). obsessed.
  • -c, --show_counters β€” Show Physical Counters and BER Info.
  • -e, --show_eye β€” Show Eye Opening Info. πŸ‘οΈ (pun intended, no I will not apologise)
  • --show_fec β€” Show FEC Capabilities.
  • --show_serdes_tx β€” Show Transmitter Info.
  • --show_device β€” General Device Info.
  • --show_ber_monitor β€” Show BER Monitor Info β€” but not supported for HCA, so don't come for me if your HCA says no. πŸ™ˆ
  • --show_external_phy β€” Show External PHY Info.

πŸ’… COMMANDS (aka the "okay now change things" era)

  • -a, --port_state <port_state> β€” Configure Port State [UP(up)/DN(down)/TG(toggle)].
  • -s, --speeds <speeds> β€” Configure Speeds [speed1,speed2,...].
  • --link_mode_force β€” Configure Link Mode Force (Disable AN).
  • -l, --loopback <loopback> β€” Configure Loopback Mode [NO(no loopback)/PH(phy loopback)/EX(external loopback)].
  • -k, --fec <fec_override> β€” Configure FEC [AU(Auto)/NF(No-FEC)/FC(FireCode FEC)/RS(RS-FEC)].
  • --fec_speed <fec_speed> β€” Speed to Configure FEC [100G/50G/25G/...] (Default is Active Speed).
  • --serdes_tx <params> β€” Configure Transmitter Parameters [polarity,ob_tap0,...].
  • --serdes_tx_lane <transmitter_lane> β€” Transmitter Lane to Set (Optional - Default All Lanes).
  • --database β€” Save Transmitter Configuration for Current Speed Permanently (Optional).
  • --test_mode <prbs_mode> β€” Physical Test Mode Configuration [EN(enable)/DS(disable)/TU(perform tuning)].
  • --rx_prbs <rx_prbs_mode> β€” RX PRBS Mode [PRBS31(Default)/PRBS7/...] (Optional - Default PRBS31).
  • --tx_prbs <tx_prbs_mode> β€” TX PRBS Mode [PRBS31(Default)/PRBS7/...] (Optional - Default PRBS31).
  • --rx_rate <rx_lane_rate> β€” RX Lane Rate [EDR(Default)/25G/10G/...] (Optional - Default 25G).
  • --tx_rate <tx_lane_rate> β€” TX Lane Rate [EDR(Default)/25G/10G/...] (Optional - Default 25G).
  • -b, --ber_collect <csv_file> β€” Port Extended Information Collection [CSV File].
  • --ber_limit <limit_criteria> β€” BER Limit Criteria [Nominal(Default)/Corner/Drift] (Optional - Default Nominal).
  • --iteration <iteration> β€” Iteration Number of BER Collection.
  • --pc β€” Clear Counters.
  • --set_external_phy β€” Set External PHY β€” not supported for HCA, again, don't @ me. 🫢
  • --twisted_pair_force_mode <twisted_pair_force_mode> β€” Twisted Pair Force Mode [MA(Master)/SL(Slave)].
Also yes, the page literally lists the default for --rx_rate as EDR(Default) while the parenthetical says Default 25G. We are copying that verbatim because the rule is we keep every single detail, no cap. 😭

⭐ EXAMPLES ⭐

this is the part where it gets real. copy these, they're cute.

get info of <device>, <port_number>:

mstlink -d <device> -p <port_number>

get info of <device>, <port_number> and BER Counters:

mstlink -d <device> -p <port_number> -c

get info of <device>, <port_number> and Transmitter Parameters:

mstlink -d <device> -p <port_number> --show_serdes_tx

Configure Port State:

mstlink -d <device> -p <port_number> --port_state UP

mstlink -d <device> -p 1,2,3 --port_state DN

(see? the comma list, and see? it's with --port_state. told you. πŸ’…)

Configure Port Speeds:

mstlink -d <device> -p <port_number> --speeds 25G,50G,100G

Configure FEC:

mstlink -d <device> -p <port_number> --fec RS

Configure Port for Physical Test Mode:

mstlink -d <device> -p <port_number> --test_mode EN (--rx_prbs PRBS31 --rx_rate 25G --tx_prbs PRBS7 --tx_rate 10G)

Perform PRBS Tuning:

mstlink -d <device> -p <port_number> --test_mode TU

Configure Transmitter Parameters (on lane, to database):

mstlink -d <device> -p <port_number> (--serdes_tx_lane <lane number>) (--database) \
  --serdes_tx <polarity>,<ob_tap0>,<ob_tap1>,<ob_tap2>,<ob_bias>,<ob_preemp_mode>

PCIe queries (supported on HCA, CPU and Switches that advertise PCIe management):

List valid PCIe links:

mstlink -d <device> --port_type PCIE --show_links

Show PCIe operational info for a specific link:

mstlink -d <device> --port_type PCIE --depth <d> --pcie_index <i> --node <n>

Show PCIe BER/MPCNT counters:

mstlink -d <device> --port_type PCIE -c

Collect amBER for PCIe links:

mstlink -d <device> --port_type PCIE --amber_collect <file.csv>
Note: --pcie_error_injection is supported on HCA devices only. πŸŽ€

(and yes, --amber_collect up there is exactly what the page says. keeping it character for character, bestie, that's the assignment. 🫢)


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, bestie. every flag, every default, every bracket, every (PCIE only), all of it, preserved like a pressed flower. 🌸

this page comes from mstflint, dated March 2020. slay, periodt, go debug your links. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from