@@ -125,6 +125,9 @@ def run_pfcwd_multi_node_test(api,
125125 speed_str = testbed_config .layer1 [0 ].speed
126126 speed_gbps = int (speed_str .split ('_' )[1 ])
127127
128+ """ Retrieve ASIC information for DUT """
129+ asic_type = duthost .facts ['asic_type' ]
130+
128131 __verify_results (rows = flow_stats ,
129132 speed_gbps = speed_gbps ,
130133 pause_flow_name = PAUSE_FLOW_NAME ,
@@ -136,7 +139,8 @@ def run_pfcwd_multi_node_test(api,
136139 data_pkt_size = DATA_PKT_SIZE ,
137140 trigger_pfcwd = trigger_pfcwd ,
138141 pause_port_id = port_id ,
139- tolerance = TOLERANCE_THRESHOLD )
142+ tolerance = TOLERANCE_THRESHOLD ,
143+ asic_type = asic_type )
140144
141145
142146def __data_flow_name (name_prefix , src_id , dst_id , prio ):
@@ -517,7 +521,8 @@ def __verify_results(rows,
517521 data_pkt_size ,
518522 trigger_pfcwd ,
519523 pause_port_id ,
520- tolerance ):
524+ tolerance ,
525+ asic_type ):
521526 """
522527 Verify if we get expected experiment results
523528
@@ -534,10 +539,15 @@ def __verify_results(rows,
534539 trigger_pfcwd (bool): if PFC watchdog is expected to be triggered
535540 pause_port_id (int): ID of the port to send PFC pause frames
536541 tolerance (float): maximum allowable deviation
542+ asic_type (str): asic_type information for DUT
537543
538544 Returns:
539545 N/A
540546 """
547+
548+ """ Check for whether DUT is a Mellanox device """
549+ is_mlnx_device = True if "mellanox" in asic_type .lower () else False
550+
541551 for row in rows :
542552 flow_name = row .name
543553 tx_frames = row .frames_tx
@@ -568,11 +578,16 @@ def __verify_results(rows,
568578 exp_test_flow_rx_pkts = test_flow_rate_percent / 100.0 * speed_gbps \
569579 * 1e9 * data_flow_dur_sec / 8.0 / data_pkt_size
570580
571- if trigger_pfcwd and \
572- (src_port_id == pause_port_id or dst_port_id == pause_port_id ):
581+ if trigger_pfcwd and dst_port_id == pause_port_id :
573582 """ Once PFC watchdog is triggered, it will impact bi-directional traffic """
574583 pytest_assert (tx_frames > rx_frames ,
575584 '{} should have dropped packets' .format (flow_name ))
585+
586+ elif trigger_pfcwd and src_port_id == pause_port_id :
587+ if is_mlnx_device :
588+ """ During a pfc storm with pfcwd triggered, Mellanox devices do not drop Rx packets """
589+ pytest_assert (tx_frames == rx_frames ,
590+ '{} should not have dropped packets for Mellanox device' .format (flow_name ))
576591
577592 elif not trigger_pfcwd and dst_port_id == pause_port_id :
578593 """ This test flow is delayed by PFC storm """
0 commit comments