Page MenuHomeFreeBSD

[fib algo] Delay algo init during fib growth phase to allow to reliably use rib KPI
ClosedPublic

Authored by melifaro on Apr 25 2021, 10:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 3:24 AM
Unknown Object (File)
Oct 18 2024, 6:35 AM
Unknown Object (File)
Oct 18 2024, 6:35 AM
Unknown Object (File)
Oct 18 2024, 6:35 AM
Unknown Object (File)
Oct 18 2024, 6:13 AM
Unknown Object (File)
Oct 17 2024, 3:44 PM
Unknown Object (File)
Oct 16 2024, 2:29 AM
Unknown Object (File)
Oct 15 2024, 8:35 AM
Subscribers

Details

Summary

Currently, most of the rib(9) KPI does not use rnh pointers, using fibnum and family parameters to determine the rib pointer instead.
This works well except for the case when we initialize new rib pointers during fib growth.
In that case, there is no mapping between fib/family and the new rib, as an entirely new rib pointer array is populated.

Address this by delaying fib algo initialization till afters switching to the new pointer array and updating the number of fibs.
Set datapath pointer to the dummy function, so the potential callers won't crash the kernel in the brief moment when the rib exists, but no fib algo is attached.

This change allows to avoid duplicating existing functions with an altered signature.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro added a reviewer: network.
melifaro retitled this revision from Delay algo init. to [fib algo] Delay algo init during fib growth phase to allow rt_tables_get_rnh_ptr() to always work..
melifaro retitled this revision from [fib algo] Delay algo init during fib growth phase to allow rt_tables_get_rnh_ptr() to always work. to [fib algo] Delay algo init during fib growth phase to allow to reliably use rib KPI.Apr 25 2021, 11:17 AM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 27 2021, 10:11 PM
This revision was automatically updated to reflect the committed changes.