Module Name:    src
Committed By:   pooka
Date:           Wed Aug 11 09:36:45 UTC 2010

Modified Files:
        src/sys/netinet: ip_carp.c

Log Message:
Use kpause() instead of DELAY() and sleep a minimum of 1 tick.
This is possible now since softints have a thread context.  It's
also not a very frequent code path.  Addresses ABI issue with delay
(kern/40505).

I'm not entire sure what this delay is meant to accomplish, though.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/netinet/ip_carp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_carp.c
diff -u src/sys/netinet/ip_carp.c:1.42 src/sys/netinet/ip_carp.c:1.43
--- src/sys/netinet/ip_carp.c:1.42	Tue Aug 10 21:46:12 2010
+++ src/sys/netinet/ip_carp.c	Wed Aug 11 09:36:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_carp.c,v 1.42 2010/08/10 21:46:12 pooka Exp $	*/
+/*	$NetBSD: ip_carp.c,v 1.43 2010/08/11 09:36:44 pooka Exp $	*/
 /*	$OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $	*/
 
 /*
@@ -30,7 +30,7 @@
 #include "opt_inet.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.42 2010/08/10 21:46:12 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.43 2010/08/11 09:36:44 pooka Exp $");
 
 /*
  * TODO:
@@ -1149,7 +1149,9 @@
 
 		in = &ifatoia(ifa)->ia_addr.sin_addr;
 		arprequest(sc->sc_carpdev, in, in, CLLADDR(sc->sc_if.if_sadl));
-		DELAY(1000);	/* XXX */
+
+		/* XXX: why does this need to delay? */
+		kpause("carpdel", false, MIN(1, mstohz(1)), NULL);
 	}
 	splx(s);
 }
@@ -1171,7 +1173,9 @@
 		in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
 		nd6_na_output(sc->sc_carpdev, &mcast, in6,
 		    ND_NA_FLAG_OVERRIDE, 1, NULL);
-		DELAY(1000);	/* XXX */
+
+		/* XXX: why does this need to delay? */
+		kpause("carpdel6", false, MIN(1, mstohz(1)), NULL);
 	}
 	splx(s);
 }

Reply via email to