@@ -2831,6 +2831,14 @@ void processFlexCounterGroupEvent(
2831
2831
FlexCounter::addPortCounterPlugin (sha, groupName);
2832
2832
}
2833
2833
}
2834
+ else if (field == BUFFER_POOL_PLUGIN_FIELD)
2835
+ {
2836
+ auto shaStrings = swss::tokenize (value, ' ,' );
2837
+ for (const auto &sha : shaStrings)
2838
+ {
2839
+ FlexCounter::addBufferPoolCounterPlugin (sha, groupName);
2840
+ }
2841
+ }
2834
2842
else if (field == FLEX_COUNTER_STATUS_FIELD)
2835
2843
{
2836
2844
FlexCounter::updateFlexCounterStatus (value, groupName);
@@ -2894,6 +2902,10 @@ void processFlexCounterEvent(
2894
2902
{
2895
2903
FlexCounter::removeRif (vid, groupName);
2896
2904
}
2905
+ else if (objectType == SAI_OBJECT_TYPE_BUFFER_POOL)
2906
+ {
2907
+ FlexCounter::removeBufferPool (vid, groupName);
2908
+ }
2897
2909
else
2898
2910
{
2899
2911
SWSS_LOG_ERROR (" Object type for removal not supported, %s" , objectTypeStr.c_str ());
@@ -2919,6 +2931,7 @@ void processFlexCounterEvent(
2919
2931
sai_deserialize_port_stat (str.c_str (), &stat);
2920
2932
portCounterIds.push_back (stat);
2921
2933
}
2934
+
2922
2935
FlexCounter::setPortCounterList (vid, rid, groupName, portCounterIds);
2923
2936
}
2924
2937
else if (objectType == SAI_OBJECT_TYPE_QUEUE && field == QUEUE_COUNTER_ID_LIST)
@@ -2930,6 +2943,7 @@ void processFlexCounterEvent(
2930
2943
sai_deserialize_queue_stat (str.c_str (), &stat);
2931
2944
queueCounterIds.push_back (stat);
2932
2945
}
2946
+
2933
2947
FlexCounter::setQueueCounterList (vid, rid, groupName, queueCounterIds);
2934
2948
}
2935
2949
else if (objectType == SAI_OBJECT_TYPE_QUEUE && field == QUEUE_ATTR_ID_LIST)
@@ -2953,6 +2967,7 @@ void processFlexCounterEvent(
2953
2967
sai_deserialize_ingress_priority_group_stat (str.c_str (), &stat);
2954
2968
pgCounterIds.push_back (stat);
2955
2969
}
2970
+
2956
2971
FlexCounter::setPriorityGroupCounterList (vid, rid, groupName, pgCounterIds);
2957
2972
}
2958
2973
else if (objectType == SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP && field == PG_ATTR_ID_LIST)
@@ -2976,8 +2991,21 @@ void processFlexCounterEvent(
2976
2991
sai_deserialize_router_interface_stat (str.c_str (), &stat);
2977
2992
rifCounterIds.push_back (stat);
2978
2993
}
2994
+
2979
2995
FlexCounter::setRifCounterList (vid, rid, groupName, rifCounterIds);
2980
2996
}
2997
+ else if (objectType == SAI_OBJECT_TYPE_BUFFER_POOL && field == BUFFER_POOL_COUNTER_ID_LIST)
2998
+ {
2999
+ std::vector<sai_buffer_pool_stat_t > bufferPoolCounterIds;
3000
+ for (const auto &str : idStrings)
3001
+ {
3002
+ sai_buffer_pool_stat_t stat;
3003
+ sai_deserialize_buffer_pool_stat (str, stat);
3004
+ bufferPoolCounterIds.push_back (stat);
3005
+ }
3006
+
3007
+ FlexCounter::setBufferPoolCounterList (vid, rid, groupName, bufferPoolCounterIds);
3008
+ }
2981
3009
else
2982
3010
{
2983
3011
SWSS_LOG_ERROR (" Object type and field combination is not supported, object type %s, field %s" , objectTypeStr.c_str (), field.c_str ());
0 commit comments