Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/pfcwd/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from tests.common.fixtures.ptfhost_utils import change_mac_addresses # noqa F401
from tests.common.fixtures.ptfhost_utils import pause_garp_service # noqa F401
from tests.common.mellanox_data import is_mellanox_device as isMellanoxDevice
from tests.common.cisco_data import is_cisco_device
from .files.pfcwd_helper import TrafficPorts, set_pfc_timers, select_test_ports
from tests.common.utilities import str2bool

Expand Down Expand Up @@ -75,7 +76,8 @@ def fake_storm(request, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
fake_storm: False/True
"""
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
return request.config.getoption('--fake-storm') if not isMellanoxDevice(duthost) else False
return False if (isMellanoxDevice(duthost) or is_cisco_device(duthost)) \
else request.config.getoption('--fake-storm')


def update_t1_test_ports(duthost, mg_facts, test_ports, tbinfo):
Expand Down
5 changes: 3 additions & 2 deletions tests/pfcwd/test_pfcwd_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ def storm_detect_path(self, dut, port, action):
test_ports_info = {self.pfc_wd['rx_port'][0]: self.pfc_wd}
queues = [self.storm_hndle.pfc_queue_idx]

if dut.facts['asic_type'] == "mellanox":
extra_pfc_storm_timeout_needed = dut.facts['asic_type'] in ["mellanox", "cisco-8000"]
if extra_pfc_storm_timeout_needed:
PFC_STORM_TIMEOUT = 30
pfcwd_stats_before_test = check_pfc_storm_state(dut, port, self.storm_hndle.pfc_queue_idx)

Expand All @@ -743,7 +744,7 @@ def storm_detect_path(self, dut, port, action):
if self.pfc_wd['fake_storm']:
PfcCmd.set_storm_status(dut, self.queue_oid, "enabled")

if dut.facts['asic_type'] in ["mellanox", "cisco-8000"]:
if extra_pfc_storm_timeout_needed:
# On Mellanox platform, more time is required for PFC storm being triggered
# as PFC pause sent from Non-Mellanox leaf fanout is not continuous sometimes.
pytest_assert(wait_until(PFC_STORM_TIMEOUT, 2, 0,
Expand Down
Loading