MSTLINK(1)
π
MSTLINK β the mstlink girlies' guide (section 1, User Commands)
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 - DefaultPRBS31).--tx_prbs<tx_prbs_mode> β TX PRBS Mode[PRBS31(Default)/PRBS7/...](Optional - DefaultPRBS31).--rx_rate<rx_lane_rate> β RX Lane Rate[EDR(Default)/25G/10G/...](Optional - Default25G).--tx_rate<tx_lane_rate> β TX Lane Rate[EDR(Default)/25G/10G/...](Optional - Default25G).-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_rateasEDR(Default)while the parenthetical says Default25G. 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 π
mstflint(1)β the sibling. go say hi. π
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
- centos-stream 10: mstflint 4.37.0_1.1-2.el10 Β· (GPL-2.0-only OR Linux-OpenIB) AND BSD-3-Clause AND MIT AND blessing
- fedora 43: mstflint 4.37.0_1.1-2.fc43 Β· (GPL-2.0-only OR Linux-OpenIB) AND BSD-3-Clause AND MIT AND blessing
- fedora 44: mstflint 4.37.0_1.1-2.fc44 Β· (GPL-2.0-only OR Linux-OpenIB) AND BSD-3-Clause AND MIT AND blessing
- nixpkgs unstable: mstflint 4.37.0-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms