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)
Feb 6 2024, 2:26 AM
Unknown Object (File)
Jan 9 2024, 12:57 AM
Unknown Object (File)
Dec 20 2023, 7:53 AM
Unknown Object (File)
Dec 12 2023, 5:42 PM
Unknown Object (File)
Nov 5 2023, 7:38 PM
Unknown Object (File)
Oct 4 2023, 6:36 PM
Unknown Object (File)
Sep 30 2023, 6:36 PM
Unknown Object (File)
Sep 12 2023, 1:28 PM
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.