Skip to content

Link surgery and PHY triage

S4·E4Send us a cable · Hotel lobby, 07:15 Thursday, forty minutes before the sign-off rehearsal

S4·E4Analyze~30 minsources checked todaylab mutates hardwareverified against MFT 4.30.0 mlxlink utility page (re-fetched 2026-09-07), rdma-core master ibportstate man page, IBUtils2 2.26.0 BER page and 2.24.0 phy plugin, NVOS link diagnostics v25.02.4002 and interface commands v25.02.7002, Dell KB 000221452

Builds on: Counters and errors that mean something, ibdiagnet: the command you run before escalating

Before you read: what do you already know?

3 quick questions. Wrong answers are fine and expected; trying first makes the lesson stick.

After this lesson you can

  • Distinguish an ibportstate operation that is safe on a production fabric from one that is not and say why.
  • Interpret a BER report: threshold, FEC mode and whether the device reports effective or symbol errors.
  • Read mlxlink module and counter output to separate the medium from the cage and the environment.
  • Order a flapping-link investigation so that swapping the cable is the last step and not the first.

Episode 4 — Send us a cable

The situation · Hotel lobby, 07:15 Thursday, forty minutes before the sign-off rehearsal

The ticket is one line: rack 4 leaf port 17 flapped six times last night, send us a cable. The operator has label-printed the port and, being thorough, the empty cable box. Procurement wants a part number and a lead time, and is for once right: this rack has eaten three cables this quarter with no change in behaviour. Sign-off is tomorrow.

You read the attachments instead of the request: an iblinkinfo -d output, an OpenSM log full of heavy sweeps, nothing from the PHY.

Physical-layer diagnostics exist because at these lane rates a link is never simply good or bad; it is a statistic. The bit error rate is “the number of bit errors per unit time divided by the total number of transferred bits during a studied time interval”, the default threshold is 10^-12, and the value the tooling prints is what survives after error correction.[2] Which errors are counted depends on the generation: EDR devices report effective errors while HDR and NDR devices report symbol errors.[2] On the switch side NVOS separates PHY firmware indications from firmware management issues such as temperature shutdown and power budget exceeded, which is the difference between a cable problem and a cage problem.[4] And those heavy sweeps are the subnet manager reacting to a link that keeps flapping, not the cause of it.[9]

A cable swap is a conclusion. Four in one quarter means nobody has reached one.

Forty minutes is enough to know which case you are in — starting with the one tool that can also make it worse.

1ibportstate: the sharpest tool in the box

ibportstate “allows the port state and port physical state of an IB port to be queried (in addition to link width and speed being validated relative to the peer port when the port queried is a switch port), or a switch port to be disabled, enabled, or reset.”[1] Its man page also contains the single most important safety sentence in InfiniBand operations: “InfiniBand HCA port state may be changed locally without the knowledge of the Subnet Manager.[1]

Read that as an operations rule. Nothing asks the SM for permission, nothing warns you, and the SM finds out the way it finds out about a cable pull — through a trap and a sweep.[1][9]

The supported operations are enable, disable, reset, speed, espeed, fdr10, width, query, on, off, down, arm, active, vls, mtu, lid, smlid, lmc, mkey, mkeylease, mkeyprot, and “(Default is query)”.[1] off “change the port state to disable” and on “change the port state to enable (only when the current state is disable)”.[1]

Three details separate a competent operator from a dangerous one.[1]

  • speed and width are allowed on any port”, with values checked against LinkSpeedSupported, and “NOTE: Speed and width changes are not effected until the port goes through link renegotiation”. A change that appears to do nothing has in fact been armed.[1]
  • query “also validates port characteristics (link width, speed, espeed, and fdr10) based on the peer port. This checking is done when the port queried is a switch port as it relies on combined routing… This peer port validation feature of query op requires LID routing to be functioning in the subnet.” So the peer validation you want is available on switch ports and needs a working SM.[1]
  • mkey, mkeylease, and mkeyprot are only allowed on CAs, routers, or switch port 0 (An error is generated if attempted on external switch ports).”[1]

Working invocations from the man page, worth copying exactly: ibportstate -C qib0 -P 1 3 1 disable, ibportstate -C qib0 -P 1 3 1 enable, ibportstate -D 0 1, ibportstate 3 1 reset, ibportstate 3 1 speed 1, ibportstate 3 1 width 1, ibportstate -D 0 1 lid 0x1234 arm.[1]

score 0 / 12
Symptom → command · 1 / 12

One host, 60 seconds: you need LID, SMLID, port state, link width active and physical state straight from the local IB driver — from a binary, not a shell script.

Symptom → command

A customer sentence. Pick the one tool that answers it.

Answer, then the panel gives the man-page wording, a working invocation, and where the evidence lands. Nothing here is trivia: every prompt is a sentence a customer has actually said.

NCP-AIN · Troubleshooting Tools (20%) names:
ib_write_latib_write_bwibpingibstatibdiagnetibnodesiblinkinfo
NCP-AIN exam page
Symptom round. Every prompt here has a read-only answer available; pick it before you consider anything that changes state.

2What a BER number means before you argue about it

“The Bit Error Rate (BER) is the number of bit errors per unit time divided by the total number of transferred bits during a studied time interval.”[2] Everything else about BER reporting is about which errors are counted and against what threshold.[2]

The generation split decides the vocabulary: EDR devices report “effective errors” while HDR and NDR devices report “symbol errors”, and in both cases these are “the actual errors seen at the application level after error correction”.[2] A customer comparing an EDR spine to an NDR leaf is comparing two different measurements and will conclude one of them is broken.[2]

The default threshold is 10^-12, expressed in the tooling as decimal 1000000000000 or hex 0xe8d4a51000, and “When threshold is set to 0, all BER values are reported regardless of magnitude.”[2] The FEC modes that appear alongside are STD-RS, STD-LL-RS, MLNX_RS_544_514_PLR, MLNX_RS_271_257_PLR and RS_FEC_544_514.[2] When a link crosses the line, the report is a fixed string worth quoting rather than paraphrasing:[2]

BER exceeds threshold - BER type: Symbol BER, FEC mode: [MODE], BER value = [VALUE] / threshold = [THRESHOLD]

Fabric-wide, the same data arrives through ibdiagnet --get_phy_info, which queries all ports for PHY information, with --get_ppamp for opAMP data and --show_cap_reg to dump capability registers that are hidden by default.[7] The per-link result lands in ibdiagnet2.net_dump_ext, the “Extended fabric link dump with FEC, BER, and phy data” — that file, not a screenshot, is what you ask for.[8]

3mlxlink: the module, the counters and the eye

mlxlink is “used to check and debug link status and related issues” and “can be used on different links and cables (passive, active, transceiver and backplane)”.[3] The documentation calls it a tool for advanced users, which in practice means it will happily tell you things you have to interpret rather than read.[3]

The flags that carry a triage:[3]

Flag Documented meaning
-d/--device “Perform operation for a specified mst device”
-p/--port “Port Number”
-m/--show_module “Show Module Info”
-c/--show_counters “Show Physical Counters and BER Info”
-e/--show_eye “Show Eye Opening Info”
--rx_fec_histogram “Provide histogram of FEC errors. The result is divided to bins.”
--amber_collect “AmBER Port Extended Information Collection For 16nm Products and Later [CSV File]”
--show_diagnostic_info “Show PRBS diagnostic counters information”
--port_state “Configure Port State [UP(up)/DN(down)/TG(toggle)]”

Three operational facts from the same page. “mlxlink errors, warnings and notes are printed on stderr console” — so a script that captures only stdout throws away the reason the command failed.[3] “In ConnectX-7 and later cards, configuring the loopback can be applied when the link is fully down (not in polling state)” — a loopback test on a modern card needs the link taken down first, which is itself a change.[3] And the warning that mirrors the ibportstate one: do not disable ports connecting hosts to unmanaged switches using --port_state dn.[3]

Sequence the three read-only calls deliberately. -m answers “what is plugged in” — vendor, part number, temperature. -c answers “how is it performing” — physical counters and BER. --rx_fec_histogram answers “how much margin is left” — where the corrected errors sit across the bins.[3] Only --amber_collect produces the CSV you would attach for someone else to analyse.[3]

4The switch side, and the order that ends in a cable swap

NVOS exposes per-port link diagnostics in three code families: PHY Firmware Indication (codes 0-1023) covering auto-negotiation failures, link training problems, signal integrity issues and cable compliance mismatches; Firmware Management Issues (codes 1024-2047) covering unplugged cables, unsupported modules, temperature shutdowns and power budget exceeded; and Link Down Reason Indication (codes 0-43).[4] Named reasons from that last table include Hi_SER_or_Hi_BER, Block_Lock_loss and FEC_sync_loss, alongside management and thermal events.[4] The entry points are nv show interface <id> link phy-diag and nv show interface <id> link phy-detail, next to nv show interface <id> link state and link counters.[5]

That code family split is the diagnosis in miniature. Hi_SER_or_Hi_BER and FEC_sync_loss point at the medium; “temperature shutdown” and “power budget exceeded” point at the cage and the environment; an unplugged-cable indication points at somebody’s hands.[4]

So the order for a flapping link is:[6][7][3][4]

  1. iblinkinfo -d — which ports have a port in the Down state right now.[6]
  2. ibdiagnet --get_phy_info, then read ibdiagnet2.net_dump_ext for FEC and BER per link.[7][8]
  3. mlxlink -d <mst> -p <port> -m -c for module identity, temperature and BER on the suspect port.[3]
  4. Map the NVOS link-down reason code on the switch side.[4]
  5. Only then swap the cable.[4]

Do not skip step 1, and do not misread the SM’s logs on the way: repeated heavy sweeps are triggered by a trap or a detected topology change, so their recurrence is the SM reacting to a link that keeps flapping rather than the cause of it.[9]

One Dell-specific stop sign belongs in the same checklist. If the only evidence is an iDRAC inventory screen showing a ConnectX-7 NDR200 card as SDR, there is nothing to triage: the UEFI and PXE drivers configure the link speed to SDR when the cable supports it so the link comes up quickly at boot, and Dell’s resolution is verbatim “This is expected behavior and is cosmetic in the iDRAC. This can be safely ignored as the card functions at and reflects Next Data Rate (NDR) speeds within the operating system.”[10] The proof is ibstat in the OS, and the KB number is 000221452.[10][11]

SymptomBlueField-3 on a Dell Pow…SymptomBring-up: card, rshim, BF…SymptomHost does not see the Blu…CheckIs the card enumerated o…
Symptom

Host does not see the BlueField

The shipped tree is the BlueField platform tree; its device branch has the same shape as a PHY investigation — enumerate, then check the layer below, then the layer below that. If it opens on the root, use the five-step order printed above instead.
Worked → faded → problem

Ticket: “Rack 4 leaf port 17 flapped six times last night. Send us a cable.”

# 1. What is actually down now, fabric-wide.
iblinkinfo -C mlx5_0 -P 1 -d

# 2. Per-link FEC and BER, from one sweep.
ibdiagnet -o /tmp/phy --get_phy_info
grep -i "rack4-leaf" /tmp/phy/ibdiagnet2.net_dump_ext

# 3. The module on the suspect port (read-only).
mst start
mlxlink -d /dev/mst/mt4129_pciconf0 -p 1 -m -c 2>&1 | tee /tmp/mlxlink-p1.txt

Reading it: if step 2 shows a symbol BER above the 10^-12 default with a MLNX_RS_544_514_PLR FEC mode, the link is already correcting hard and the report string names the value against the threshold.[2] If step 3 shows the module temperature near its ceiling while the neighbouring ports are cool, the finding is the cage or the airflow, not the cable.[3] Note the 2>&1 in step 3: mlxlink prints errors, warnings and notes on stderr, so a plain redirect would silently drop them.[3]

Only after the switch’s own link-down reason code is read does the recommendation get written. Hi_SER_or_Hi_BER or FEC_sync_loss supports a cable or module replacement; a temperature or power-budget indication does not.[4]

Two read-only commands before the parts request

How it ended

In the rehearsal you do not refuse the cable; you defer it by an hour. mlxlink with -m and -c names the module, its temperature and its BER on port 17, and the switch’s own link-down reason decides the case: Hi_SER_or_Hi_BER or FEC_sync_loss supports a replacement, power budget exceeded does not.[3][4] Nothing you run changes port state. The sentence that changes the room is short — a new cable will flap the same way if the cage cannot power the one already in it. Then the SE puts tomorrow’s slide up: migrate all forty hosts to DOCA-Host over the weekend. Nowhere on it is the word ibutils2.

Lab

Mutating steps ahead. Needs a maintenance window, out-of-band access (BMC/iDRAC/rshim console) and a rollback path. Record the pre-flight inventory before changing anything. Never on a production host.

On the Dell-lab card. Steps 1-5 are read-only. Step 6 changes port state on a lab-only port and names its rollback.

  1. Pre-flight inventory, read-only: ibstat, ibstatus, mst start, mst status. Expected: the port reads Active and LinkUp, and mst status lists a device path such as /dev/mst/mt4129_pciconf0.[11][3] Record the device path; every mlxlink command needs it.
  2. Module identity: mlxlink -d <mst_dev> -p 1 -m 2>&1 | tee /tmp/module.txt. Expected: vendor, part number and temperature for the plugged module.[3] Keep the 2>&1 — warnings go to stderr.[3]
  3. Physical counters and BER: mlxlink -d <mst_dev> -p 1 -c 2>&1 | tee /tmp/counters.txt. Expected: physical counters and BER info, including the FEC mode in use.[3] Compare the value against the 10^-12 default threshold and write the comparison down.[2]
  4. Margin: mlxlink -d <mst_dev> -p 1 --rx_fec_histogram 2>&1 | tee /tmp/fec.txt on an active link. Expected: a histogram of FEC errors divided into bins.[3] If the command is rejected, record the MFT version — the flag set moves between releases.[3]
  5. Fabric view of the same link, read-only: ibdiagnet -o /tmp/phy --get_phy_info then open /tmp/phy/ibdiagnet2.net_dump_ext and find your port. Expected: the FEC and BER columns agree with step 3.[7][8]
  6. Mutating, reversible, lab-only port: ibportstate <lid> 1 disable, confirm with ibstat that the port left Active, then ibportstate <lid> 1 enable. Rollback: the enable, followed by ibstat showing State: Active and Physical state: LinkUp again, and iblinkinfo -d showing the port is no longer down.[1][11][6] Never run this on a host link to an unmanaged switch, and remember that on the HCA side the SM is not told what you did.[1][3]
  7. Optional on a customer lab: mlxlink -d <mst_dev> -p 1 --amber_collect for the CSV, and correlate its rows against the switch’s nv show interface <id> link phy-diag codes. Expected: the module-side and switch-side stories agree; when they do not, the disagreement is the finding.[3][4]

Retrieval check

10 questions from memory. Answer before looking anything up; misses become flashcards.

Explain it to a Dell SE

A customer wants to swap a cable because a link flapped twice last night. Explain in five sentences what you want measured first and why the swap is the last step.

14 flashcards for this lesson — 0 in deck. Spaced review lives at /review.

Sources

Facts in this lesson were checked against MFT 4.30.0 mlxlink utility page (re-fetched 2026-09-07), rdma-core master ibportstate man page, IBUtils2 2.26.0 BER page and 2.24.0 phy plugin, NVOS link diagnostics v25.02.4002 and interface commands v25.02.7002, Dell KB 000221452. Dates are when each page was fetched.

  1. ibportstate(8) man page source (rdma-core master) · fetched 2026-09-07
  2. Bit Error Rate (BER) (IBUtils2 2.26.0) · fetched 2026-09-07
  3. mlxlink Utility (MFT 4.30.0) · fetched 2026-09-07
  4. Link Diagnostic Per Port (NVOS UM v25.02.4002) · fetched 2026-09-07
  5. InfiniBand Interface Commands (NVOS UM v25.02.7002) · fetched 2026-09-07
  6. iblinkinfo(8) man page source (rdma-core master) · fetched 2026-09-07
  7. Phy Diagnostic Plugin (IBUtils2 2.24.0) · fetched 2026-09-07
  8. ibdiagnet Dump Files (IBUtils2 2.24.0) · fetched 2026-09-07
  9. opensm(8) man page source (linux-rdma/opensm master) · fetched 2026-09-07
  10. Dell KB 000221452: ConnectX-7 NDR200 link speed shows as SDR · fetched 2026-09-07
  11. ibstat(8) man page source (rdma-core master) · fetched 2026-09-07

The same idea elsewhere

Other lessons that cover this ground, sometimes from another course's angle.