Skip to content
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

[PortsOrch] Init Port paramter with port speed & an & FEC from APP DB, #960

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RichardWu-Hebut
Copy link
Contributor

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:

  1. The FEC in ASIC is set to RS via SAI, while the port class instance's FEC is NONE by the default value.
  2. When loading the CONFIG DB, then the orchagent will try to set the FEC to NONE.
  3. in the PortsOrch::doPortTask, it will compare the fec setting with the port class instance. In this step, as the port class instance FEC is NONE, so it will result in not updating the FEC to NONE .

How I verified it

  1. Update the port_config.ini file with FEC to RS, while NONE in config_db.json.
  2. Set the peer port FEC to NONE.
  3. Reboot the switch, check whether the port can up.

            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>
@lguohan
Copy link
Contributor

lguohan commented Jul 31, 2019

since this is a enhancement, can you add vs test for this enhancement?

@prsunny prsunny self-requested a review as a code owner September 2, 2022 23:17
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants