Skip to content

Manual cast new syncd arg logic from master to 202605 (#2000) - #2021

Draft
justin-wong-ce wants to merge 1 commit into
sonic-net:202605from
justin-wong-ce:genFixcast
Draft

Manual cast new syncd arg logic from master to 202605 (#2000)#2021
justin-wong-ce wants to merge 1 commit into
sonic-net:202605from
justin-wong-ce:genFixcast

Conversation

@justin-wong-ce

Copy link
Copy Markdown
Contributor

Manual casting PR #2000 from master to 202605 due to cherry-pick conflicts.

Description of PR

Summary:
Add an argument to syncd to toggle between the new per-port counter discovery feature in FlexCounter or to use the legacy method.

This is a part 1 of 2 fix in addressing sonic-net/sonic-buildimage#28460. There are two fix methods under consideration, this part is generic to both methods.

Fixes # (issue)
Partially Fixes sonic-net/sonic-buildimage#28460

Needs backport to 202605.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation update
  • Test improvement

Approach

What is the motivation for this PR?

In #1774 , a new counter support discovery method is introduced for being able to read counter support for platforms where different ports can have different capabilities.
The method worked well for some platforms, not so much for some others.

This change adds an argument to syncd so there is the capability to toggle the per-port counter discovery. The argument will default to false so the legacy code path is used by default.

Since there is now an option to toggle the code path on or off, there is no longer a need for a runtime fallback.

Work item tracking
  • Microsoft ADO (number only):

How did you do it?

Add an argument to syncd as well as the logic needed to read the argument in various files in syncd.
Unit tests are also updated to account for the new argument, as well as mocking the use of this argument for unit tests that only test for per-port discovery logic.

How did you verify/test it?

Unit tests passes on both master and with the change casted to 202605.
syncd is also able to boot on physical hardware and enter the expected code path based on whether the argument was provided for launch or not.

Any platform specific information?

Generic

Documentation

Casting from:
sonic-net#2000

Signed-off-by: Justin Wong <jvwong@arista.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@justin-wong-ce

Copy link
Copy Markdown
Contributor Author

Will makr PR as active when CI passes.

@justin-wong-ce

Copy link
Copy Markdown
Contributor Author

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1184108:

✅Stage Build:

  • Job amd64: retried.
  • Job amd64: retried.

✅Stage BuildAsan:

  • Job amd64: retried.

@justin-wong-ce

Copy link
Copy Markdown
Contributor Author

Weird, I can't reproduce the unit test failure locally. Need to take a further look.

@justin-wong-ce

Copy link
Copy Markdown
Contributor Author

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1184108:

✅Stage Build:

  • Job amd64: retried.
  • Job amd64: retried.

✅Stage BuildAsan:

  • Job amd64: retried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants