Skip to content

Adding bulker to Vnet Orch#250

Open
ypcisco wants to merge 1 commit into
Azure:202511_azdfrom
ypcisco:vnet_orch_bulker
Open

Adding bulker to Vnet Orch#250
ypcisco wants to merge 1 commit into
Azure:202511_azdfrom
ypcisco:vnet_orch_bulker

Conversation

@ypcisco

@ypcisco ypcisco commented Jun 26, 2026

Copy link
Copy Markdown

What I did

Implements bulk processing for VNET tunnel routes to improve performance when handling large-scale route operations.

Key Changes

  • Added context structures to track batched operations including route details, operation type, and status information, with a staging area to collect multiple requests before processing them together
  • Introduced two separate bulkers to handle different route types: a new tunnel route bulker for overlay routes that go through VXLAN tunnels to remote endpoints, and the existing route bulker for non-subnet routes which are regular IP routes that don't point to directly connected subnets
  • Implemented two-phase processing approach where requests are first parsed and queued together, then all operations are sent to hardware in one batch, and finally results are processed using the saved context information
  • Changed post-processing to happen after the bulk flush completes, checking each route's SAI programming status first and only running post-processing steps like updating state databases and reference counts if the hardware programming succeeded
  • Enhanced error handling to track which individual routes succeed or fail within a batch, automatically retry failed routes in the next iteration.

Why I did it

How I verified it

  • Tested with various scenarios including single routes, large batches of hundreds of routes, mixing different operation types together, routes with monitoring and failover configurations, dependencies between routes, and error recovery
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /sonic, configfile: pytest.ini
plugins: pyfakefs-6.2.0, cov-4.0.0
collected 48 items                                                                                                                                                   

test_vnet.py::TestVnetOrch::test_vnet_orch_1 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_2 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_3 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_4 SKIPPED (Failing. Under investigation)
test_vnet.py::TestVnetOrch::test_vnet_orch_5 PASSED
test_vnet.py::TestVnetOrch::test_vnet_vxlan_multi_map PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_7[true] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_7[false] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_8[true] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_8[false] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_9[true] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_9[false] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_10[true] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_10[false] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_11[true] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_11[false] PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_12 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_13 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_14 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_15 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_16 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_17 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_18 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_19 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_20 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_21 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_22 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_23 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_24 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_25 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_26 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_27 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_28 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_29 PASSED
test_vnet.py::TestVnetOrch::test_vnet_local_route_single PASSED
test_vnet.py::TestVnetOrch::test_vnet_local_route_ecmp PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_32 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_33 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_36 PASSED
test_vnet.py::TestVnetOrch::test_vnet_ip2me_link_local DBG new_route_count=1
DBG new_route: {"dest":"fe80::/10","switch_id":"oid:0x21000000000000","vr":"oid:0x3000000000a1c"}
PASSED
test_vnet.py::TestVnetOrch::test_vnet_local_route_ecmp_unnumbered PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_37 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_38 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_39 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_40 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_41 PASSED
test_vnet.py::TestVnetOrch::test_vnet_orch_42 PASSED
test_vnet.py::test_nonflaky_dummy PASSED

Details if related

@ypcisco ypcisco requested a review from prsunny as a code owner June 26, 2026 09:14
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.

1 participant