From 57ec5229b9125e9cea76b012114c2f8b9d6a22bc Mon Sep 17 00:00:00 2001 From: pooka Date: Wed, 11 Aug 2010 09:36:44 +0000 Subject: [PATCH] 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. --- sys/netinet/ip_carp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 9aa571ddbfeb..5bdf444038b6 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -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 -__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 @@ carp_send_arp(struct carp_softc *sc) 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 @@ carp_send_na(struct carp_softc *sc) 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); }