orchagent/portsorch: fix Query ingress priority groups lists #4013
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Fix "Query ingress priority groups lists" for ASIC having "ingress priority groups"=0
in the orchagent/portsorchcpp:: initializePriorityGroupsBulk()
The case is on Board Nokia-7215(armhf) with ASIC Marvell-prestera AC3X
Why I did it
Nokia-7215 SWITCH creation failed by the ERROR:
<<sonic ERR swss#orchagent: :- initializePriorityGroupsBulk: Fail to get priority group list for port Ethernet0 rv:-23>>
How I verified it
Start Nokia-7215 board. SWSS and SYNCD containers are going Up-and-Down. Switch does not work.
Details if related
6441: SWSS_LOG_INFO("Get %d priority groups for port %s", attr.value.u32, port.m_alias.c_str());
--------------> attr.value.u32 = 0
6454: if (port.m_priority_group_ids.size() == 0)
continue;
no any bulker.add(port.m_port_id, attr);
portCount = 1
FAILURE is
for (size_t idx = 0; idx < portCount; idx++)
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Fail to get priority group list for port %s rv:%d", port.m_alias.c_str(), status);
handleSaiGetStatus(SAI_API_PORT, status);
throw runtime_error("PortsOrch initialization failure.");
}