-
Notifications
You must be signed in to change notification settings - Fork 275
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 to not miss the entire set of counters to be added in addObject for CounterContext::updateSupportedCount #1493
base: master
Are you sure you want to change the base?
Conversation
…::updateSupportedCounters
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Maybe we can set always_check_supported_counters to true for macsec counters? |
I thought of this approach, but from code I see it resets the current m_supportedCounters counter list -- which will not help, as it clears the existing list ?
|
Removing the check will cause it check supported counter each time adding an object. I am afraid it will cause performance degradation. Could you please add one more attribute like |
…ng the existing m_supportedCounters
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Added a new flag 'dont_clear_support_counter', do review |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
can you add a snippit of the macsec counters tests run on this change? thanks |
Fixes issue: sonic-net/sonic-buildimage#21232
In MACSEC there are two set of counters one for INGRESS another for EGRESS which gets mapped to the same COUNTER type - CounterType::MACSEC_SA ( https://github.com/sonic-net/sonic-swss/blob/c20902f3195b5bf8a941045e131aa1b863b69fd0/orchagent/macsecorch.cpp#L2145 )
In the releases after 202205 we started seeing this behavior where the MACSEC RX counters were missing as mentioned in the issue 21232. Further debugging pointed to issue seen after this PR : #1073 was merged.
In this case when macsec orch tries to addCounter for INGRESS SA after the EGRESS SA, and it don't go through as the m_supportedCounters is not empty.
For a fix I am removing the check in CounterContext::updateSupportedCount, which I think is ok as we anyways do a check later on in getSupportedCounters() API using isCounterSupported() before calling collectData()
sonic-sairedis/syncd/FlexCounter.cpp
Line 939 in 1684aec