| f3d69003 | 29-Aug-2021 |
Alexander V. Chernikov <[email protected]> |
routing: Bring back the ability to specify transmit interface via its name.
Some software references outgoing interfaces by specifying name instead of index.
Use rti_ifp from rt_addrinfo if provid
routing: Bring back the ability to specify transmit interface via its name.
Some software references outgoing interfaces by specifying name instead of index.
Use rti_ifp from rt_addrinfo if provided instead of always using address interface when constructing nexthop.
PR: 255678 Reported by: martin.larsson2 at gmail.com
(cherry picked from commit d98954e229812eee2fa6bf97714fecbbdcc56e4c)
show more ...
|
| e86f5d4f | 30-Aug-2021 |
Alexander V. Chernikov <[email protected]> |
routing: Disallow zero nexthop weights in nexthop groups.
Adding such nexthops breaks calc_min_mpath_slots() assumptions, thus resulting in the incorrect nexthop group creation and eventually lead
routing: Disallow zero nexthop weights in nexthop groups.
Adding such nexthops breaks calc_min_mpath_slots() assumptions, thus resulting in the incorrect nexthop group creation and eventually leading to panic. Reported by: avg
(cherry picked from commit 0a3a377aee9bb28546fd2d1e45baa3fcad02439b)
show more ...
|
| 5007bc4e | 15-Aug-2021 |
Alexander V. Chernikov <[email protected]> |
routing: Fix crashes with dpdk_lpm[46] algo.
When a prefix gets deleted from the RIB, dpdk_lpm algo needs to know the nexthop of the "parent" prefix to update its internal state. The glue code, whi
routing: Fix crashes with dpdk_lpm[46] algo.
When a prefix gets deleted from the RIB, dpdk_lpm algo needs to know the nexthop of the "parent" prefix to update its internal state. The glue code, which utilises RIB as a backing route store, uses fib[46]_lookup_rt() for the prefix destination after its deletion to fetch the desired nexthop. This approach does not work when deleting less-specific prefixes with most-specific ones are still present. For example, if 10.0.0.0/24, 10.0.0.0/23 and 10.0.0.0/22 exist in RIB, deleting 10.0.0.0/23 would result in 10.0.0.0/24 being returned as a search result instead of 10.0.0.0/22. This, in turn, results in the failed datastructure update: part of the deleted /23 prefix will still contain the reference to an old nexthop. This leads to the use-after-free behaviour, ending with the eventual crashes.
Fix the logic flaw by properly fetching the prefix "parent" via newly-created rt_get_inet[6]_parent() helpers.
Differential Revision: https://reviews.freebsd.org/D31546 PR: 256882,256833
(cherry picked from commit 36e15b717eec80047fe7442898b5752101f2fbca)
show more ...
|
| 939c41f3 | 27-Apr-2021 |
Alexander V. Chernikov <[email protected]> |
Fix drace CTF for the rib_head.
33cb3cb2e321 introduced an `rib_head` structure field under the FIB_ALGO define. This may be problematic for the CTF, as some of the files including `route_var.h` do
Fix drace CTF for the rib_head.
33cb3cb2e321 introduced an `rib_head` structure field under the FIB_ALGO define. This may be problematic for the CTF, as some of the files including `route_var.h` do not have `fib_algo` defined.
Make dtrace happy by making the field unconditional.
Suggested by: markj
(cherry picked from commit bc5ef45aec3fa8acf2dd3408cebd207317543a8b)
show more ...
|
| d0666c87 | 25-Apr-2021 |
Alexander V. Chernikov <[email protected]> |
Add rib_walk_from() wrapper for selective rib tree traversal.
Provide wrapper for the rnh_walktree_from() rib callback. As currently `struct rib_head` is considered internal to the routing subsyste
Add rib_walk_from() wrapper for selective rib tree traversal.
Provide wrapper for the rnh_walktree_from() rib callback. As currently `struct rib_head` is considered internal to the routing subsystem, this wrapper is necessary to maintain isolation from the external code.
Differential Revision: https://reviews.freebsd.org/D29971 MFC after: 1 week
(cherry picked from commit f9668e42b44f22c9ab213eb9a4792d5acfcf6903)
show more ...
|
| 59b3b210 | 27-Apr-2021 |
Alexander V. Chernikov <[email protected]> |
[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
(cherry picked from commit 439d087d0b55574db81f4a2799a411c1236d95e3)
show more ...
|
| 1899138d | 17-Apr-2021 |
Alexander V. Chernikov <[email protected]> |
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
(cherry picked from commit 33cb3cb2e3212705b10e7885b37f70a3c2987c9e)
show more ...
|
| 6fa01605 | 09-Apr-2021 |
Alexander V. Chernikov <[email protected]> |
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
(cherry picked from commit 6b8ef0d428c93c970c1951a52c72f9e99c9e4279)
show more ...
|