[Dynamic Buffer Calc][202012]Bug fix: Don't create lossless buffer profile for active ports without speed configured #1820
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
Bugfix: Don't create lossless buffer profiles for active ports without speed configured
This is to backport PR #1822 to 202012.
Root cause:
handlePortTableUpdate
,refreshPgsFromPort
is called if admin status is updated even if the speed is not configured.This is reasonable because the port can be configured as headroom override and the profile should be applied in that case.
PORT_READY
inrefreshPgsForPort
regardless of whether the speed is configured, which is not correct.This is should be avoided and
PORT_READY
should be set by the caller if necessaryFix:
PORT_READY
inrefreshPgsForPort
and check the port's state before calling it.Note:
Signed-off-by: Stephen Sun [email protected]
Why I did it
How I verified it
Regression test and vs test.
Details if related