From 95b3b3536dc5539623186c948dbb763ee462b5cc Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:33:27 +0800 Subject: [PATCH] Support SAI_QUEUE_ATTR_TYPE on vs platform simulating MLNX2700 (#1459) Signed-off-by: Stephen Sun --- vslib/SwitchMLNX2700.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vslib/SwitchMLNX2700.cpp b/vslib/SwitchMLNX2700.cpp index 39994ec27..4ebdcba83 100644 --- a/vslib/SwitchMLNX2700.cpp +++ b/vslib/SwitchMLNX2700.cpp @@ -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); }