Skip to content

Commit

Permalink
orchagent: Handling switch with no priority group and queue (sonic-ne…
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan authored and stcheng committed Oct 1, 2016
1 parent 5264322 commit bdbe77c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@ void PortsOrch::initializeQueues(Port &port)

port.m_queue_ids.resize(attr.value.u32);

if (attr.value.u32 == 0)
{
return;
}

attr.id = SAI_PORT_ATTR_QOS_QUEUE_LIST;
attr.value.objlist.count = port.m_queue_ids.size();
attr.value.objlist.list = port.m_queue_ids.data();
Expand Down Expand Up @@ -635,6 +640,11 @@ void PortsOrch::initializePriorityGroups(Port &port)

port.m_priority_group_ids.resize(attr.value.u32);

if (attr.value.u32 == 0)
{
return;
}

attr.id = SAI_PORT_ATTR_PRIORITY_GROUP_LIST;
attr.value.objlist.count = port.m_priority_group_ids.size();
attr.value.objlist.list = port.m_priority_group_ids.data();
Expand Down

0 comments on commit bdbe77c

Please sign in to comment.