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

202205 #14685

Open
wants to merge 3 commits into
base: 202205
Choose a base branch
from
Open

202205 #14685

Show file tree
Hide file tree
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
12 changes: 11 additions & 1 deletion ansible/roles/test/files/ptftests/fib_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,17 @@ def get_src_and_exp_ports(self, dst_ip):
continue
if self.switch_type == "chassis-packet":
exp_port_lists = self.check_same_asic(src_port, exp_port_lists)
logging.info('src_port={}, exp_port_lists={}, active_dut_indexes={}'.format(src_port, exp_port_lists, active_dut_indexes))
elif self.switch_type == "voq" and exp_port_lists[0]:
dest_port_dut_index = self.ptf_test_port_map[str(exp_port_lists[0][0])]['target_dut'][0]
src_port_dut_index = self.ptf_test_port_map[str(src_port)]['target_dut'][0]
if src_port_dut_index == 0 and dest_port_dut_index == 0:
ptf_non_upstream_ports = []
for ptf_port, ptf_port_info in self.ptf_test_port_map.items():
if ptf_port_info['target_dut'][0] != 0:
ptf_non_upstream_ports.append(ptf_port)
src_port = int(random.choice(ptf_non_upstream_ports))
logging.info('src_port={}, exp_port_lists={}, active_dut_indexes={}'.format(
src_port, exp_port_lists, active_dut_indexes))
break
return src_port, exp_port_lists, next_hops

Expand Down
10 changes: 10 additions & 0 deletions ansible/roles/test/files/ptftests/py3/IP_decap_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,16 @@ def get_src_and_exp_ports(self, dst_ip):
if src_port in exp_port_list:
break
else:
if self.single_fib == "single-fib-single-hop" and exp_port_lists[0]:
dest_port_dut_index = self.ptf_test_port_map[str(exp_port_lists[0][0])]['target_dut'][0]
src_port_dut_index = self.ptf_test_port_map[str(src_port)]['target_dut'][0]
if src_port_dut_index == 0 and dest_port_dut_index == 0:
ptf_non_upstream_ports = []
for ptf_port, ptf_port_info in self.ptf_test_port_map.items():
if ptf_port_info['target_dut'][0] != 0:
ptf_non_upstream_ports.append(ptf_port)
src_port = int(random.choice(ptf_non_upstream_ports))

logging.info('src_port={}, exp_port_lists={}, active_dut_index={}'.format(
src_port, exp_port_lists, active_dut_indexes))
break
Expand Down
10 changes: 10 additions & 0 deletions ansible/roles/test/files/ptftests/py3/hash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ def get_src_and_exp_ports(self, dst_ip):
if src_port in exp_port_list:
break
else:
if self.switch_type == "voq" and exp_port_lists[0]:
dest_port_dut_index = self.ptf_test_port_map[str(exp_port_lists[0][0])]['target_dut'][0]
src_port_dut_index = self.ptf_test_port_map[str(src_port)]['target_dut'][0]
if src_port_dut_index == 0 and dest_port_dut_index == 0:
ptf_non_upstream_ports = []
for ptf_port, ptf_port_info in self.ptf_test_port_map.items():
if ptf_port_info['target_dut'][0] != 0:
ptf_non_upstream_ports.append(ptf_port)
src_port = int(random.choice(ptf_non_upstream_ports))

break
return src_port, exp_port_lists, next_hops

Expand Down
Loading