]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove now-unused rt_ifp,rt_ifa,rt_gateway,rt_mtu rte fields.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 4 May 2020 14:31:45 +0000 (14:31 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 4 May 2020 14:31:45 +0000 (14:31 +0000)
commit9e0222958059e3f36e13b852e336a9ab893d0786
tree4ea7b0be96f538fb0b873f8c6fa31e8e4b30f285
parentbbea96df46a09c8584e259c421805e77bc9545fb
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
sys/net/route.c
sys/net/route/route_var.h
sys/netinet/in_rmx.c
sys/netinet6/in6_rmx.c