diff --git a/tests/ip/test_ip_packet.py b/tests/ip/test_ip_packet.py index 9d12aa3ee79..ab47b2cc1f7 100644 --- a/tests/ip/test_ip_packet.py +++ b/tests/ip/test_ip_packet.py @@ -739,8 +739,11 @@ def test_drop_l3_ip_packet_non_dut_mac(self, duthosts, enum_rand_one_per_hwsku_f return pytest_assert(rx_ok >= self.PKT_NUM_MIN, "Received {} packets in rx, not in expected range".format(rx_ok)) - pytest_assert(rx_drp >= self.PKT_NUM_MIN, - "Dropped {} packets in rx, not in expected range".format(rx_drp)) + asic_type = duthost.facts["asic_type"] + # Packet is dropped silently on Mellanox platform if the destination MAC address is not the router MAC + if asic_type not in ["mellanox"]: + pytest_assert(rx_drp >= self.PKT_NUM_MIN, + "Dropped {} packets in rx, not in expected range".format(rx_drp)) pytest_assert(tx_ok <= self.PKT_NUM_ZERO, "Forwarded {} packets in tx, not in expected range".format(tx_ok)) pytest_assert(max(tx_drp, tx_rif_err) <= self.PKT_NUM_ZERO,