You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue appears to be in current approach: the queue watermark counters are only generated when a specific key is passed to FlexCounter orch.
This means that enabling watermark group won't actually enable the relevant counters but only when a stats for queue is requested.
elseif(field == FLEX_COUNTER_STATUS_FIELD)
{
// Currently, the counters are disabled for polling by default// The queue maps will be generated as soon as counters are enabled for polling// Counter polling is enabled by pushing the COUNTER_ID_LIST/ATTR_ID_LIST, which contains// the list of SAI stats/attributes of polling interest, to the FLEX_COUNTER_DB under the// additional condition that the polling interval at that time is set nonzero positive,// which is automatically satisfied upon the creation of the orch object that requires// the syncd flex counter polling service// This postponement is introduced by design to accelerate the initialization processif(gPortsOrch && (value == "enable"))
{
if(key == PORT_KEY)
{
gPortsOrch->generatePortCounterMap();
m_port_counter_enabled = true;
}
elseif(key == PORT_BUFFER_DROP_KEY)
{
gPortsOrch->generatePortBufferDropCounterMap();
m_port_buffer_drop_counter_enabled = true;
}
elseif(key == QUEUE_KEY)
{
gPortsOrch->generateQueueMap();
}
elseif(key == PG_WATERMARK_KEY)
{
gPortsOrch->generatePriorityGroupMap();
}
}
if(gIntfsOrch && (key == RIF_KEY) && (value == "enable"))
{
gIntfsOrch->generateInterfaceMap();
}
if (gBufferOrch && (key == BUFFER_POOL_WATERMARK_KEY) && (value == "enable"))
{
gBufferOrch->generateBufferPoolWatermarkCounterIdList();
}
if (gFabricPortsOrch)
{
gFabricPortsOrch->generateQueueStats();
}
if (vxlan_tunnel_orch && (key== TUNNEL_KEY) && (value == "enable"))
{
vxlan_tunnel_orch->generateTunnelCounterMap();
}
if (gCoppOrch && (key == FLOW_CNT_TRAP_KEY))
{
if (value == "enable")
{
m_hostif_trap_counter_enabled = true;
gCoppOrch->generateHostIfTrapCounterIdList();
}
elseif (value == "disable")
{
gCoppOrch->clearHostIfTrapCounterIdList();
m_hostif_trap_counter_enabled = false;
}
}
vector<FieldValueTuple> fieldValues;
fieldValues.emplace_back(FLEX_COUNTER_STATUS_FIELD, value);
m_flexCounterGroupTable->set(flexCounterGroupMap[key], fieldValues);
}
Queue Watermark Counter map is generated only when user requests a stats for all queues:
The table related to QUEUE_WATERMARK is not generated. However, once we enable queue (sudo counterpoll queue enable), the tables related to QUEUE_WATERMARK can be created.
Describe the results you received:
The tables related to QUEUE_WATERMARK counter are not generated on WATERMARK enable
Describe the results you expected:
The tables related to QUEUE_WATERMARK counter should be generated on WATERMARK enable
Output of show version:
(paste your output here)
Output of show techsupport:
(paste your output here or download and attach the file here )
Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered:
This PR fixes the following issue:
sonic-net/sonic-buildimage#11219
It's a cherry-pick (with conflicts resolution) for 202205 of the following PR: #2525
- What I did
Align watermark flow with port configuration
correct the queue, watermark and pg-drop counterpoll functionality according to cli commands
- Why I did it
the flow before this commit was wrong, when watermark counterpoll was enabled, stats wasn't created in FLEX_COUNTERS_DB
and COUNTERS_DB unless enabling queue counterpoll as well.
in the same way when pg-drop counterpoll was enabled stats weren't added until watermark was enabled.
This is due to the wrong flow where queue and pg maps were generated only when queue or watermark (pg-watermark)
key was detected in flexcountersorch.cpp
- How I verified it
manual testing
VS test (updated to reflect current flow) - before this commit only queue was tested
regression test
Description
The issue appears to be in current approach: the queue watermark counters are only generated when a specific key is passed to FlexCounter orch.
This means that enabling watermark group won't actually enable the relevant counters but only when a stats for queue is requested.
root@sonic:/home/admin# counterpoll watermark enable
https://github.com/Azure/sonic-utilities/blob/202111/counterpoll/main.py#L223
https://github.com/Azure/sonic-swss/blob/202111/orchagent/flexcounterorch.cpp#L118
Queue Watermark Counter map is generated only when user requests a stats for all queues:
root@sonic:/home/admin# counterpoll queue enable
https://github.com/Azure/sonic-swss/blob/202111/orchagent/portsorch.cpp#L5394
Steps to reproduce the issue:
admin@sonic:~$ sudo counterpoll config-db disable
admin@sonic:~$ sudo reboot
The table related to QUEUE_WATERMARK is not generated. However, once we enable queue (
sudo counterpoll queue enable
), the tables related to QUEUE_WATERMARK can be created.Describe the results you received:
The tables related to QUEUE_WATERMARK counter are not generated on WATERMARK enable
Describe the results you expected:
The tables related to QUEUE_WATERMARK counter should be generated on WATERMARK enable
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: