Skip to content

Bug: xcvrd calculates incorrect CMIS lane masks for mixed-speed breakout configurations #29317

Description

@justin-oliver

Is it platform specific

generic

Importance or Severity

Medium

Description of the bug

The CMIS manager currently derives the active lane mask from the current port's lane count and subport index, effectively assuming that all sibling ports in a breakout use the same number of lanes. In mixed-speed breakout modes, earlier sibling ports may consume a different number of host/media lanes, so this calculation can select the wrong starting lane for later subports.

As a result, xcvrd may program CMIS application selections and lane-specific settings against the wrong host/media lanes, which can prevent affected breakout ports from configuring correctly and may block link up. The fix is to calculate the lane start offset by summing the actual lane counts of lower-numbered sibling subports instead of using lane_count * (subport - 1).

Steps to Reproduce

Configure a mixed speed port breakout such as 1x400g-4, 4x100g-1 on an 800g port. Insert an optical module.

Actual Behavior and Expected Behavior

Port 1 is configured for 400g-2, 400g-2, 800g-4:

root@localhost# show interfaces status | head
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Medium    Type           Vendor            Model    Asym PFC    Flaps
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  --------  ------  ---------------  ---------------  ----------  -------
  Ethernet0          273,274     400G   9100     rs    etp1a  routed      up       up     Optic    OSFP         PINEWAVE     T-RH8ENH-NMT         off        1
  Ethernet2          275,276     400G   9100     rs    etp1b  routed      up       up     Optic    OSFP         PINEWAVE     T-RH8ENH-NMT         off        1
  Ethernet4  277,278,279,280     800G   9100     rs    etp1c  routed    down       up     Optic    OSFP         PINEWAVE     T-RH8ENH-NMT         off        0

The first 2 subports have correct application applied to the correct lanes:

root@localhost# show interface transceiver info Ethernet0
Ethernet0: SFP EEPROM detected
        Active Firmware: 99.128.0
        Active application selected code assigned to host lane 1: 4
        Active application selected code assigned to host lane 2: 4
        Active application selected code assigned to host lane 3: N/A
        Active application selected code assigned to host lane 4: N/A
        Active application selected code assigned to host lane 5: N/A
        Active application selected code assigned to host lane 6: N/A
        Active application selected code assigned to host lane 7: N/A
        Active application selected code assigned to host lane 8: N/A
        Application Advertisement: 200GAUI-1 (Annex176E) - Host Assign (0xff) - 200GBASE-DR1 (Clause 180) - Media Assign (0xff)
                                   800GAUI-4 (Annex176E) - Host Assign (0x11) - 800GBASE-DR4 (Clause 180) - Media Assign (0x11)
                                   1.6TAUI-8 (Annex176E) - Host Assign (0x1) - 1.6TBASE-DR8 (Clause 180) - Media Assign (0x1)
                                   400GAUI-2 (Annex176E) - Host Assign (0x55) - 400GBASE-DR2 (Clause 180) - Media Assign (0x55)

root@localhost# show interface transceiver info Ethernet2
Ethernet2: SFP EEPROM detected
        Active Firmware: 99.128.0
        Active application selected code assigned to host lane 1: N/A
        Active application selected code assigned to host lane 2: N/A
        Active application selected code assigned to host lane 3: 4
        Active application selected code assigned to host lane 4: 4
        Active application selected code assigned to host lane 5: N/A
        Active application selected code assigned to host lane 6: N/A
        Active application selected code assigned to host lane 7: N/A
        Active application selected code assigned to host lane 8: N/A
        Application Advertisement: 200GAUI-1 (Annex176E) - Host Assign (0xff) - 200GBASE-DR1 (Clause 180) - Media Assign (0xff)
                                   800GAUI-4 (Annex176E) - Host Assign (0x11) - 800GBASE-DR4 (Clause 180) - Media Assign (0x11)
                                   1.6TAUI-8 (Annex176E) - Host Assign (0x1) - 1.6TBASE-DR8 (Clause 180) - Media Assign (0x1)
                                   400GAUI-2 (Annex176E) - Host Assign (0x55) - 400GBASE-DR2 (Clause 180) - Media Assign (0x55)

The remaining 800G subport should be programmed only on host lanes 5-8 since lanes 1-4 are already consumed by the two 400g subports. Instead, xcvrd applies application code 1 to all 8 host lanes. This is caused by CmisManagerTask deriving the lane start from host_lane_count * (subport - 1), which assumes uniform breakout widths.

root@localhost# show interface transceiver info Ethernet4
Ethernet4: SFP EEPROM detected
        Active Firmware: 99.128.0
        Active application selected code assigned to host lane 1: 1
        Active application selected code assigned to host lane 2: 1
        Active application selected code assigned to host lane 3: 1
        Active application selected code assigned to host lane 4: 1
        Active application selected code assigned to host lane 5: 1
        Active application selected code assigned to host lane 6: 1
        Active application selected code assigned to host lane 7: 1
        Active application selected code assigned to host lane 8: 1
        Application Advertisement: 200GAUI-1 (Annex176E) - Host Assign (0xff) - 200GBASE-DR1 (Clause 180) - Media Assign (0xff)
                                   800GAUI-4 (Annex176E) - Host Assign (0x11) - 800GBASE-DR4 (Clause 180) - Media Assign (0x11)
                                   1.6TAUI-8 (Annex176E) - Host Assign (0x1) - 1.6TBASE-DR8 (Clause 180) - Media Assign (0x1)
                                   400GAUI-2 (Annex176E) - Host Assign (0x55) - 400GBASE-DR2 (Clause 180) - Media Assign (0x55)

Relevant log output

Output of show version, show techsupport

Attach files (if any)

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions