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 to not miss the entire set of counters to be added in addObject for CounterContext::updateSupportedCount #1493

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion syncd/FlexCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ class CounterContext : public BaseCounterContext
return;
}

if (always_check_supported_counters)
if (always_check_supported_counters && !dont_clear_support_counter)
{
m_supportedCounters.clear();
}
Expand Down Expand Up @@ -1663,7 +1663,9 @@ std::shared_ptr<BaseCounterContext> FlexCounter::createCounterContext(
else if (context_name == COUNTER_TYPE_MACSEC_SA)
{
auto context = std::make_shared<CounterContext<sai_macsec_sa_stat_t>>(context_name, SAI_OBJECT_TYPE_MACSEC_SA, m_vendorSai.get(), m_statsMode);
context->always_check_supported_counters = true;
context->use_sai_stats_capa_query = false;
context->dont_clear_support_counter = true;
return context;
}
else if (context_name == COUNTER_TYPE_FLOW)
Expand Down
1 change: 1 addition & 0 deletions syncd/FlexCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace syncd
bool use_sai_stats_ext = false;
bool double_confirm_supported_counters = false;
bool no_double_check_bulk_capability = false;
bool dont_clear_support_counter = false;
};
class FlexCounter
{
Expand Down
Loading