Skip to content

[vpp][acl] add vpp acl IN_PORT support HLD - #2506

Open
lolyu wants to merge 3 commits into
sonic-net:masterfrom
lolyu:add_vpp_acl_in_ports_support
Open

[vpp][acl] add vpp acl IN_PORT support HLD#2506
lolyu wants to merge 3 commits into
sonic-net:masterfrom
lolyu:add_vpp_acl_in_ports_support

Conversation

@lolyu

@lolyu lolyu commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Add VPP ACL IN_PORT support.

Repo PR state
sonic-sairedis N/A N/A
  • Microsoft ADO (number only): N/A

Signed-off-by: Longxiang Lyu lolv@microsoft.com

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@lolyu
lolyu requested a balanced review from Copilot August 20, 2026 06:41
@lolyu
lolyu requested review from yue-fred-gao and yxieca August 20, 2026 06:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an HLD for enforcing per-entry VPP ACL ingress-port scoping.

Changes:

  • Defines port-signature ACL partitioning and rebinding.
  • Specifies failure handling, counters, and scaling.
  • Documents proposed implementation and testing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/vpp/vpp_acl_in_ports_HLD.md Outdated
Comment thread doc/vpp/vpp_acl_in_ports_HLD.md
Comment thread doc/vpp/vpp_acl_in_ports_HLD.md
Comment thread doc/vpp/vpp_acl_in_ports_HLD.md Outdated
Comment thread doc/vpp/vpp_acl_in_ports_HLD.md
Comment thread doc/vpp/vpp_acl_in_ports_HLD.md Outdated
@lolyu
lolyu requested a review from StormLiangMS August 20, 2026 06:48
- Placeholder default ACL is not literally unmatchable: it holds a
  deny of destination 0.0.0.0/32, and the reason it must deny rather
  than permit is now stated.
- Failure handling: a port whose unbind failed keeps its old
  assignment, so the retry unbinds what VPP actually holds instead of
  stranding the stale ACL bound and undeletable.
- Counters: REQ-7 holds in the steady state only; a partial failure
  under-reports until the next successful reprogram.
- Scaling is driven by distinct signatures, not distinct IN_PORTS
  sets, and the default ACL is always additional.
- Testing: add REQ-4 and REQ-7 cases; describe the GCU drop-removal
  test as partial coverage of REQ-4, which is what it is.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

A port whose unbind failed keeps its old swindex, but only a scoped
ACL is carried under the empty signature. The default ACL is owned by
m_acl_swindex_map for the table's lifetime; tracking it as scoped
would expose it to the reap and leave that map holding a swindex VPP
had released.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.


SONiC ACL entries may be scoped to a subset of ingress ports via the SAI qualifier `SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS`. The ACL table is bound to a broad set of ports, and each entry may narrow itself to specific ingress ports.

The VPP-based virtual switch (`saivpp`) does not honour this qualifier. Creating or updating an ACL entry's `IN_PORTS` is accepted and **reported as successful**, but the port scope is discarded and the entry is programmed as if the qualifier were absent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the proposed approach, what if IN_PORTS is used in egress ACL?


---

## Design

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel a much simpler design is extend vpp acl with match on in_port. With sonic-ext plugin, we already store the original ingress interface. so matching should be very simple. The only thing is the patch cannot be upstreamed due to the dependency on sonic-ext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants