add fair-routing strategy with SWRR over PBAT-eligible routes - #91
add fair-routing strategy with SWRR over PBAT-eligible routes#91zebastian wants to merge 1 commit into
Conversation
|
this is WIP. Anyway i think this is a good alternative for the shortest-pbat routung strategy. |
|
see showcase video link here: https://www.youtube.com/watch?v=5micweulp0s |
|
ready for review: see test case and showcase video attached |
Introduce a CGR route-selection mode that stripes non-critical bundles
across all routes whose terminus PBAT is within a configurable window
of the best route, weighted by each route's path bottleneck xmitRate
via smooth weighted round-robin (SWRR). Default behaviour is unchanged:
shortest-pbat is selected at ionInitialize.
Two new ionrc management commands:
m routing-strategy { shortest-pbat | fair-routing }
m allow-routing-delay <msec> (default 1000 ms)
Strategy and window are persisted in IonDB and cached in IonVdb;
critical-bundle forwarding (loadCriticalBestRoutesList) is unaffected.
CGR changes (libcgr.c):
- Extract proximate-nodes enumeration into buildProximateNodesList(),
shared by critical and fair-routing paths.
- Add loadFairRoutesList(): one best route per first-hop neighbour,
then prune by PBAT <= minPbat + allowDelaySec.
- Add SWRR table on CgrRtgObject (fairRrEntries, fairRrSetHash,
fairRrTotalWeight) plus FairRrEntry. The eligible-set hash
(FNV-1a-64 over sorted toFqnn) lets cgr_pick_fair_route reuse
currentWeight state across calls and rebuild only when the set
changes; detachRoutingObject tears the table down.
- ipnfw routes non-critical bundles through cgr_pick_fair_route
when the strategy is fair and >1 route is eligible.
Add the fair-routing-stripe test: it exercises the strategy over a
6-node LTP topology with two nested, unevenly weighted split points,
sends 24 non-critical bundles from N1 to N4, and asserts the exact
per-node forwarded counts (N2=6, N3=18, N5=2, N6=4) and that all 24
are delivered.
The routing-object lists follow the #1048 hardening convention and are
created with sm_list_create_unlocked, so no per-list semaphore is
allocated for the SWRR table.
|
@zebastian Thank you for this submission. The best approach forward for ION here to instead of incorporating your change into the core of CGR, which is CCSDS SABR standard, we can setup a policy routing API and use your update as a "plug-in" demonstration of enhancement/updates that goes beyond the specification. We've had discussion of setting up routing policy plug-in for a while and it's probably time to get it done. We have planned to look into that for 4.2.1 (this Fall/Winter) so please check back in with us on that. |
|
@iondev33 you mean to generalize a possible routing backend as a binary application with a fixed api, ionrc |
Introduce a CGR route-selection mode that stripes non-critical bundles across all routes whose terminus PBAT is within a configurable window of the best route, weighted by each route's path bottleneck xmitRate via smooth weighted round-robin (SWRR). Default behaviour is unchanged: shortest-pbat is selected at ionInitialize.
Two new ionrc management commands:
m routing-strategy { shortest-pbat | fair-routing }
m allow-routing-delay (default 1000 ms)
Strategy and window are persisted in IonDB and cached in IonVdb; critical-bundle forwarding (loadCriticalBestRoutesList) is unaffected.
CGR changes (libcgr.c):