Skip to content

Commit 5510818

Browse files
committed
Enhance ACL test on LT2 topology
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: This PR is to enhance ACL test on LT2 topology. The change is done by updating port selection logic to include both upstream ports and downstream ports on LT2. Depends on sonic-net/sonic-mgmt#19260 ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 ### Approach #### What is the motivation for this PR? This PR is to enhance ACL test on LT2 topology. #### How did you do it? The change is done by updating port selection logic to include both upstream ports and downstream ports on LT2. #### How did you verify/test it? The change is verified by running `test_acl` on a physical testbed. #### Any platform specific information? No. #### Supported testbed topology if it's a new test case? Not a new test. ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
1 parent fb1402f commit 5510818

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/acl/test_acl.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,13 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_unselected_dut, tbinfo,
430430
acl_table_ports[''].append(k)
431431
elif topo == "t2":
432432
acl_table_ports = t2_info['acl_table_ports']
433+
elif topo == "lt2":
434+
# For LT2, add portchannels for downstream links
435+
for k, v in list(port_channels.items()):
436+
acl_table_ports[v['namespace']].append(k)
437+
# Add RIF for upstream links
438+
for namespace, port in list(upstream_ports.items()):
439+
acl_table_ports[namespace] += port
433440
else:
434441
for namespace, port in list(upstream_ports.items()):
435442
acl_table_ports[namespace] += port

0 commit comments

Comments
 (0)