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

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option #1437

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

stephenxs
Copy link
Contributor

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

  1. Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
  2. Generate CLI options to syncd
  3. Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization

Copy link
Collaborator

@kcudnik kcudnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

syncd/CommandLineOptions.cpp Outdated Show resolved Hide resolved
syncd/FlexCounter.cpp Outdated Show resolved Hide resolved
syncd/FlexCounter.cpp Show resolved Hide resolved
syncd/FlexCounter.cpp Outdated Show resolved Hide resolved
syncd/FlexCounter.cpp Outdated Show resolved Hide resolved
syncd/FlexCounter.h Outdated Show resolved Hide resolved
syncd/FlexCounter.h Outdated Show resolved Hide resolved
syncd/FlexCounter.h Outdated Show resolved Hide resolved
@stephenxs stephenxs requested a review from kcudnik October 21, 2024 04:13
@stephenxs stephenxs requested a review from kcudnik October 21, 2024 07:44
kcudnik
kcudnik previously approved these changes Oct 21, 2024
@stephenxs stephenxs force-pushed the not-poll-bulk-init branch 2 times, most recently from 67b848a to 8e61f47 Compare October 22, 2024 02:07
@kcudnik
Copy link
Collaborator

kcudnik commented Oct 23, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Contributor Author

@kcudnik I added UT to meet coverage.

@stephenxs
Copy link
Contributor Author

UT failed due to a conflict with another PR. Fixing.

@stephenxs
Copy link
Contributor Author

Same infra issue as that in another PR

vslib/.libs'
+ for dir in ${gcov_dirs}
++ dirname common/.libs
+ source_dir=common
+ output_file=coverage-common.json
+ gcovr --exclude-unreachable-branches --json-pretty -o coverage-common.json --object-directory common common/.libs
+ for dir in ${gcov_dirs}
++ dirname common/c-api/.libs
+ source_dir=common/c-api
+ output_file=coverage-common/c-api.json
+ gcovr --exclude-unreachable-branches --json-pretty -o coverage-common/c-api.json --object-directory common/c-api common/c-api/.libs
usage: gcovr [options] [search_paths...]
gcovr: error: argument -o/--output: Could not create output file 'coverage-common/c-api.json': No such file or directory

@kcudnik kcudnik merged commit c4aea50 into sonic-net:master Nov 7, 2024
18 checks passed
@stephenxs stephenxs deleted the not-poll-bulk-init branch November 7, 2024 08:38
stephenxs added a commit to stephenxs/sonic-sairedis that referenced this pull request Nov 12, 2024
…hat support bulk per CLI option (sonic-net#1437)

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
Generate CLI options to syncd
Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization
@bingwang-ms
Copy link
Contributor

@kcudnik Can you please confirm if this PR is required for 202405?

@kcudnik
Copy link
Collaborator

kcudnik commented Nov 21, 2024

@bingwang-ms please ask @stephenxs to confirm

@stephenxs
Copy link
Contributor Author

@bingwang-ms please ask @stephenxs to confirm

Yes, we need it in 202405. @bingwang-ms

mssonicbld pushed a commit to mssonicbld/sonic-sairedis that referenced this pull request Dec 2, 2024
…hat support bulk per CLI option (sonic-net#1437)

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
Generate CLI options to syncd
Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #1478

mssonicbld pushed a commit that referenced this pull request Dec 3, 2024
…hat support bulk per CLI option (#1437)

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
Generate CLI options to syncd
Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization
shiraez pushed a commit to Marvell-switching/sonic-sairedis that referenced this pull request Dec 12, 2024
…hat support bulk per CLI option (sonic-net#1437)

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
Generate CLI options to syncd
Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization
shiraez pushed a commit to Marvell-switching/sonic-sairedis that referenced this pull request Dec 12, 2024
…hat support bulk per CLI option (sonic-net#1437)

Do not poll counters in bulk mode during initialization for objects that support bulk per CLI option

Read the counter groups that support bulk mode from CONFIG_DB.DEVICE_METADATA|localhost.supporting_bulk_counter_groups
Generate CLI options to syncd
Based on CLI options syncd records the counter groups that support bulk mode. For those objects, we do not need to poll them in bulk mode during initialization
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.

5 participants