Skip to content

Commit 561b2c5

Browse files
committed
PR-13490-New-Snappi-PFC testcase for PFCWD
1 parent 2ea9c7e commit 561b2c5

File tree

3 files changed

+1151
-0
lines changed

3 files changed

+1151
-0
lines changed

tests/common/snappi_tests/common_helpers.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,26 @@ def start_pfcwd(duthost, asic_value=None):
762762
duthost.shell('sudo ip netns exec {} pfcwd start_default'.format(asic_value))
763763

764764

765+
def start_pfcwd_fwd(duthost, asic_value=None):
766+
"""
767+
Start PFC watchdog in Forward mode.
768+
Args:
769+
duthost (AnsibleHost): Device Under Test (DUT)
770+
asic_value: asic value of the host
771+
772+
Returns:
773+
N/A
774+
"""
775+
# Stopping PFCWD cleanly.
776+
stop_pfcwd(duthost, asic_value)
777+
778+
# Starting PFCWD in forward mode with detection and restoration duration of 200msec.
779+
if asic_value is None:
780+
duthost.shell('sudo pfcwd start --action forward 200 --restoration-time 200')
781+
else:
782+
duthost.shell('sudo ip netns exec {} pfcwd start --action forward 200 --restoration-time 200')
783+
784+
765785
def stop_pfcwd(duthost, asic_value=None):
766786
"""
767787
Stop PFC watchdog

0 commit comments

Comments
 (0)