Cleanp leftover of the ifnet.if_addrhead parallelizing.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 8 Mar 2008 07:50:49 +0000 (07:50 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 8 Mar 2008 07:50:49 +0000 (07:50 +0000)
Reported-by: daily ISO building
sys/net/if.c
sys/platform/pc64/amd64/autoconf.c
sys/platform/vkernel/i386/autoconf.c
sys/vfs/nfs/bootp_subr.c

index af1d438..2c8b50c 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)if.c        8.3 (Berkeley) 1/4/94
  * $FreeBSD: src/sys/net/if.c,v 1.185 2004/03/13 02:35:03 brooks Exp $
- * $DragonFly: src/sys/net/if.c,v 1.61 2008/03/07 11:34:19 sephe Exp $
+ * $DragonFly: src/sys/net/if.c,v 1.62 2008/03/08 07:50:49 sephe Exp $
  */
 
 #include "opt_compat.h"
@@ -416,12 +416,12 @@ if_detach(struct ifnet *ifp)
 
                ifa = TAILQ_FIRST(&ifp->if_addrheads[mycpuid])->ifa;
                KASSERT(ifa->ifa_addr->sa_family == AF_LINK,
-                       ("non-link ifaddr is left on if_addrhead"));
+                       ("non-link ifaddr is left on if_addrheads"));
 
                ifa_ifunlink(ifa, ifp);
                ifa_destroy(ifa);
                KASSERT(TAILQ_EMPTY(&ifp->if_addrheads[mycpuid]),
-                       ("there are still ifaddrs left on if_addrhead"));
+                       ("there are still ifaddrs left on if_addrheads"));
        }
 
 #ifdef INET
index 935f58f..7a51aa7 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)autoconf.c    7.1 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $
- * $DragonFly: src/sys/platform/pc64/amd64/autoconf.c,v 1.1 2007/09/23 04:29:31 yanyh Exp $
+ * $DragonFly: src/sys/platform/pc64/amd64/autoconf.c,v 1.2 2008/03/08 07:50:49 sephe Exp $
  */
 
 /*
@@ -490,7 +490,11 @@ pxe_setup_nfsdiskless(void)
        ifa = NULL;
        ifp = TAILQ_FIRST(&ifnet);
        TAILQ_FOREACH(ifp, &ifnet, if_link) {
-               TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+               struct ifaddr_container *ifac;
+
+               TAILQ_FOREACH(ifac, &ifp->if_addrheads[mycpuid], ifa_link) {
+                       ifa = ifac->ifa;
+
                        if ((ifa->ifa_addr->sa_family == AF_LINK) &&
                            (sdl = ((struct sockaddr_dl *)ifa->ifa_addr))) {
                                if ((sdl->sdl_type == ourdl.sdl_type) &&
index 427ea10..fd4ccc4 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)autoconf.c    7.1 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $
- * $DragonFly: src/sys/platform/vkernel/i386/autoconf.c,v 1.14 2007/06/18 18:57:12 josepht Exp $
+ * $DragonFly: src/sys/platform/vkernel/i386/autoconf.c,v 1.15 2008/03/08 07:50:49 sephe Exp $
  */
 
 /*
@@ -490,7 +490,11 @@ pxe_setup_nfsdiskless(void)
        ifa = NULL;
        ifp = TAILQ_FIRST(&ifnet);
        TAILQ_FOREACH(ifp, &ifnet, if_link) {
-               TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+               struct ifaddr_container *ifac;
+
+               TAILQ_FOREACH(ifac, &ifp->if_addrheads[mycpuid], ifa_link) {
+                       ifa = ifac->ifa;
+
                        if ((ifa->ifa_addr->sa_family == AF_LINK) &&
                            (sdl = ((struct sockaddr_dl *)ifa->ifa_addr))) {
                                if ((sdl->sdl_type == ourdl.sdl_type) &&
index 3e43c69..8e50a48 100644 (file)
@@ -38,7 +38,7 @@
  * nfs/krpc_subr.c
  * $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $
  * $FreeBSD: src/sys/nfs/bootp_subr.c,v 1.20.2.9 2003/04/24 16:51:08 ambrisko Exp $
- * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.25 2008/03/07 11:34:21 sephe Exp $
+ * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.26 2008/03/08 07:50:49 sephe Exp $
  */
 
 #include "opt_bootp.h"
@@ -392,13 +392,16 @@ void
 bootpboot_p_iflist(void)
 {
        struct ifnet *ifp;
-       struct ifaddr *ifa;
+       struct ifaddr_container *ifac;
        
        kprintf("Interface list:\n");
        TAILQ_FOREACH(ifp, &ifnet, if_link) {
-               TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
+               TAILQ_FOREACH(ifac, &ifp->if_addrheads[mycpuid], ifa_link) {
+                       struct ifaddr *ifa = ifac->ifa;
+
                        if (ifa->ifa_addr->sa_family == AF_INET)
                                bootpboot_p_if(ifp, ifa);
+               }
        }
 }
 #endif /* defined(BOOTP_DEBUG) */