Skip to content

Commit

Permalink
Use WRED red for DNX (#15126)
Browse files Browse the repository at this point in the history
Description of PR
Braodcom DNX only supports WRED red. So update test accordingly.

snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
-------------------------------- live log call ---------------------------------
05:51:48 snappi_api.warning L1138 WARNING| Capture was not stopped for this port Port 0
FAILED [100%]

syntax error is fixed. Okay to merge. The new failure E       Failed: Only capture 0/101 IP packets. is a different issue. that can be handled in another PR.

co-authorized by: jianquanye@microsoft.com
  • Loading branch information
ysmanman authored and mssonicbld committed Jan 2, 2025
1 parent ba65678 commit 04e565e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/common/snappi_tests/common_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,20 +472,20 @@ def config_wred(host_ans, kmin, kmax, pmax, profile=None, asic_value=None):

color = 'green'

# Broadcom ASIC only supports RED.
if asic_type == 'broadcom':
# Broadcom DNX ASIC only supports RED.
if "platform_asic" in host_ans.facts and host_ans.facts["platform_asic"] == "broadcom-dnx":
color = 'red'

kmax_arg = '-{}max' % color[0]
kmin_arg = '-{}min' % color[0]
kmax_arg = '-{}max'.format(color[0])
kmin_arg = '-{}min'.format(color[0])

for p in profiles:
""" This is not the profile to configure """
if profile is not None and profile != p:
continue

kmin_old = int(profiles[p]['{}_min_threshold' % color])
kmax_old = int(profiles[p]['{}_max_threshold' % color])
kmin_old = int(profiles[p]['{}_min_threshold'.format(color)])
kmax_old = int(profiles[p]['{}_max_threshold'.format(color)])

if kmin_old > kmax_old:
return False
Expand Down

0 comments on commit 04e565e

Please sign in to comment.