From 3667c71c86773410c7471e7aef4e156d824d43ea Mon Sep 17 00:00:00 2001 From: deerao02 Date: Wed, 5 Aug 2026 10:48:58 -0700 Subject: [PATCH] [acl]: Exclude PortChannel members from LT2 ACL bindings (#26777) Summary: Prevent LT2 ACL table creation from binding physical interfaces that are already members of PortChannels. Signed-off-by: Deeksha Rao Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 23dd5670957614e10f0165f1d29439e75ba6ed10) --- tests/acl/test_acl.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/acl/test_acl.py b/tests/acl/test_acl.py index 9420d42bdc..82f530ea2f 100644 --- a/tests/acl/test_acl.py +++ b/tests/acl/test_acl.py @@ -517,9 +517,15 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran # For LT2, add portchannels for downstream links for k, v in list(port_channels.items()): acl_table_ports[v['namespace']].append(k) - # Add RIF for upstream links + # Add standalone RIFs for upstream links. PortChannel members cannot + # also be bound to the ACL table as physical interfaces. + pc_members = defaultdict(set) + for pc in port_channels.values(): + pc_members[pc['namespace']].update(pc.get('members', [])) for namespace, port in list(upstream_ports.items()): - acl_table_ports[namespace] += port + acl_table_ports[namespace] += [ + interface for interface in port if interface not in pc_members[namespace] + ] else: for namespace, port in list(upstream_ports.items()): acl_table_ports[namespace] += port