Feature slot speeds direct attach support - #60
Open
joshuaboud wants to merge 3 commits into
Open
Conversation
this file is only for servers with UBM backplanes + HBA cards
joshuaboud
requested review from
JordanKeo45 and
hansrachit123
and
a lite review from Copilot
August 20, 2026 20:42
There was a problem hiding this comment.
Pull request overview
Adds direct-attached (non-UBM) server support to slot_speeds (specifically STORNADO-E16 and PROXINATOR-VM2) and expands the reported slot metadata to include serial and size, while keeping the existing UBM/storcli2 path intact.
Changes:
- Refactors the storcli2/UBM JSON collection into
get_slot_speeds_json_ubmand addsget_slot_speeds_json_direct_attached. - Adds STORNADO-E16 and PROXINATOR-VM2 direct-attached slot-name lists and uses them when UBM support is unavailable.
- Extends output with
serialandsizefields/columns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| ubm/slot_name_map.txt | Clarifies intended scope of the UBM slot-name map and removes the STORNADO-E16 mapping from the UBM map file. |
| tools/slot_speeds | Adds direct-attached support and extends slot metadata/columns (serial, size) for both UBM and direct-attached modes. |
Suppressed comments (2)
tools/slot_speeds:172
- Same as above:
$DEV_PATHshould beDEVPATH, otherwise the ATA link index extraction is empty and the sysfs lookup fails.
sed 's; Gbps;Gb/s;' "/sys/class/ata_link/link$(echo "$DEV_PATH" | grep -oP 'ata\K[0-9]+')/sata_spd_limit"
tools/slot_speeds:150
width_maxusesprintfwith%d, but the command substitution can emit non-numeric placeholders (e.g.?), which will be coerced to 0 and misreport max link width.
printf '"width_max": "x%d",\n' "$(
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+118
to
+119
| local last_slot | ||
| last_slot=$(echo "$SLOT_NAMES" | awk '{print $NF}') |
Comment on lines
+121
to
+124
| for slot_name in $SLOT_NAMES; do | ||
| if ! test -b "/dev/$slot_name"; then | ||
| continue | ||
| fi |
| if [[ "$DEVPATH" == *"/nvme/"* ]]; then | ||
| sed 's; GT/s PCIe;GT/s;' "/sys/$DEVPATH/../../../current_link_speed" | ||
| elif [[ "$DEVPATH" == *"/ata"* || "$ID_VENDOR" == "ATA" ]]; then | ||
| sed 's; Gbps;Gb/s;' "/sys/class/ata_link/link$(echo "$DEV_PATH" | grep -oP 'ata\K[0-9]+')/sata_spd" |
| else | ||
| MAP_KEY=$(get_map_key) || exit $? | ||
| SLOT_NAMES=$( | ||
| grep "^$MAP_KEY\s" <<EOF | cut -d' ' -f2- |
| echo ? | ||
| fi | ||
| )" | ||
| printf '"width": "x%d",\n' "$( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add E16 and VM2 support for the slot_speeds command