]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fib algo: do not reallocate datapath index for datapath ptr update.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Sun, 18 Apr 2021 15:03:58 +0000 (16:03 +0100)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Sun, 18 Apr 2021 15:12:13 +0000 (16:12 +0100)
commit0abb6ff590842114c74e5d52e1af65605bd9d960
tree8136a78a0eed5189165c35bda2226bc2b6ca55fe
parente2f79d9e518f885bf875f6613e70af39b7c397de
fib algo: do not reallocate datapath index for datapath ptr update.

Fib algo uses a per-family array indexed by the fibnum to store
 lookup function pointers and per-fib data.

Each algorithm rebuild currently requires re-allocating this array
 to support atomic change of two pointers.

As in reality most of the changes actually involve changing only
 data pointer, add a shortcut performing in-flight pointer update.

MFC after: 2 weeks
sys/net/route/fib_algo.c