routing: remove info argument from add/change_route_nhop().
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Thu, 28 Jul 2022 13:41:11 +0000 (13:41 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 1 Aug 2022 07:41:07 +0000 (07:41 +0000)
commit29029b06a6f7fd51c34c9db88cc98a6653ee5046
treed3271fb4afb1f3478d137afd5162ffaccd870431
parent97ffaff85968d09f2319156cb0ef56743667db6e
routing: remove info argument from add/change_route_nhop().

Currently, rt_addrinfo(info) serves as a main "transport" moving
 state between various functions inside the routing subsystem.
As all of the fields are filled in directly by the customers, it
 is problematic to maintain consistency, resulting in repeated checks
 inside many functions. Additionally, there are multiple ways of
 specifying the same value (RTAX_IFP vs rti_ifp / rti_ifa) and so on.
With the upcoming nhop(9) kpi it is possible to store all of the
 required state in the nexthops in the consistent fashion, reducing the
 need to use "info" in the KPI calls.
Finally, rt_addrinfo structure format was derived from the rtsock wire
 format, which is different from other kernel routing users or netlink.

This cleanup simplifies upcoming nhop(9) kpi and netlink introduction.

Reviewed by: zlei.huang@gmail.com
Differential Revision: https://reviews.freebsd.org/D35972
MFC after: 2 weeks
sys/net/route/mpath_ctl.c
sys/net/route/route_ctl.c
sys/net/route/route_var.h