Skip to content

Commit d3fa0a3

Browse files
authored
Merge pull request sonic-net#3 from r12f/code-sync-202412
[202412] Code sync sonic-net/sonic-sairedis:202411 => 202412
2 parents d3f22dd + 00a788f commit d3fa0a3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

syncd/FlexCounter.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ class CounterContext : public BaseCounterContext
865865
return;
866866
}
867867

868-
if (always_check_supported_counters)
868+
if (always_check_supported_counters && !dont_clear_support_counter)
869869
{
870870
m_supportedCounters.clear();
871871
}
@@ -1663,7 +1663,9 @@ std::shared_ptr<BaseCounterContext> FlexCounter::createCounterContext(
16631663
else if (context_name == COUNTER_TYPE_MACSEC_SA)
16641664
{
16651665
auto context = std::make_shared<CounterContext<sai_macsec_sa_stat_t>>(context_name, SAI_OBJECT_TYPE_MACSEC_SA, m_vendorSai.get(), m_statsMode);
1666+
context->always_check_supported_counters = true;
16661667
context->use_sai_stats_capa_query = false;
1668+
context->dont_clear_support_counter = true;
16671669
return context;
16681670
}
16691671
else if (context_name == COUNTER_TYPE_FLOW)

syncd/FlexCounter.h

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ namespace syncd
5959
bool use_sai_stats_ext = false;
6060
bool double_confirm_supported_counters = false;
6161
bool no_double_check_bulk_capability = false;
62+
bool dont_clear_support_counter = false;
6263
};
6364
class FlexCounter
6465
{

0 commit comments

Comments
 (0)