Skip to content

fix: use mlxconfig to set LINK TYPE P1#280

Merged
almaslennikov merged 1 commit intomainfrom
mlxconfig-for-link-type
Feb 10, 2026
Merged

fix: use mlxconfig to set LINK TYPE P1#280
almaslennikov merged 1 commit intomainfrom
mlxconfig-for-link-type

Conversation

@almaslennikov
Copy link
Collaborator

LINK_TYPE_P2 is not available on CX8 so DMS breaks on this command

(cherry picked from commit c2271f1)

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)
@almaslennikov almaslennikov merged commit 0cf229e into main Feb 10, 2026
7 checks passed
@almaslennikov almaslennikov deleted the mlxconfig-for-link-type branch February 10, 2026 12:30
@greptile-apps
Copy link

greptile-apps bot commented Feb 10, 2026

Greptile Overview

Greptile Summary

This PR updates the Spectrum-X RA manifests to configure “Ethernet mode” via NIC firmware (mlxconfig) instead of DMS.

Specifically, nvConfig entries that previously set /interfaces/interface/config/type to ethernetCsmacd (with valueType: string) are replaced by mlxconfig: LINK_TYPE_P1 with value: 2 across RA1.3/RA2.0/RA2.1. The intent is to avoid using LINK_TYPE_P2 (unavailable on CX8) and prevent DMS failures when applying the config.

The rest of the nvConfig/runtimeConfig content in these files remains unchanged; the integration point is the operator component that parses nvConfig and applies either DMS updates or mlxconfig updates depending on which key is present.

Confidence Score: 3/5

  • This PR is moderately safe to merge, but only if the config consumer supports mlxconfig-only Ethernet-mode entries and the LINK_TYPE_P1 numeric encoding is correct.
  • The change is limited to three YAML bindata manifests, but it alters the mechanism and value type used to set interface mode. If the operator’s loader/apply logic still expects the DMS path/valueType for this setting, or if value: 2 is not the expected encoding for LINK_TYPE_P1, the manifests will fail at runtime when applied.
  • bindata/spectrum-x/RA1.3.yaml, bindata/spectrum-x/RA2.0.yaml, bindata/spectrum-x/RA2.1.yaml

Important Files Changed

Filename Overview
bindata/spectrum-x/RA1.3.yaml Replaced DMS-based Ethernet mode (/interfaces/interface/config/type=ethernetCsmacd) with mlxconfig LINK_TYPE_P1 value=2; verify that value encoding and schema allow switching from dmsPath/valueType to mlxconfig-only entry.
bindata/spectrum-x/RA2.0.yaml Same change as RA1.3: Ethernet mode now uses mlxconfig LINK_TYPE_P1 value=2 instead of DMS type=ethernetCsmacd; ensure the consumer supports this and that the numeric value is correct.
bindata/spectrum-x/RA2.1.yaml Updated nvConfig Ethernet mode to mlxconfig LINK_TYPE_P1 value=2 (removed dmsPath/valueType/value ethernetCsmacd); check for correctness across breakout/multiplane configs and that schema accepts mlxconfig-only item.

Sequence Diagram

sequenceDiagram
    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
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 17 to +19
- name: Ethernet mode
dmsPath: /interfaces/interface/config/type
valueType: string
value: ethernetCsmacd
value: 2
mlxconfig: "LINK_TYPE_P1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 17 to +19
- name: Ethernet mode
dmsPath: /interfaces/interface/config/type
valueType: string
value: ethernetCsmacd
value: 2
mlxconfig: "LINK_TYPE_P1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant