fix: use mlxconfig to set LINK TYPE P1#280
Conversation
LINK_TYPE_P2 is not available on CX8 so DMS breaks on this command Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com> (cherry picked from commit c2271f1)
Greptile OverviewGreptile SummaryThis PR updates the Spectrum-X RA manifests to configure “Ethernet mode” via NIC firmware ( Specifically, The rest of the nvConfig/runtimeConfig content in these files remains unchanged; the integration point is the operator component that parses Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Ctrl as NIC Config Operator
participant Manifest as RA*.yaml nvConfig
participant DMS as DMS (gNMI/SONiC path)
participant MLX as mlxconfig (NIC FW config)
Ctrl->>Manifest: Load nvConfig entries
alt Before PR (Ethernet mode via DMS)
Ctrl->>DMS: Set /interfaces/interface/config/type = ethernetCsmacd
DMS-->>Ctrl: OK / error
else After PR (Ethernet mode via mlxconfig)
Ctrl->>MLX: Set LINK_TYPE_P1 = 2
MLX-->>Ctrl: OK / error
end
Ctrl->>MLX: Set SRIOV_EN, NUM_OF_VFS (unchanged)
MLX-->>Ctrl: OK / error
|
| - name: Ethernet mode | ||
| dmsPath: /interfaces/interface/config/type | ||
| valueType: string | ||
| value: ethernetCsmacd | ||
| value: 2 | ||
| mlxconfig: "LINK_TYPE_P1" |
There was a problem hiding this comment.
Schema mismatch risk
This replaces the previous DMS-backed config (dmsPath + valueType + string ethernetCsmacd) with an mlxconfig entry and a numeric value: 2. If the operator’s config loader expects dmsPath/valueType for this specific setting (or treats values as strings unless valueType is present), this will fail at runtime when applying nvConfig. Please confirm the config schema supports mlxconfig-only items here and that 2 is the correct LINK_TYPE_P1 encoding for “Ethernet mode” on all targeted devices.
| - name: Ethernet mode | ||
| dmsPath: /interfaces/interface/config/type | ||
| valueType: string | ||
| value: ethernetCsmacd | ||
| value: 2 | ||
| mlxconfig: "LINK_TYPE_P1" |
There was a problem hiding this comment.
Keep RA versions consistent
Same as RA1.3: this swaps the interface type configuration from DMS (/interfaces/interface/config/type=ethernetCsmacd) to mlxconfig: LINK_TYPE_P1 with value: 2. If the control plane assumes the DMS path exists for these RA manifests, the change will break configuration application. Verify the consumer supports mlxconfig for this setting and that the numeric value maps to Ethernet for LINK_TYPE_P1.
LINK_TYPE_P2 is not available on CX8 so DMS breaks on this command
(cherry picked from commit c2271f1)