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.
This commit is contained in:
parent
db61e8e25d
commit
57ec5229b9
|
@ -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 $ */
|
/* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#include "opt_inet.h"
|
#include "opt_inet.h"
|
||||||
|
|
||||||
#include <sys/cdefs.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:
|
* TODO:
|
||||||
|
@ -1149,7 +1149,9 @@ carp_send_arp(struct carp_softc *sc)
|
||||||
|
|
||||||
in = &ifatoia(ifa)->ia_addr.sin_addr;
|
in = &ifatoia(ifa)->ia_addr.sin_addr;
|
||||||
arprequest(sc->sc_carpdev, in, in, CLLADDR(sc->sc_if.if_sadl));
|
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);
|
splx(s);
|
||||||
}
|
}
|
||||||
|
@ -1171,7 +1173,9 @@ carp_send_na(struct carp_softc *sc)
|
||||||
in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
|
in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
|
||||||
nd6_na_output(sc->sc_carpdev, &mcast, in6,
|
nd6_na_output(sc->sc_carpdev, &mcast, in6,
|
||||||
ND_NA_FLAG_OVERRIDE, 1, NULL);
|
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);
|
splx(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue