From owner-cvs-all@FreeBSD.ORG Fri Oct 3 20:44:51 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7367E16A4B3; Fri, 3 Oct 2003 20:44:51 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD4AF43FE9; Fri, 3 Oct 2003 20:44:50 -0700 (PDT) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h943ioXJ040919; Fri, 3 Oct 2003 20:44:50 -0700 (PDT) (envelope-from sam@repoman.freebsd.org) Received: (from sam@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h943ioGN040918; Fri, 3 Oct 2003 20:44:50 -0700 (PDT) (envelope-from sam) Message-Id: <200310040344.h943ioGN040918@repoman.freebsd.org> From: Sam Leffler Date: Fri, 3 Oct 2003 20:44:50 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if.c if_disc.c if_faith.c if_loop.c if_stf.c route.c route.h rtsock.c src/sys/netinet if_atm.c if_ether.c in_pcb.c in_rmx.c ip_flow.c ip_icmp.c ip_output.c... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2003 03:44:51 -0000 sam 2003/10/03 20:44:50 PDT FreeBSD src repository Modified files: sys/net if.c if_disc.c if_faith.c if_loop.c if_stf.c route.c route.h rtsock.c sys/netinet if_atm.c if_ether.c in_pcb.c in_rmx.c ip_flow.c ip_icmp.c ip_output.c sys/netinet6 icmp6.c in6.c in6_ifattach.c in6_pcb.c in6_rmx.c in6_src.c ip6_output.c nd6.c nd6_rtr.c Log: 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) Revision Changes Path 1.166 +7 -5 src/sys/net/if.c 1.36 +2 -0 src/sys/net/if_disc.c 1.22 +3 -1 src/sys/net/if_faith.c 1.86 +2 -0 src/sys/net/if_loop.c 1.33 +1 -0 src/sys/net/if_stf.c 1.83 +203 -170 src/sys/net/route.c 1.50 +28 -17 src/sys/net/route.h 1.92 +9 -0 src/sys/net/rtsock.c 1.16 +2 -0 src/sys/netinet/if_atm.c 1.111 +53 -32 src/sys/netinet/if_ether.c 1.123 +9 -8 src/sys/netinet/in_pcb.c 1.45 +18 -11 src/sys/netinet/in_rmx.c 1.15 +2 -0 src/sys/netinet/ip_flow.c 1.80 +2 -2 src/sys/netinet/ip_icmp.c 1.195 +1 -1 src/sys/netinet/ip_output.c 1.33 +6 -8 src/sys/netinet6/icmp6.c 1.27 +31 -25 src/sys/netinet6/in6.c 1.14 +8 -4 src/sys/netinet6/in6_ifattach.c 1.40 +9 -5 src/sys/netinet6/in6_pcb.c 1.7 +18 -15 src/sys/netinet6/in6_rmx.c 1.11 +1 -0 src/sys/netinet6/in6_src.c 1.54 +2 -1 src/sys/netinet6/ip6_output.c 1.27 +16 -12 src/sys/netinet6/nd6.c 1.17 +8 -7 src/sys/netinet6/nd6_rtr.c