Skip to content

Commit 1e4cb0c

Browse files
authored
Fix a test issue for the dualtor tunnel monitor for Nvidia platforms (#9625)
When the inner/outer dscps are 2/2 or 6/6, the packet is not mapped to queue according to the mapping configuration. And such packets are not expected in production, skip the queue check for them. Change-Id: I8f02d086d2f9eb010684e1ac41cf1abfe6ca2788
1 parent 7680edd commit 1e4cb0c

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

tests/common/devices/sonic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,9 @@ def get_asic_name(self):
17281728

17291729
return asic
17301730

1731+
def is_nvidia_platform(self):
1732+
return 'mellanox' == self.facts['asic_type']
1733+
17311734
def _get_platform_asic(self, platform):
17321735
platform_asic = os.path.join(
17331736
"/usr/share/sonic/device", platform, "platform_asic"

tests/common/dualtor/tunnel_traffic_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ def _disassemble_ip_tos(tos):
237237
inner_dscp, _ = _disassemble_ip_tos(inner_tos)
238238
logging.info("Outer packet DSCP: {0:06b}, inner packet DSCP: {1:06b}".format(outer_dscp, inner_dscp))
239239
check_res = []
240+
# For Nvidia platforms, queue check for outer/inner dscp 2/2 and 6/6 will fail due to the diversity
241+
# in dscp remapping. Since we don't expect such packets in production, skip the queue check in this case.
242+
if self.standby_tor.is_nvidia_platform():
243+
logging.info("Skip the queue check for inner/outer dscp 2/2 and 6/6 on Nvidia platforms.")
244+
if (inner_dscp, outer_dscp) in [(2, 2), (6, 6)]:
245+
return " ,".join(check_res)
240246
exp_queue = derive_queue_id_from_dscp(self.standby_tor, inner_dscp, True)
241247
logging.info("Expect queue: %s", exp_queue)
242248
if not wait_until(60, 5, 0, queue_stats_check, self.standby_tor, exp_queue, self.packet_count):

0 commit comments

Comments
 (0)