Skip to content

Commit 67629fe

Browse files
vkjammala-aristagshemesh2
authored andcommitted
[snappi-T2] Fix pfcwd/test_pfcwd_actions.py to consider asic value (sonic-net#19592)
Description of PR Summary: [snappi-T2] Fix pfcwd/test_pfcwd_actions.py to consider asic value Fixes # sonic-net#19591 Type of change Bug fix Testbed and Framework(new/improvement) New Test case Skipped for non-supported platforms Test case improvement Back port request 202205 202305 202311 202405 202411 202505 msft-202405 Approach What is the motivation for this PR? Helper method run_pfc_test is not passing asic_value of the port for enabling/disabling of pfcwd on the dut. This causes config to be not applied for multi-asic devices, where config command needs to be run on asic namespace. And test is failing with No Tx PFCs from DUT after receiving PFCs. How did you do it? Updated helper method to pass asic_value correctly. How did you verify/test it? Test is passing with the fix. co-authorized by: jianquanye@microsoft.com Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
1 parent 447850c commit 67629fe

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

tests/snappi_tests/pfcwd/files/pfcwd_actions_helper.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,24 @@ def run_pfc_test(api,
100100

101101
pytest_assert(testbed_config is not None, 'Fail to get L2/3 testbed config')
102102

103+
rx_port_asic_value = rx_port['asic_value'] if egress_duthost.is_multi_asic else None
104+
tx_port_asic_value = tx_port['asic_value'] if ingress_duthost.is_multi_asic else None
103105
if (test_def['enable_pfcwd_drop']):
104-
start_pfcwd(egress_duthost)
105-
start_pfcwd(ingress_duthost)
106+
start_pfcwd(egress_duthost, rx_port_asic_value)
107+
start_pfcwd(ingress_duthost, tx_port_asic_value)
106108
elif (test_def['enable_pfcwd_fwd']):
107-
start_pfcwd_fwd(egress_duthost)
108-
start_pfcwd_fwd(ingress_duthost)
109+
start_pfcwd_fwd(egress_duthost, rx_port_asic_value)
110+
start_pfcwd_fwd(ingress_duthost, tx_port_asic_value)
109111
else:
110-
stop_pfcwd(egress_duthost)
111-
stop_pfcwd(ingress_duthost)
112+
stop_pfcwd(egress_duthost, rx_port_asic_value)
113+
stop_pfcwd(ingress_duthost, tx_port_asic_value)
112114

113115
if (test_def['enable_credit_wd']):
114-
enable_packet_aging(egress_duthost, rx_port['asic_value'])
115-
enable_packet_aging(ingress_duthost, tx_port['asic_value'])
116+
enable_packet_aging(egress_duthost, rx_port_asic_value)
117+
enable_packet_aging(ingress_duthost, tx_port_asic_value)
116118
else:
117-
disable_packet_aging(egress_duthost, rx_port['asic_value'])
118-
disable_packet_aging(ingress_duthost, tx_port['asic_value'])
119+
disable_packet_aging(egress_duthost, rx_port_asic_value)
120+
disable_packet_aging(ingress_duthost, tx_port_asic_value)
119121

120122
rx_port_id = 0
121123

0 commit comments

Comments
 (0)