[PortsOrch] Init Port paramter with port speed & an & FEC from APP DB, #960
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.
Init Port paramter with port speed & an & FEC from APP DB, instead of default vaule of port class, make it aligned with the setting sent to ASIC DB
Signed-off-by: Richard Wu wutong23@baidu.com
What I did
Update PortsOrch::initPort to set speed, FEC and auto neg to the Port class instance in orchagent memory
Why I did it
When invoking addPort, the port speed, FEC and autoneg are set via SAI, but those parameters are not set via PortsOrch::initPort. In the result, the port class instance are not aligned with ASIC if those parameters settings in port_config.ini are not same with the default value in Port class.
Before this change, if I set the FEC to RS in port_config.ini and NONE in config_db.json, those below will happed:
How I verified it