Skip to content

Commit 66cef24

Browse files
committed
update qos sai lossy case for sn5600 and sn5610
1. For spc4, there is only lossy buffer, so the buffer for lossless buffer will be taken by lossy buffer, if the packet size is too small, the packet number sent to occupy the shared buffer will increase a lot, so it will lead that descriptor will be exhausted, so update testQosSaiPgSharedWatermark, testQosSaiQSharedWatermark and testQosSaiLossyQueue accordingly. 2. Remove the test config of scheduler.block_data_plane, otherwise it might rise yang validation error when do config reload 3. list the relevant Prs: sonic-net/sonic-buildimage#20992 sonic-net/sonic-buildimage#21056 sonic-net/sonic-buildimage#20991
1 parent 9dd47e0 commit 66cef24

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

tests/qos/files/mellanox/special_qos_config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ qos_params:
2727
xon_4:
2828
packet_size: 800
2929
lossy_queue_1:
30-
packet_size: 800
30+
packet_size: 1200
3131
wm_pg_shared_lossless:
3232
packet_size: 800
3333
pkts_num_margin: 7
3434
wm_pg_shared_lossy:
35-
packet_size: 800
36-
pkts_num_margin: 5
35+
packet_size: 1200
36+
pkts_num_margin: 8
3737
wm_q_shared_lossy:
38-
packet_size: 800
38+
packet_size: 1200

tests/saitests/py3/sai_base_test.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"5": "scheduler.0",
4545
"6": "scheduler.0",
4646
"7": ""}
47+
BLOCK_DATA_PLANE_SCHEDULER_NAME = 'scheduler.block_data_plane'
4748

4849

4950
class ThriftInterface(BaseTest):
@@ -238,16 +239,15 @@ def disable_mellanox_egress_data_plane(self, ptf_port_list):
238239
dut_port = self.get_dut_port(ptf_port)
239240
dut_port_list.append(dut_port)
240241
self.original_dut_port_queue_scheduler_map = self.get_queue_scheduler_name(dut_port_list)
241-
block_data_plane_scheduler_name = 'scheduler.block_data_plane'
242242
cmd_set_block_data_plane_scheduler = \
243-
f'sonic-db-cli CONFIG_DB hset "SCHEDULER|{block_data_plane_scheduler_name}" "type" DWRR "weight" 15 "pir" 1'
243+
f'sonic-db-cli CONFIG_DB hset "SCHEDULER|{BLOCK_DATA_PLANE_SCHEDULER_NAME}" "type" DWRR "weight" 15 "pir" 1'
244244

245245
self.exec_cmd_on_dut(self.server, self.test_params['dut_username'], self.test_params['dut_password'],
246246
cmd_set_block_data_plane_scheduler)
247247
for dut_port in dut_port_list:
248248
for q in DATA_PLANE_QUEUE_LIST:
249249
cmd_block_q = \
250-
f" sonic-db-cli CONFIG_DB hset 'QUEUE|{dut_port}|{q}' scheduler {block_data_plane_scheduler_name}"
250+
f" sonic-db-cli CONFIG_DB hset 'QUEUE|{dut_port}|{q}' scheduler {BLOCK_DATA_PLANE_SCHEDULER_NAME}"
251251
self.exec_cmd_on_dut(
252252
self.server, self.test_params['dut_username'], self.test_params['dut_password'], cmd_block_q)
253253

@@ -276,6 +276,20 @@ def enable_mellanox_egress_data_plane(self, ptf_port_list):
276276
self.exec_cmd_on_dut(
277277
self.server, self.test_params['dut_username'],
278278
self.test_params['dut_password'], cmd_recover_q_scheduler_config)
279+
self.remove_block_data_plan_scheduler()
280+
281+
def remove_block_data_plan_scheduler(self):
282+
get_block_data_plane_scheduler_name = \
283+
f"sonic-db-cli CONFIG_DB keys 'SCHEDULER|{BLOCK_DATA_PLANE_SCHEDULER_NAME}'"
284+
scheduler_name, _, _ = self.exec_cmd_on_dut(self.server,
285+
self.test_params['dut_username'],
286+
self.test_params['dut_password'],
287+
get_block_data_plane_scheduler_name)
288+
if isinstance(scheduler_name, list) and BLOCK_DATA_PLANE_SCHEDULER_NAME in scheduler_name[0]:
289+
cmd_del_block_data_plane_scheduler = \
290+
f'sonic-db-cli CONFIG_DB del "SCHEDULER|{BLOCK_DATA_PLANE_SCHEDULER_NAME}"'
291+
self.exec_cmd_on_dut(self.server, self.test_params['dut_username'], self.test_params['dut_password'],
292+
cmd_del_block_data_plane_scheduler)
279293

280294

281295
class ThriftInterfaceDataPlane(ThriftInterface):

tests/saitests/py3/sai_qos_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5193,7 +5193,7 @@ def runTest(self):
51935193
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
51945194
elif pkts_num_fill_min:
51955195
assert (q_wm_res[queue] == 0)
5196-
elif 'cisco-8000' in asic_type or "SN5600" in hwsku or "SN5400" in hwsku:
5196+
elif 'cisco-8000' in asic_type or "SN5600" in hwsku or "SN5400" in hwsku or "SN5610" in hwsku:
51975197
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
51985198
else:
51995199
if platform_asic and platform_asic == "broadcom-dnx":

0 commit comments

Comments
 (0)