HomeFreeBSD

Remove now-unused rt_ifp,rt_ifa,rt_gateway,rt_mtu rte fields.

Description

Remove now-unused rt_ifp,rt_ifa,rt_gateway,rt_mtu rte fields.

After converting routing subsystem customers to use nexthop objects
defined in r359823, some fields in struct rtentry became unused.

This commit removes rt_ifp, rt_ifa, rt_gateway and rt_mtu from struct rtentry
along with the code initializing and updating these fields.

Cleanup of the remaining fields will be addressed by D24669.

This commit also changes the implementation of the RTM_CHANGE handling.
Old implementation tried to perform the whole operation under radix WLOCK,
resulting in slow performance and hacks like using RTF_RNH_LOCKED flag.
New implementation looks up the route nexthop under radix RLOCK, creates new
nexthop and tries to update rte nhop pointer. Only last part is done under
WLOCK.
In the hypothetical scenarious where multiple rtsock clients
repeatedly issue RTM_CHANGE requests for the same route, route may get
updated between read and update operation. This is addressed by retrying
the operation multiple (3) times before returning failure back to the
caller.

Differential Revision: https://reviews.freebsd.org/D24666

Details

Provenance
melifaroAuthored on
Differential Revision
D24666: Remove now-unused rt_ifp,rt_ifa,rt_gateway,rt_mtu rte fields.
Parents
rS360628: MFC r360373:
Branches
Unknown
Tags
Unknown