Blue wrote:
Hi, all:
I am wondering why the FreeBSD-6.1 version removes the route cache in
PCB (struct inpcbin in_pcb.h)? Does the removal do anything good? Or its
existence would have potential problems? 'Cause in my opinion, the
removal would only produce extra time when emitting a packet since the
routing table lookup is unavoidable. So there's must be a good reason
for the change.
The routing table pointer was complicating the SMP locking of the kernel
and had some other drawbacks. With the pointer route changes would not
be picked up immediately but only when packets got lost and caused ICMP
responses. And for that many full PCB table walks had to be done.
Simplicity was chosen and the route pointer was removed. The tradeoff
isn't really bad as for most hosts the routing table is really small
containing only the default route and some ARP entries. A lookup there
is pretty much always a cache only operation. Only the locking overhead
for the routing table lookup adds in but we would have to do much of it
anyway to increment the refcount on the rtentry to send the packet. On
servers with many connections the routing table could get quite large
because of all these cloned routes and consume valuable kernel memory.
No more routes for PCB's are cloned after the change.
--
Andre
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"