sonic-buildimage
sonic-buildimage copied to clipboard
[Chassis][Voq]update to add buffer_queue config on system ports
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan [email protected]
Why I did it
In the voq chassis the buffer_queue
configuration needs to be applied on system_port
instead of the sonic port.
This PR has the change to do this.
How I did it
Modify buffer_config.j2
to generate buffer_queue
configuration on system_ports if the device is Voq Chassis
How to verify it
Verify the buffer_queue
configuration is generated properly using sonic-cfggen
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
waiting for https://github.com/sonic-net/sonic-swss/pull/2465 to be merged first. swss module also needs to be updated, else it'd break.
@arlakshm https://github.com/sonic-net/sonic-swss/pull/2465 has been pushed. Also opened https://github.com/sonic-net/sonic-buildimage/pull/13130 Once this is in, we can push this PR as well.
Cherry-pick PR to 202205: https://github.com/sonic-net/sonic-buildimage/pull/13259
FYI - this PR breaks sonic-mgmt QoS tests when run against T2 VoQ chassis, as now the BUFFER_QUEUE_TABLE has keys based on the system port for the front panel port instead of just the front panel port as before. The failure occurs at https://github.com/sonic-net/sonic-mgmt/blob/master/tests/qos/qos_sai_base.py#L1346
With this change, a snip bit of the keys in the CONFIG database for BUFFER_QUEUE_TABLE are:
admin@ixre-egl-board3:~$ docker exec database0 redis-cli -n 0 keys "*BUFFER_QUEUE_TABLE*"
BUFFER_QUEUE_TABLE:ixre-egl-board3:asic1:Ethernet184:5-6
BUFFER_QUEUE_TABLE:ixre-egl-board3:asic0:Ethernet136:0-2
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic0:Ethernet80:0-2
BUFFER_QUEUE_TABLE:ixre-egl-board3:asic1:Ethernet272:0-2
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic0:Ethernet136:5-6
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic0:Ethernet88:0-2
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic1:Ethernet152:3-4
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic0:Ethernet56:5-6
BUFFER_QUEUE_TABLE:ixre-egl-board3:asic0:Ethernet16:0-2
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic0:Ethernet136:3-4
BUFFER_QUEUE_TABLE:ixre-egl-board4:asic1:Ethernet216:5-6
.
.
Is it safe to assume that the system ports would always have the format
We see the following errors from orchagent with this PR Jan 17 08:06:17.472675 ixre-egl-board3 ERR swss0#orchagent: :- getQueueConfigurations: Invalid BUFFER_QUEUE key: [ixre-egl-board4|asic0|Ethernet88|3-4]
The function FlexCounterOrch::getQueueConfiguration doesn't handle the system port map<string, FlexCounterQueueStates> FlexCounterOrch::getQueueConfigurations() { SWSS_LOG_ENTER();
map<string, FlexCounterQueueStates> queuesStateVector;
std::vector<std::string> portQueueKeys;
m_bufferQueueConfigTable.getKeys(portQueueKeys);
for (const auto& portQueueKey : portQueueKeys)
{
auto toks = tokenize(portQueueKey, '|');
if (toks.size() != 2)
{
SWSS_LOG_ERROR("Invalid BUFFER_QUEUE key: [%s]", portQueueKey.c_str());
continue;
}
auto configPortNames = tokenize(toks[0], ',');
auto configPortQueues = toks[1];
toks = tokenize(configPortQueues, '-');
Please wait for PR https://github.com/sonic-net/sonic-swss/pull/2618 to be available on 202205.
Please wait for PR https://github.com/sonic-net/sonic-swss/pull/2618 to be available on 202205.