Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2005 21:27:41 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 80632 for review
Message-ID:  <200507202127.j6KLRfQ6012601@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=80632

Change 80632 by rwatson@rwatson_zoo on 2005/07/20 21:27:06

	While unsatisfactory from the perspective of addressing inter-layer
	and network layer locking for multicast address lists and data,
	acquire the link layer multicast address lock around network layer
	iteration of the link layer multicast address list.  This will
	change when I work on the network layer behavior.

Affected files ...

.. //depot/projects/netsmp/src/sys/netinet/in_var.h#4 edit
.. //depot/projects/netsmp/src/sys/netinet6/in6_var.h#3 edit

Differences ...

==== //depot/projects/netsmp/src/sys/netinet/in_var.h#4 (text+ko) ====

@@ -187,7 +187,7 @@
 do { \
 	struct ifmultiaddr *ifma; \
 \
-	IF_ADDR_LOCK_ASSERT(ifp); \
+	IF_ADDR_LOCK(ifp); \
 	TAILQ_FOREACH(ifma, &((ifp)->if_multiaddrs), ifma_link) { \
 		if (ifma->ifma_addr->sa_family == AF_INET \
 		    && ((struct sockaddr_in *)ifma->ifma_addr)->sin_addr.s_addr == \
@@ -195,6 +195,7 @@
 			break; \
 	} \
 	(inm) = ifma ? ifma->ifma_protospec : 0; \
+	IF_ADDR_UNLOCK(ifp); \
 } while(0)
 
 /*

==== //depot/projects/netsmp/src/sys/netinet6/in6_var.h#3 (text+ko) ====

@@ -545,7 +545,7 @@
 /* struct in6_multi *in6m; */					\
 do { \
 	struct ifmultiaddr *ifma; \
-	IF_ADDR_LOCK_ASSERT(ifp); \
+	IF_ADDR_LOCK(ifp); \
 	TAILQ_FOREACH(ifma, &(ifp)->if_multiaddrs, ifma_link) { \
 		if (ifma->ifma_addr->sa_family == AF_INET6 \
 		    && IN6_ARE_ADDR_EQUAL(&((struct sockaddr_in6 *)ifma->ifma_addr)->sin6_addr, \
@@ -553,6 +553,7 @@
 			break; \
 	} \
 	(in6m) = (struct in6_multi *)(ifma ? ifma->ifma_protospec : 0); \
+	IF_ADDR_UNLOCK(ifp); \
 } while(0)
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507202127.j6KLRfQ6012601>