HomeFreeBSD

Locking for updates to routing table entries. Each rtentry gets a mutex

Description

Locking for updates to routing table entries. Each rtentry gets a mutex
that covers updates to the contents. Note this is separate from holding
a reference and/or locking the routing table itself.

Other/related changes:

o rtredirect loses the final parameter by which an rtentry reference

may be returned; this was never used and added unwarranted complexity
for locking.

o minor style cleanups to routing code (e.g. ansi-fy function decls)
o remove the logic to bump the refcnt on the parent of cloned routes,

we assume the parent will remain as long as the clone; doing this avoids
a circularity in locking during delete

o convert some timeouts to MPSAFE callouts

Notes:

  1. rt_mtx in struct rtentry is guarded by #ifdef _KERNEL as user-level applications cannot/do-no know about mutex's. Doing this requires that the mutex be the last element in the structure. A better solution is to introduce an externalized version of struct rtentry but this is a major task because of the intertwining of rtentry and other data structures that are visible to user applications.
  2. There are known LOR's that are expected to go away with forthcoming work to eliminate many held references. If not these will be resolved prior to release.
  3. ATM changes are untested.

Sponsored by: FreeBSD Foundation
Obtained from: BSD/OS (partly)

Details

Provenance
samAuthored on Oct 4 2003, 3:44 AM
Parents
rGc30332874166: Handle a 'const' parameter without using __DECONST().
Branches
Unknown
Tags
Unknown

Event Timeline