Skip to content

Commit

Permalink
sonic-mgmt: fix port toggle timeout on many ports (#15573)
Browse files Browse the repository at this point in the history
For topologies leveraging many ports, such as in
the case of t0-isolated-d128u128s2, the timeout
for non-mellanox fixed-chassis devices is a
static value and is too low for the number of
ports being configured.

In contrast, Mellanox devices use a timeout
proportional to the number of ports being
toggled. This change moves fixed-chassis
broadcom devices to use a proportional timeout
as well.
  • Loading branch information
ccroy-arista authored and mssonicbld committed Nov 21, 2024
1 parent a076557 commit 29bf36f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/common/port_toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,16 @@ def default_port_toggle_wait_time(duthost, port_count):
port_down_wait_time, port_up_wait_time = 120, 180
asic_type = duthost.facts["asic_type"]

if asic_type == "mellanox":
is_modular_chassis = duthost.get_facts().get("modular_chassis")

if (asic_type == "mellanox") or (asic_type == "broadcom" and not is_modular_chassis):
if port_count <= BASE_PORT_COUNT:
port_count = BASE_PORT_COUNT

port_count_factor = port_count / BASE_PORT_COUNT
port_down_wait_time = int(port_down_wait_time * port_count_factor)
port_up_wait_time = int(port_up_wait_time * port_count_factor)
elif duthost.get_facts().get("modular_chassis"):
elif is_modular_chassis:
port_down_wait_time = 300
port_up_wait_time = 300

Expand Down

0 comments on commit 29bf36f

Please sign in to comment.