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

Fix adding flex counter to wrong context #1421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

byu343
Copy link
Contributor

@byu343 byu343 commented Sep 18, 2024

The counters for syncd (switch chip) were attempted to be added to gbsyncd (gearbox phys), and vice versa.
This issue is introduced by #1362 When setting the redis attribute
SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER_GROUP and
SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER, the operation is applied to every contexts (both syncd and gbsyncd). However, the counters to initialize could only exist in one context.

The fix is to check that the target switch id exists in the context; if not, skip the operation.

Before the fix, we see the error below in syslog
ERR gbsyncd#syncd: :- processFlexCounterEvent: port VID oid:0x1000000000002, was not found (probably port was removed/splitted) and will remove from counters now

After the fix, on warning like below is printed:
WARNING swss#orchagent: :- containsSwitch: context phys failed to find switch oid:0x21000000000000

The counters for syncd (switch chip) were attempted to be added to
gbsyncd (gearbox phys), and vice versa.
This issue is introduced by
sonic-net#1362
When setting the redis attribute
SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER_GROUP and
SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER, the operation is applied to every
contexts (both syncd and gbsyncd). However, the counters to initialize
could only exist in one context.

The fix is to check that the target switch id exists in the context; if
not, skip the operation.
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.

1 participant