[202503] Add fec: rs to port config for ports with >=50G per lane#2007
Open
sdszhang wants to merge 1 commit intoAzure:202503from
Open
[202503] Add fec: rs to port config for ports with >=50G per lane#2007sdszhang wants to merge 1 commit intoAzure:202503from
sdszhang wants to merge 1 commit intoAzure:202503from
Conversation
Why I did it Ports with lane speed >=50G use PAM4 modulation and should indicate "fec": "rs" in the port config. This fixes issue Enhancement:FEC not configured for PAM4 speeds #23561 #### Why I did it Ports with lane speed >=50G use PAM4 modulation and should indicate "fec": "rs" in the port config. Without this, the FEC configuration is missing for PAM4 speeds, which can lead to link stability issues. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it Modified `portconfig.py` to automatically set `"fec": "rs"` for ports where the lane speed is >=50G (PAM4 modulation). Updated the logic to detect lane speed based on port speed and number of lanes, and apply the appropriate FEC configuration. #### How to verify it 1. Generate port configuration for platforms with ports using >=50G per lane (e.g., 400G ports with 8 lanes, 200G ports with 4 lanes) 2. Verify that the generated config includes `"fec": "rs"` for these ports 3. Run the updated unit tests: `test_cfggen_platformJson.py` #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 #### Tested branch (Please provide the tested image version) - [x] 202412 branch #### Description for the changelog Add automatic FEC RS configuration for ports with lane speed >=50G (PAM4 modulation) <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
Author
|
original PR #1950 and |
prgeor
approved these changes
Feb 21, 2026
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.
cherry-pick #1950 to 202503.
Why I did it
Ports with lane speed >=50G use PAM4 modulation and should indicate "fec": "rs" in the port config.
Work item tracking
How I did it
Check the lane speed and add "fec": "rs" for lanes with speed at least 50G.
How to verify it
sonic-cfggen -k <device-name> --print-data | grep Ethernet0 -C 10Make sure that fec rs is there by default if it's a PAM4 speed. Otherwise don’t insert anything To verify whether “fec”: “rs” is only being added for lane speeds above 50G, we used these 3 test inputs and show their respective outputs. Test Input 1:Should have fec because the lane speed is greater than 50G. Output:
Test Input 2:
Should not have fec because the lane speed is less than 50G. Output:
Test Input 3:
Should have fec because lane speed is 50G. Output:
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)