freebsd-dev/sys/net/route
Alexander V. Chernikov da187ddb3d * Add rib_<add|del|change>_route() functions to manipulate the routing table.
The main driver for the change is the need to improve notification mechanism.
Currently callers guess the operation data based on the rtentry structure
 returned in case of successful operation result. There are two problems with
 this appoach. First is that it doesn't provide enough information for the
 upcoming multipath changes, where rtentry refers to a new nexthop group,
 and there is no way of guessing which paths were added during the change.
 Second is that some rtentry fields can change during notification and
 protecting from it by requiring customers to unlock rtentry is not desired.

Additionally, as the consumers such as rtsock do know which operation they
 request in advance, making explicit add/change/del versions of the functions
 makes sense, especially given the functions don't share a lot of code.

With that in mind, introduce rib_cmd_info notification structure and
 rib_<add|del|change>_route() functions, with mandatory rib_cmd_info pointer.
 It will be used in upcoming generalized notifications.

* Move definitions of the new functions and some other functions/structures
 used for the routing table manipulation to a separate header file,
 net/route/route_ctl.h. net/route.h is a frequently used file included in
 ~140 places in kernel, and 90% of the users don't need these definitions.

Reviewed by:		ae
Differential Revision:	https://reviews.freebsd.org/D25067
2020-06-01 20:49:42 +00:00
..
nhop_ctl.c * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
nhop_utils.c
nhop_utils.h
nhop_var.h Use epoch(9) for rtentries to simplify control plane operations. 2020-05-23 10:21:02 +00:00
nhop.c Move route_temporal.c and route_var.h to net/route. 2020-04-28 19:14:09 +00:00
nhop.h Use epoch(9) for rtentries to simplify control plane operations. 2020-05-23 10:21:02 +00:00
route_ctl.c * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
route_ddb.c * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
route_helpers.c * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
route_temporal.c * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
route_var.h * Add rib_<add|del|change>_route() functions to manipulate the routing table. 2020-06-01 20:49:42 +00:00
shared.h Move <add|del|change>_route() functions to route_ctl.c in preparation of 2020-05-23 19:06:57 +00:00