sonic-swss
sonic-swss copied to clipboard
CounterCheckOrch should be in sync with FlexCounterOrch
For port counters, flex counters need to be enabled to have the counters. If not, the CounterCheckOrch will keep printing warning logs about could not receive counters.
There are 4 functions that add a port into the CounterCheckOrch. They are generateQueueMapPerPort, createPortBufferQueueCounters, generatePriorityGroupMapPerPort, and createPortBufferPgCounters: https://github.com/sonic-net/sonic-swss/blob/644b227abea6ccea9b1d04e0e8d8060fe7962517/orchagent/portsorch.cpp#L6608 https://github.com/sonic-net/sonic-swss/blob/644b227abea6ccea9b1d04e0e8d8060fe7962517/orchagent/portsorch.cpp#L6823 https://github.com/sonic-net/sonic-swss/blob/644b227abea6ccea9b1d04e0e8d8060fe7962517/orchagent/portsorch.cpp#L6940 https://github.com/sonic-net/sonic-swss/blob/644b227abea6ccea9b1d04e0e8d8060fe7962517/orchagent/portsorch.cpp#L6989
Amount those functions, only two of them add the port to FlexCounterOrch: createPortBufferQueueCounters and createPortBufferPgCounters.
We should make CounterCheckOrch and FlexCounterOrch to be in sync.