Skip to content

Commit

Permalink
route_perf: Fix destination mac for multi asic (sonic-net#15632)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranepbhagyashree authored Nov 22, 2024
1 parent 61da28e commit f041561
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/route/test_route_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,12 @@ def test_perf_add_remove_routes(
if ip_versions == 4:
ip_dst = generate_ips(1, dst_nw, [])
send_and_verify_traffic(
duthost, ptfadapter, tbinfo, ip_dst, ptf_dst_ports, ptf_src_port
asichost, duthost, ptfadapter, tbinfo, ip_dst, ptf_dst_ports, ptf_src_port
)
else:
ip_dst = dst_nw.split("/")[0] + "1"
send_and_verify_traffic(
asichost,
duthost,
ptfadapter,
tbinfo,
Expand All @@ -366,11 +367,11 @@ def test_perf_add_remove_routes(


def send_and_verify_traffic(
duthost, ptfadapter, tbinfo, ip_dst, expected_ports, ptf_src_port, ipv6=False
asichost, duthost, ptfadapter, tbinfo, ip_dst, expected_ports, ptf_src_port, ipv6=False
):
if ipv6:
pkt = testutils.simple_tcpv6_packet(
eth_dst=duthost.facts["router_mac"],
eth_dst=asichost.get_router_mac().lower(),
eth_src=ptfadapter.dataplane.get_mac(0, ptf_src_port),
ipv6_src="2001:db8:85a3::8a2e:370:7334",
ipv6_dst=ip_dst,
Expand All @@ -380,7 +381,7 @@ def send_and_verify_traffic(
)
else:
pkt = testutils.simple_tcp_packet(
eth_dst=duthost.facts["router_mac"],
eth_dst=asichost.get_router_mac().lower(),
eth_src=ptfadapter.dataplane.get_mac(0, ptf_src_port),
ip_src="1.1.1.1",
ip_dst=ip_dst,
Expand Down

0 comments on commit f041561

Please sign in to comment.