#
ed81a155 |
| 05-Feb-2024 |
Marius Strobl <marius@FreeBSD.org> |
fib_algo(4): Lower level of algorithm switching messages to LOG_INFO
Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather easy to trigger debug messages such as: [fib_algo] inet.0
fib_algo(4): Lower level of algorithm switching messages to LOG_INFO
Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather easy to trigger debug messages such as: [fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to radix4_lockless
Also, the "severity" of these events generally only justifies LOG_INFO and not LOG_NOTICE.
Reviewed by: melifaro
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
73336a6f |
| 21-Dec-2022 |
Zhenlei Huang <zlei@FreeBSD.org> |
routing: Use NET_EPOCH_[CALL|WAIT] macros
Reviewed by: melifaro, kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D37729
|
Revision tags: release/12.4.0 |
|
#
93dd3ada |
| 06-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
fib_algo: set vnet when destroying algo instance
Reported by: Konrad Kręciwilk <konrad.kreciwilk@korbank.pl> MFC after: 2 weeks
|
#
150486f6 |
| 29-Jul-2022 |
Zhenlei Huang <zlei.huang@gmail.com> |
Introduce and use the NET_EPOCH_DRAIN_CALLBACKS() macro
Reviewed by: melifao, kp Differential Revision: https://reviews.freebsd.org/D35968
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
7e64580b |
| 06-Oct-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: Use the same index space for both nexthop and nexthop groups.
This simplifies userland object handling along with kernel-level nexthop handling in fib algo framework.
MFC after: 1 week Di
routing: Use the same index space for both nexthop and nexthop groups.
This simplifies userland object handling along with kernel-level nexthop handling in fib algo framework.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32342
show more ...
|
#
5b42b494 |
| 01-Aug-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix typo in rib_unsibscribe<_locked>().
Submitted by: Zhenlei Huang<zlei.huang at gmail.com> Differential Revision: https://reviews.freebsd.org/D31356
|
#
41ce0e34 |
| 28-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
[fib algo] Update fib_gen counter under FIB_MOD_LOCK.
MFC after: 3 days
|
#
8a0d57ba |
| 25-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
[fib algo] Delay algo init at fib growth to to allow to reliably use rib KPI.
Currently, most of the rib(9) KPI does not use rnh pointers, using fibnum and family parameters to determine the rib po
[fib algo] Delay algo init at fib growth to to allow to reliably use rib KPI.
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 after 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 creating duplicates of existing rib functions, with altered signature.
Differential Revision: https://reviews.freebsd.org/D29969 MFC after: 1 week
show more ...
|
#
439d087d |
| 27-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
[fib algo] always commit static routes synchronously.
Modular fib lookup framework features logic that allows route update batching for the algorithms that cannot easily apply the routing change w
[fib algo] always commit static routes synchronously.
Modular fib lookup framework features logic that allows route update batching for the algorithms that cannot easily apply the routing change without rebuilding. As a result, dataplane lookups may return old data until the the sync takes place. With the default sync timeout of 50ms, it is possible that new binary like ping(8) executed exactly after route(8) will still use the old fib data.
To address some aspects of the problem, framework executes all rtable changes without RTF_GATEWAY synchronously.
To fix the aforementioned problem, this diff extends sync execution for all RTF_STATIC routes (e.g. ones maintained by route(8). This fixes a bunch of tests in the networking space.
Reported by: ci, arichardson MFC after: 2 weeks
show more ...
|
#
7d222ce3 |
| 21-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC
Reported by: jbeich PR: 255390
|
#
67372fb3 |
| 21-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix NOINET[6] build after enabling FIB_ALGO in GENERIC.
Submitted by: jbeich PR: 255389
|
#
c2338561 |
| 25-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
[fib algo] Do not print algo attach/detach message on boot
MFC after: 1 day
|
#
6409e594 |
| 25-Apr-2021 |
Stefan Eßer <se@FreeBSD.org> |
Fix build with gcc
Correctly declare function without arguments as f(void) instead of f().
|
#
33cb3cb2 |
| 17-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
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 no
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
show more ...
|
#
0abb6ff5 |
| 18-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
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 rebuil
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
show more ...
|
#
e2f79d9e |
| 15-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fib algo: extend KPI by allowing algo to set datapath pointers.
Some algorithms may require updating datapath and control plane algo pointers after the (batched) updates.
Export fib_set_datapath_p
Fib algo: extend KPI by allowing algo to set datapath pointers.
Some algorithms may require updating datapath and control plane algo pointers after the (batched) updates.
Export fib_set_datapath_ptr() to allow setting the new datapath function or data pointer from the algo. Add fib_set_algo_ptr() to allow updating algo control plane pointer from the algo. Add fib_epoch_call() epoch(9) wrapper to simplify freeing old datapath state.
Reviewed by: zec Differential Revision: https://reviews.freebsd.org/D29799 MFC after: 1 week
show more ...
|
#
6b8ef0d4 |
| 09-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Add batched update support for the fib algo.
Initial fib algo implementation was build on a very simple set of principles w.r.t updates:
1) algorithm is ether able to apply the change synchronousl
Add batched update support for the fib algo.
Initial fib algo implementation was build on a very simple set of principles w.r.t updates:
1) algorithm is ether able to apply the change synchronously (DIR24-8) or requires full rebuild (bsearch, lradix). 2) framework falls back to rebuild on every error (memory allocation, nhg limit, other internal algo errors, etc).
This changes brings the new "intermediate" concept - batched updates. Algotirhm can indicate that the particular update has to be handled in batched fashion (FLM_BATCH). The framework will write this update and other updates to the temporary buffer instead of pushing them to the algo callback. Depending on the update rate, the framework will batch 50..1024 ms of updates and submit them to a different algo callback.
This functionality is handy for the slow-to-rebuild algorithms like DXR.
Differential Revision: https://reviews.freebsd.org/D29588 Reviewed by: zec MFC after: 2 weeks
show more ...
|
#
ee2cf2b3 |
| 09-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Implement better rebuild-delay fib algo policy.
The intent is to better handle time intervals with large amount of RIB updates (e.g. BGP peer going up or down), while still keeping low sync delay fo
Implement better rebuild-delay fib algo policy.
The intent is to better handle time intervals with large amount of RIB updates (e.g. BGP peer going up or down), while still keeping low sync delay for the rest scenarios.
The implementation is the following: updates are bucketed into the buckets of size 50ms. If the number of updates within a current bucket exceeds the threshold of 500 routes/sec (e.g. 10 updates per bucket interval), the update is delayed for another 50ms. This can be repeated until the maximum update delay (1 sec) is reached.
All 3 variables are runtime tunables:
* net.route.algo.fib_max_sync_delay_ms: 1000 * net.route.algo.bucket_change_threshold_rate: 500 * net.route.algo.bucket_time_ms: 50
Differential Review: https://reviews.freebsd.org/D29588 MFC after: 2 weeks
show more ...
|
Revision tags: release/13.0.0 |
|
#
e4ac3f74 |
| 15-Mar-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix fib algo rebuild delay calculation.
Submitted by: Marco Zec <zec at fer.hr> MFC after: 3 days
|
#
78c93a17 |
| 31-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Use process fib for inet/inet6 fib_algo sysctls.
This allows to set/query fib algo for non-default fibs.
MFC after: 3 days
|
#
151ec796 |
| 30-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix the design problem with delayed algorithm sync.
Currently, if the immutable algorithm like bsearch or radix_lockless receives rtable update notification, it schedules algorithm rebuild. This re
Fix the design problem with delayed algorithm sync.
Currently, if the immutable algorithm like bsearch or radix_lockless receives rtable update notification, it schedules algorithm rebuild. This rebuild is executed by the callout after ~50 milliseconds.
It is possible that a script adding an interface address and than route with the gateway bound to that address will fail. It can happen due to the fact that fib is not updated by the time the route addition request arrives.
Fix this by allowing synchronous algorithm rebuilds based on certain conditions. By default, these conditions assume: 1) less than net.route.algo.fib_sync_limit=100 routes 2) routes without gateway.
* Move algo instance build entirely under rib WLOCK. Rib lock is only used for control plane (except radix algo, but there are no rebuilds). * Add rib_walk_ext_locked() function to allow RIB iteration with rib lock already held. * Fix rare potential callout use-after-free for fds by binding fd callout to the relevant rib rmlock. In that case, callout_stop() under rib WLOCK guarantees no callout will be executed afterwards.
MFC after: 3 days
show more ...
|
#
ab6d9aae |
| 30-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Move business logic from rebuild_fd_callout() into rebuild_fd().
This simplifies code a bit and allows for future non-callout callers to request rebuild.
MFC after: 3 days
|
#
f8b7ebea |
| 30-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Improve fib_algo debug messages.
* Move per-prefix debug lines under LOG_DEBUG2 * Create fib instance counter to distingush log messages between instances * Add more messages on rebuild reason.
MF
Improve fib_algo debug messages.
* Move per-prefix debug lines under LOG_DEBUG2 * Create fib instance counter to distingush log messages between instances * Add more messages on rebuild reason.
MFC after: 3 days
show more ...
|