-
Notifications
You must be signed in to change notification settings - Fork 331
Fix duplicate port error in FlexCounter bulk stats collection #1681
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
base: master
Are you sure you want to change the base?
Fix duplicate port error in FlexCounter bulk stats collection #1681
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@kperumalbfn , could you please help to review? |
| auto vid = vids[i]; | ||
| auto rid = rids[i]; | ||
|
|
||
| if (ctx.object_vids_set.find(vid) != ctx.object_vids_set.end()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidZagury What are the cases duplicate object-ids present in the bulk set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kperumalbfn,
We saw the duplication on a few tests such as test_pfcwd_status, test_pfcwd_interval and test_fdb
I believe there were always duplication - there is nothing stopping that from happening. But, in new version of SAI/SDK in NVIDIA switches there is a new error line regarding this.
b2c4b0b to
0e5ee8a
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0e5ee8a to
f1e81be
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
When PFC Watchdog or other features start collecting bulk statistics, duplicate ports can be added to the bulk stats context Root Cause: ----------- The addBulkStatsContext() functions did not check for duplicate VIDs before adding objects to the bulk context. The object_vids vector could contain the same VID multiple times, leading to duplicate RIDs being passed to the SAI bulk stats API. Solution: --------- 1. Added object_vids_set (unordered_set) to BulkStatsContext 2. Modified both addBulkStatsContext() overloads to check the set before adding new objects 3. Updated removeBulkStatsContext() to maintain set consistency Signed-off-by: david.zagury <[email protected]>
Signed-off-by: david.zagury <[email protected]>
f1e81be to
ec60958
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
When PFC Watchdog or other features start collecting bulk statistics, duplicate ports can be added to the bulk stats context
Root Cause:
The addBulkStatsContext() functions did not check for duplicate VIDs before adding objects to the bulk context. The object_vids vector could contain the same VID multiple times, leading to duplicate RIDs being passed to the SAI bulk stats API.
Solution: