Skip to content

Commit 11e918f

Browse files
ansrajpu-gitwangxin
authored andcommitted
DscpToPgMapping qos test fails intermittently due to tcp/lacp messages received (#7236)
* Changes for DscpToPgMapping Qos_test * replaced conditional statement with parameter name
1 parent d16a7d8 commit 11e918f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/saitests/py3/sai_qos_tests.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ def runTest(self):
600600
src_port_ip = self.test_params['src_port_ip']
601601
src_port_mac = self.dataplane.get_mac(0, src_port_id)
602602
dscp_to_pg_map = self.test_params.get('dscp_to_pg_map', None)
603+
pkt_dst_mac = router_mac if router_mac != '' else dst_port_mac
603604

604605
print("dst_port_id: %d, src_port_id: %d" %
605606
(dst_port_id, src_port_id), file=sys.stderr)
@@ -631,6 +632,9 @@ def runTest(self):
631632
pg_dscp_map[int(pg)] = [int(dscp)]
632633

633634
print(pg_dscp_map, file=sys.stderr)
635+
dst_port_id = get_rx_port(
636+
self, 0, src_port_id, pkt_dst_mac, dst_port_ip, src_port_ip)
637+
print("actual dst_port_id: %d" % (dst_port_id), file=sys.stderr)
634638

635639
try:
636640
for pg, dscps in list(pg_dscp_map.items()):
@@ -641,8 +645,8 @@ def runTest(self):
641645
for dscp in dscps:
642646
tos = (dscp << 2)
643647
tos |= 1
644-
pkt = simple_tcp_packet(pktlen=64,
645-
eth_dst=router_mac if router_mac != '' else dst_port_mac,
648+
pkt = simple_ip_packet(pktlen=64,
649+
eth_dst=pkt_dst_mac,
646650
eth_src=src_port_mac,
647651
ip_src=src_port_ip,
648652
ip_dst=dst_port_ip,

0 commit comments

Comments
 (0)