[202012] Allowing the first time FEC and AN configuration to be pushed to SAI#1710
Merged
jleveque merged 1 commit intosonic-net:202012from Apr 16, 2021
Merged
[202012] Allowing the first time FEC and AN configuration to be pushed to SAI#1710jleveque merged 1 commit intosonic-net:202012from
jleveque merged 1 commit intosonic-net:202012from
Conversation
jleveque
approved these changes
Apr 16, 2021
4 tasks
EdenGri
pushed a commit
to EdenGri/sonic-swss
that referenced
this pull request
Feb 28, 2022
… due to bugs found in poetry-semver (sonic-net#1710) #### What I did I replaced underneeth a library which I used for semver functionality. #### How I did it Tried to keep existing Version/VersionConstraint API but replaced library used underneeth. I also added two UT that failed with poetry-semver and show the motivation for this change. UT description: - ```test_invalid_version``` This test is to verify that **invalid** semantic version strings are rejected with exception by ```Version.parse```. E.g. "1.2.3-0123" is not a valid semantic version due to this (https://semver.org/#spec-item-9): ``` A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes ``` - ```test_version_comparison``` This test checks whether the implementation correctly compare two version strings (this is needed due to the logic that checks if we are upgrading or downgrading). According to https://semver.org/#spec-item-11, "1.0.0-alpha" < "1.0.0". #### How to verify it Run UT, run some basic sonic-package-manager commands.
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.
What I did
Allowing the first time configuration for FEC and Autoneg to be pushed to SAI even if they are default.
Why I did it
In orchagent, the port struct is pre-initialized with fec = none and autoneg = false (Default SAI values). However in different hardware the underlying implementation might be different. There can also be requirement where the user values need to be forced. In current logic due to the port struct being initialized with default, fec = none or an = false configurations are not pushed from orchagent to SAI. In order to push it even in default case the conditional checks are modified.
How I verified it
Configure FEC as none and autoneg as false and check if ASIC DB is programmed.
Details if related
This change will force the FEC and autoneg configuration only if the configuration is explicitly present. There is no impact when there are no external FEC or autoneg configuration.
If an external FEC or autoneg config is present below are how different boot scenarios will be handled.
Warm boot will not be affected even if an external configuration is present since it will be reconciled. I tested the case and found no link flaps
Fast boot and Cold boot - Only if external configuration is present, it will be programmed during port initialization. No additional link flaps is seen or additional time is taken.
This is the porting of PR #1705 to 202012