Skip to content

Commit

Permalink
Update qos sai tests
Browse files Browse the repository at this point in the history
1. update qos sai test for sn5400 according to the two PRs below

  a.  sonic-net#9583
  b.  sonic-net#12848

2. To stabilize testQosSaiQSharedWatermark[single_asic-wm_q_shared_lossy], update margin from 4 to 5 for spc4

Change-Id: Ic3919a9123cd968fb9d89013687cf31791684208
  • Loading branch information
JibinBao committed Aug 30, 2024
1 parent 7b5156e commit 03cec90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/qos/files/mellanox/special_qos_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ qos_params:
pkts_num_margin: 7
wm_pg_shared_lossy:
packet_size: 600
pkts_num_margin: 5
wm_q_shared_lossy:
packet_size: 600
4 changes: 3 additions & 1 deletion tests/qos/qos_sai_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ def __getBufferProfile(self, request, dut_asic, os_version, table, port, priorit

# Update profile static threshold value if profile threshold is dynamic
if "dynamic_th" in list(bufferProfile.keys()):
if dut_asic.sonichost.facts['platform'] == "x86_64-nvidia_sn5600-r0":
platform_support_nvidia_new_algorithm_cal_buffer_thr = ["x86_64-nvidia_sn5600-r0",
"x86_64-nvidia_sn5400-r0"]
if dut_asic.sonichost.facts['platform'] in platform_support_nvidia_new_algorithm_cal_buffer_thr:
self.__compute_buffer_threshold_for_nvidia_device(dut_asic, table, port, bufferProfile)
else:
self.__computeBufferThreshold(dut_asic, bufferProfile)
Expand Down
2 changes: 1 addition & 1 deletion tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5051,7 +5051,7 @@ def runTest(self):

if pkts_num_fill_min:
assert (q_wm_res[queue] == 0)
elif 'cisco-8000' in asic_type or "SN5600" in hwsku:
elif 'cisco-8000' in asic_type or "SN5600" in hwsku or "SN5400" in hwsku:
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
else:
if platform_asic and platform_asic == "broadcom-dnx":
Expand Down

0 comments on commit 03cec90

Please sign in to comment.