Skip to content

[Draft Only - Do Not Merge/Review] SAI VPP UT Harness - Phase 3#1992

Open
nicholasching wants to merge 86 commits into
sonic-net:masterfrom
nicholasching:sai_vpp_ut_phase3
Open

[Draft Only - Do Not Merge/Review] SAI VPP UT Harness - Phase 3#1992
nicholasching wants to merge 86 commits into
sonic-net:masterfrom
nicholasching:sai_vpp_ut_phase3

Conversation

@nicholasching

Copy link
Copy Markdown

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation update
  • Test improvement

Approach

What is the motivation for this PR?

Work item tracking
  • Microsoft ADO (number only):

How did you do it?

How did you verify/test it?

Any platform specific information?

Documentation

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Backend portion of the L3-over-LAG forwarding fix (BVI/bond FDB handling in
SwitchVppFdb.cpp). The UT-harness portion (run_test.sh LAG/SVI interface-IP
assignment) and the related devdocs are in the harness PR.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
programNeighborHostRoute() left the host-route nexthop sw_if_index at 0, so
ip_route_add_del() pinned the neighbor /32//128 host route to VPP's local0
and dropped traffic even though the correct adjacency over the real egress
interface existed. Set sw_if_index = ~0 to resolve the egress via hwif_name.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
…test

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
…dog, --relax

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
…ature and restarting backend per group

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
…ugging

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
UT-harness portion of the L3-over-LAG forwarding fix: run_test.sh assigns the
DUT-side connected IPs to each LAG (be<N>) and SVI (bvi<vlan>) so routed-to-LAG
/SVI traffic forwards in the standalone PTF environment. The backend portion
(SwitchVppFdb.cpp) is in the VPP SAI backend PR.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
…SER)

- gen_compatibility_matrix.py: prefer defusedxml for parsing PTF JUnit XML
  (XXE-hardened), with a stdlib fallback; input is our own local test output.
- Dockerfile: annotate the root entrypoint with a nosemgrep justification — the
  --privileged harness must run as root to start VPP/Redis/saiserver and manage
  veth/AF_PACKET; it is a disposable test container, never a deployed service.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Satisfy tests/swsslogentercheck.sh for static helpers introduced in
the neighbor host-route refactor.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Satisfy tests/checkwhitespace.sh (Azure Build amd64 gate).

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
member_hwif_str was loop-scoped while create_vpp_nexthop_entry stored its
c_str() and ip_route_add_del_get_stats ran after the loop, leaving dangling
pointers in ip_route->nexthop[].

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Deduplicate RIF-to-hwif resolution used when programming multipath routes
and single-path route updates.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Add getTapNameFromPortOrLagId for be<N> LCP taps, teach tap_to_hwif_name to
map bond taps to BondEthernet<N>, and route vpp_get_hwif_name and
vpp_add_del_intf_ip_addr through the shared helpers.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Merge programNeighborHostRoute into addRemoveIpNbr with adjacency and
host-route phase flags, and read NO_HOST_ROUTE via SaiCachedObject or
SaiDBObject get_attr instead of manual attribute scans.

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nicholasching

Copy link
Copy Markdown
Author

All tests, including the newly added SAI VPP tests are now passing. This concludes the following features on this draft PR (which will each be given its own branch after #1950, #1951, and #1952 are merged to master):

  • Fixes to stabilize harness after updating master (merge conflicts, VPP backend, harness, build/compile issues)
  • Phase 3A, CI integration of SAI VPP UT to sonic-sairedis

I have attached the results of a recent stable build below to checkpoint development:
Github Run: https://github.com/sonic-net/sonic-sairedis/runs/88479909545
Azure Build: https://dev.azure.com/mssonic/build/_build/results?buildId=1170125&view=results

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Copilot AI review requested due to automatic review settings July 22, 2026 00:25

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI review requested due to automatic review settings July 22, 2026 18:41
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nicholasching

Copy link
Copy Markdown
Author

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1172065:

✅Stage BuildAsan:

  • Job amd64: retried.

@nicholasching

Copy link
Copy Markdown
Author

Failure on VPP SAI tests are expected and pass is pending on opencomputeproject/SAI#2321 merge into master.

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.

3 participants