-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[FEC] Design for auto-fec #1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@prgeor @ridahanif96 Please review this HLD |
@venkatmahalingam @ridahanif96 @madhupalu @prgeor Can you please review and sign off? |
@venkatmahalingam @prgeor @ridahanif96 @madhupalu Gentle reminder to review and signoff the HLD |
@dgsudharsan can you attach the code PRs in the description. @yutongzhang-microsoft FYI |
doc/port_auto_neg/auto-fec.md
Outdated
### Requirements | ||
|
||
Primary requirements for configuring FEC are | ||
- Honor the backward compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan can you provide more context on the backward compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backward compatibility means if an image upgrade is done from an image without the feature to image with the feature, there should be no issues. E.g a port with 'rs' fec and AN enabled should work the same before and after the upgrade to image with the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan thanks. can you capture this in the doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
doc/port_auto_neg/auto-fec.md
Outdated
/** | ||
* @brief Operational FEC mode | ||
* | ||
* If port is down, the returned value should be zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan return value zero or none?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated from latest SAI headers
doc/port_auto_neg/auto-fec.md
Outdated
| 2 | False | False | auto | CLI will throw error. No FEC attributes will be set | | ||
| 3 | False | False | N/A | No FEC attributes will be set | | ||
| 4 | False | True | none/rs/fc | SAI_PORT_ATTR_FEC_MODE=none/rs/fc. Behavior is undeterministic when AN is enabled and user has configured FEC | | ||
| 5 | False | True | auto | No FEC attributes will be set | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan why not throw the error if the platform does not support auto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
| 6 | False | True | N/A | No FEC attributes will be set | | ||
| 7 | True | True | none/rs/fc | SAI_PORT_ATTR_FEC_MODE=none/rs/fc SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=True | | ||
| 8 | True | True | auto | SAI_PORT_ATTR_FEC_MODE=none, SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=False | | ||
| 9 | True | True | N/A | SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE will not be set | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan why not set override = False. What is the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the case when there is no fec config. N/A means not available. FEC override will be set only when FEC is configured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan FEC override = False or FEC override not set aren't the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FEC override attribute will be set only in the flow of setting FEC. When FEC itself is not set there will be no override attribute that needs to be programmed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition by default the attribute is false, so if not set the default value expected from SAI is false. However the table is to capture what is programmed from orchagent perspective on specific combinations
| 6 | False | True | N/A | No FEC attributes will be set | | ||
| 7 | True | True | none/rs/fc | SAI_PORT_ATTR_FEC_MODE=none/rs/fc SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=True | | ||
| 8 | True | True | auto | SAI_PORT_ATTR_FEC_MODE=none, SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=False | | ||
| 9 | True | True | N/A | SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE will not be set | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan FEC override = False or FEC override not set aren't the same?
| 8 | True | True | auto | SAI_PORT_ATTR_FEC_MODE=none, SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=False | | ||
| 9 | True | True | N/A | SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE will not be set | | ||
| 10 | True | False | None/rs/fc | SAI_PORT_ATTR_FEC_MODE=none/rs/fc | | ||
| 11 | True | False | auto | SAI_PORT_ATTR_FEC_MODE=none, SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE=False. However the auto will take effect only when AN is enabled and until then the mode will be none. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgsudharsan ok. please add notice log
|
||
### Restrictions/Limitations | ||
|
||
Since previously the behavior of FEC with autoneg is undefined, if a vendor always gives precedence for auto negotiated FEC over user configured FEC, implementing the new attribute may lead to backward incompatibility issues when SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE is implemented. Since orchagent will always set SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE to true when FEC is explicitly configured and the attribute is supported by SAI, there will be difference in behavior before and after upgrade. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE
support by the platform itself means that the platform is going to OVERRIDE its existing behavior. isn't it? If so, the difference in behavior is expected...i mean it will be a breaking change though...If the platform choose to keep the original behavior, then it means the platform is not supporting the override SAI attribute in which case why support override attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is difference in behavior, it should be also made backward compatible through db_migrator. It is upto the vendors to decide whether they want to support new attribute and introduce db_migrator if they need it for solving the backward incompatibility or avoid introducing the attribute altogether.
Co-authored-by: Prince George <[email protected]>
* [FEC]Auto FEC initial changes Initial Changes to support Auto FEC feature. Added support for mode "auto" in FEC Why I did it To implement auto FEC feature HLD: sonic-net/SONiC#1416
@dgsudharsan Can you please update the Quality Metric (Alpha/Beta/GA) for the feature either in this PR comments or in HLD itself based on https://github.com/sonic-net/SONiC/blob/master/doc/SONiC%20feature%20quality%20definition.md |
This HLD introduces design for auto fec. This document tries to bring in a deterministic approach when FEC and autoneg are configured together which is currently left to vendor implementation.