Skip to content

Conversation

@aditya-nexthop
Copy link
Contributor

Description

  • Implement new method get_gearbox_line_lanes_dict in xcvr_table_helper.py to return a dict of number of gearbox line lanes indexed by logical port.
  • Building this dict and caching it in CmisTaskManager before a new iteration over port_dict
  • Implement new method get_host_lane_count to look up the gearbox line lanes in this cached dict for every logical port. If found, use this as the host_lane_count, else use the host_lane_count from port_config
  • Use this new method when setting host_lane_count for every logical port iteration

Motivation and Context

On switches with gearbox PHYs, for a given interface, the number of lanes between the switch ASIC and the gearbox PHY may be different from the number of lanes between the gearbox PHY and the transceiver. xcvrd currently looks only at the switch ASIC lanes (port_config) as host_lane_count which can result in xcvrd either not finding a matching CMIS application or choosing a wrong application.

This change allows xcvrd to consider the gearbox line lanes as host_lane_count when present. This is accurate to the hardware.

How Has This Been Tested?

With this change, xcvrd is successfully able to select the correct CMIS application on a platform with such a gearbox PHY chip. Additional unit tests have also been added in support of this change.

Additional Information (Optional)

fixes #688

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

- Implement new method get_gearbox_line_lanes_dict in xcvr_table_helper.py
  to return a dict of number of gearbox line lanes indexed by logical
  port.
- Building this dict and caching it in CmisTaskManager before a new
  iteration over port_dict
- Implement new method get_host_lane_count to look up the gearbox line
  lanes in this cached dict for every logical port. If found, use this
  as the host_lane_count, else use the host_lane_count from port_config
- Use this new method when setting host_lane_count for every logical
  port iteration
@aditya-nexthop aditya-nexthop force-pushed the aditya-gearbox-lanes-xcvrd branch from 83e10fe to 7e363fb Compare September 25, 2025 23:34
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@aditya-nexthop aditya-nexthop marked this pull request as ready for review September 26, 2025 00:15
@prgeor
Copy link
Collaborator

prgeor commented Oct 8, 2025

@aditya-nexthop please test the breakout scenario with gearbox to ensure when the user does interface shut or not shut, the Xcvrd only shut/no-shuts the corresponding subport without impacting the other subports. This is to ensure that the lane mask is used properly by Xcvrd

prgeor
prgeor previously approved these changes Oct 8, 2025
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor prgeor merged commit 7e594d1 into sonic-net:master Oct 9, 2025
5 checks passed
@aditya-nexthop aditya-nexthop deleted the aditya-gearbox-lanes-xcvrd branch October 9, 2025 16:50
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.

xcvrd does not use the gearbox line lanes for CMIS application lookup

3 participants