HomeFreeBSD

Fix rib generation count for fib algo.

Description

Fix rib generation count for fib algo.

Currently, PCB caching mechanism relies on the rib generation
counter (rnh_gen) to invalidate cached nhops/LLE entries.

With certain fib algorithms, it is now possible that the
datapath lookup state applies RIB changes with some delay.
In that scenario, PCB cache will invalidate on the RIB change,
but the new lookup may result in the same nexthop being returned.
When fib algo finally gets in sync with the RIB changes, PCB cache
will not receive any notification and will end up caching the stale data.

To fix this, introduce additional counter, rnh_gen_rib, which is used
only when FIB_ALGO is enabled.
This counter is incremented by the control plane. Each time when fib algo
synchronises with the RIB, it updates rnh_gen to the current rnh_gen_rib value.

Differential Revision: https://reviews.freebsd.org/D29812
Reviewed by: donner
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Apr 17 2021, 6:58 PM
Reviewer
donner
Differential Revision
D29812: Fix rib generation count for fib algo.
Parents
rG8ef97d2ba339: dconschat: Remove support for FreeBSD 4.x and earlier.
Branches
Unknown
Tags
Unknown