From c8c97dd28d8fcf82e095f1f02f6548f76ae4d7f2 Mon Sep 17 00:00:00 2001 From: r12f Date: Fri, 28 Feb 2025 18:47:01 +0000 Subject: [PATCH 1/2] Fix bad merge from PR #14 --- syncd/FlexCounter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncd/FlexCounter.cpp b/syncd/FlexCounter.cpp index 565b0260..3faa07a6 100644 --- a/syncd/FlexCounter.cpp +++ b/syncd/FlexCounter.cpp @@ -2344,7 +2344,7 @@ std::shared_ptr FlexCounter::createCounterContext( } else if (context_name == COUNTER_TYPE_POLICER) { - return std::make_shared>(context_name, SAI_OBJECT_TYPE_POLICER, m_vendorSai.get(), m_statsMode); + return std::make_shared>(context_name, instance, SAI_OBJECT_TYPE_POLICER, m_vendorSai.get(), m_statsMode); } SWSS_LOG_THROW("Invalid counter type %s", context_name.c_str()); From f669e97ca042f6fcd74853286caff1f67890f30c Mon Sep 17 00:00:00 2001 From: r12f Date: Fri, 28 Feb 2025 19:30:04 +0000 Subject: [PATCH 2/2] Fixing it again. --- syncd/FlexCounter.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/syncd/FlexCounter.cpp b/syncd/FlexCounter.cpp index 3faa07a6..c3ee27a6 100644 --- a/syncd/FlexCounter.cpp +++ b/syncd/FlexCounter.cpp @@ -2342,10 +2342,6 @@ std::shared_ptr FlexCounter::createCounterContext( { return std::make_shared>(context_name, instance, SAI_OBJECT_TYPE_POLICER, m_vendorSai.get(), m_statsMode); } - else if (context_name == COUNTER_TYPE_POLICER) - { - return std::make_shared>(context_name, instance, SAI_OBJECT_TYPE_POLICER, m_vendorSai.get(), m_statsMode); - } SWSS_LOG_THROW("Invalid counter type %s", context_name.c_str()); // GCC 8.3 requires a return value here