freebsd-dev/sys/net/route
Alexander V. Chernikov 33cb3cb2e3 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
2021-04-20 22:02:41 +00:00
..
fib_algo.c Fix rib generation count for fib algo. 2021-04-20 22:02:41 +00:00
fib_algo.h Fib algo: extend KPI by allowing algo to set datapath pointers. 2021-04-18 16:12:12 +01:00
mpath_ctl.c Implement flowid calculation for outbound connections to balance 2020-10-18 17:15:47 +00:00
nhgrp_ctl.c Fix typo in the 9fa8d1582b. 2021-03-29 23:42:48 +00:00
nhgrp_var.h Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
nhgrp.c Rename variables inside nexhtop group consider_resize() code. 2021-03-29 23:06:13 +00:00
nhop_ctl.c Simplify ifa/ifp refcounting in the routing stack. 2021-02-22 23:37:59 +00:00
nhop_utils.c Remove unused nhop_ref_any() function. 2020-09-20 21:32:52 +00:00
nhop_utils.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
nhop_var.h Fix route flags update during RTM_CHANGE. 2020-10-04 13:24:58 +00:00
nhop.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
nhop.h Remove now-unused RT_GATEWAY* definitions. 2021-01-04 21:45:46 +00:00
route_ctl.c Fix rib generation count for fib algo. 2021-04-20 22:02:41 +00:00
route_ctl.h Fix the design problem with delayed algorithm sync. 2021-01-30 23:25:57 +00:00
route_ddb.c Rename rt_flags to rte_flags && reduce number of rt_nhop accesses. 2020-08-22 19:30:56 +00:00
route_helpers.c Fix the design problem with delayed algorithm sync. 2021-01-30 23:25:57 +00:00
route_ifaddrs.c Simplify ifa/ifp refcounting in the routing stack. 2021-02-22 23:37:59 +00:00
route_tables.c Add modular fib lookup framework. 2020-12-25 11:33:17 +00:00
route_temporal.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
route_var.h Fix rib generation count for fib algo. 2021-04-20 22:02:41 +00:00