Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use asichost mac when DUT is multi-asic system #15682

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/route/test_route_flap.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@ def test_route_flap(duthosts, tbinfo, ptfhost, ptfadapter,
# On dual-tor, vlan mac is different with dut_mac. U0/L0 use same vlan mac for AR response
# On single tor, vlan mac (if exists) is same as dut_mac
dut_mac = duthost.facts['router_mac']
# Each Asic has different MAC in multi-asic system. Traffic should be sent with asichost DMAC
# in multi-asic scenarios
if duthost.is_multi_asic:
dut_mac = asichost.get_router_mac().lower()

vlan_mac = ""
if is_dualtor(tbinfo):
# Just let it crash if missing vlan configs on dual-tor
Expand Down Expand Up @@ -469,6 +474,14 @@ def switch(x):
't1': 100,
}.get(x, 10)
divisor = switch(tbinfo["topo"]["name"])
route_index = route_nums/divisor

# Traffic tests are not run if number of routes learnt are less than
# 1000 in t2 role, less than 100 in t1 role. log message in that scenario
if route_index < 1:
logger.info(" No of routes {} in topo {} is less, skipping \
test ".format(route_nums, tbinfo["topo"]["name"]))

while loop_times > 0:
logger.info("Round %s" % loop_times)
route_index = 1
Expand Down
Loading