Skip to content

Commit

Permalink
Support SAI_QUEUE_ATTR_TYPE on vs platform simulating MLNX2700 (sonic…
Browse files Browse the repository at this point in the history
…-net#1459)

Signed-off-by: Stephen Sun <[email protected]>
  • Loading branch information
stephenxs authored and mssonicbld committed Dec 4, 2024
1 parent 0bd015e commit 57eb749
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vslib/SwitchMLNX2700.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ sai_status_t SwitchMLNX2700::create_qos_queues_per_port(
{
sai_object_id_t queue_id;

sai_attribute_t attr[2];
sai_attribute_t attr[3];

attr[0].id = SAI_QUEUE_ATTR_INDEX;
attr[0].value.u8 = (uint8_t)i;
attr[1].id = SAI_QUEUE_ATTR_PORT;
attr[1].value.oid = port_id;
attr[2].id = SAI_QUEUE_ATTR_TYPE;
attr[2].value.s32 = (i < port_qos_queues_count / 2) ? SAI_QUEUE_TYPE_UNICAST : SAI_QUEUE_TYPE_MULTICAST;

// TODO add type

CHECK_STATUS(create(SAI_OBJECT_TYPE_QUEUE, &queue_id, m_switch_id, 2, attr));
CHECK_STATUS(create(SAI_OBJECT_TYPE_QUEUE, &queue_id, m_switch_id, 3, attr));

queues.push_back(queue_id);
}
Expand Down

0 comments on commit 57eb749

Please sign in to comment.