Adding bulker to Vnet Orch - #4303
Open
ypcisco wants to merge 5 commits into
Open
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces bulk (batched) SAI programming for VNET tunnel routes (and queues non-subnet routes via RouteOrch) to improve performance when many routes are processed, by separating request parsing/queueing from a single bulk flush and then per-entry post-processing.
Changes:
- Added bulk context structures and new tunnel-route bulker in
VNetRouteOrch, plus a customdoTask()that queues all requests, flushes once, then post-processes based on per-route SAI status. - Updated
RouteBulkContextto be movable and exposed RouteOrch bulkers publicly to enable cross-orch batching. - Added new DVS tests to validate scale, mixed operations, dependency deferral, monitoring cleanup, and NHG refcount behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
orchagent/vnetorch.h |
Adds new bulk context structs and member fields to support batching and post-processing. |
orchagent/vnetorch.cpp |
Implements bulk queue/flush/post flow and new tunnel route bulk helpers/post handlers. |
orchagent/routeorch.h |
Makes RouteBulkContext movable and exposes RouteOrch bulkers needed for external batching. |
tests/vnet_lib.py |
Adds a helper to assert VNET tunnel route presence in STATE_DB. |
tests/test_vnet.py |
Adds bulk-focused integration tests (scale, mixed ops, dependency deferral, monitoring cleanup, NHG refcount). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Signed-off-by: Yash Pandit <ypcisco@gmail.com>
Signed-off-by: ypcisco <ypcisco@gmail.com>
Signed-off-by: ypcisco <ypcisco@gmail.com>
ypcisco
force-pushed
the
vnetorch_bulker
branch
from
April 23, 2026 20:44
0219a18 to
146475d
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: ypcisco <ypcisco@gmail.com>
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Implements bulk processing for VNET tunnel routes to improve performance and reduce per-route SAI overhead when handling large-scale route operations.
Key Changes
TunnelRouteContext,RouteOrchContext,VNetRouteBulkContext) to track batched operations — route details, SAI op type, and astatus_indexinto a shared status deque — with a staging area (toBulk_) to collect requests before flushing.EntityBulker<sai_route_api_t>and reused RouteOrch's existing bulker for non-subnet routes, so both route types flush in the same pass.doTask: parse/queue all requests first, flush both bulkers once, then post-process using saved context.doTask(parse errors drop the entry; SAI failures keep it) so one bad request can't abort the batch.m_toSync.Why I did it
Previously each VNET tunnel route was programmed with an individual synchronous SAI call, so large route churn (bring-up, failover, config push) was slow and blocked the orchagent. Bulking amortizes the SAI round-trips and aligns VNET route handling with the bulker pattern already used by RouteOrch.
How I verified it
Added
vnet_lib.pyhelpers (create_vnet_routes_appdb,set_vnet_routes_appdb,delete_vnet_routes_appdb,check_vnet_route_exists) using a bufferedProducerStateTableto force real batching, plus the following VS integration tests:Details if related