On Mon, 7 Jul 2008, Andre Oppermann wrote:

Caching the route in the inpcb has a number of problems:

- any routing table change has to walk all inpcb's to invalidate
  and remove outdated and invalid references.

- adding host routes again just bloats the table again and makes
  lookups more expensive.

- host routes (cloned) do not change when the underlying route is
  adjusted and packets are still routed to the old gateway (for
  example new default route).

- We have a tangled mess of cross-pointers and dependencies again
  precluding optimizations to the routing table and code itself.

The move towards read-write locking in UDP also complicates inpcb route caching, as there is no longer a guarantee that there's exclusive access to the inpcb in udp_output() and ip_output() -- the lock passed down may be a read lock, in which case a cached route can be used if appropriate, but not replaced if it's not the right one or otherwise inappropriate. This particular issue won't affect TCP for the forseeable future as it almost universally uses write locking on the inpcb.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to