summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-03-15 19:40:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-03-15 19:40:42 +0000
commitbe4afdca2a5b4f0324ddb45bb3f51a9ad4bcbed4 (patch)
tree7cc7f6b3659d4ba09383a2f37552ffbf1c8add07 /sys/net
parentdb787728ab081e9d84b26e1a98431526e1420c27 (diff)
Introduce splsoftassert(), similar to splassert() but for soft interrupt
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c6
-rw-r--r--sys/net/if_pfsync.c14
-rw-r--r--sys/net/if_ppp.c8
-rw-r--r--sys/net/if_pppoe.c4
-rw-r--r--sys/net/pf.c8
-rw-r--r--sys/net/route.c4
6 files changed, 22 insertions, 22 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 3fc02fc5a0f..a7425d395c2 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.188 2009/02/24 21:14:12 claudio Exp $ */
+/* $OpenBSD: if.c,v 1.189 2009/03/15 19:40:41 miod Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1071,7 +1071,7 @@ if_down(struct ifnet *ifp)
{
struct ifaddr *ifa;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
ifp->if_flags &= ~IFF_UP;
microtime(&ifp->if_lastchange);
@@ -1107,7 +1107,7 @@ if_up(struct ifnet *ifp)
struct ifaddr *ifa;
#endif
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
ifp->if_flags |= IFF_UP;
microtime(&ifp->if_lastchange);
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index d140087c641..2ffc7275205 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.115 2009/03/01 12:02:39 dlg Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.116 2009/03/15 19:40:41 miod Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1771,7 +1771,7 @@ pfsync_insert_state(struct pf_state *st)
{
struct pfsync_softc *sc = pfsyncif;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (ISSET(st->rule.ptr->rule_flag, PFRULE_NOSYNC) ||
st->key[PF_SK_WIRE]->proto == IPPROTO_PFSYNC) {
@@ -1808,7 +1808,7 @@ pfsync_defer(struct pf_state *st, struct mbuf *m)
struct pfsync_softc *sc = pfsyncif;
struct pfsync_deferral *pd;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (sc->sc_deferred >= 128)
pfsync_undefer(TAILQ_FIRST(&sc->sc_deferrals), 0);
@@ -1837,7 +1837,7 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop)
{
struct pfsync_softc *sc = pfsyncif;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry);
sc->sc_deferred--;
@@ -1888,7 +1888,7 @@ pfsync_update_state(struct pf_state *st)
struct pfsync_softc *sc = pfsyncif;
int sync = 0;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (sc == NULL || !ISSET(sc->sc_if.if_flags, IFF_RUNNING))
return;
@@ -2010,7 +2010,7 @@ pfsync_delete_state(struct pf_state *st)
{
struct pfsync_softc *sc = pfsyncif;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (sc == NULL || !ISSET(sc->sc_if.if_flags, IFF_RUNNING))
return;
@@ -2057,7 +2057,7 @@ pfsync_clear_states(u_int32_t creatorid, const char *ifname)
struct pfsync_clr clr;
} __packed r;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (sc == NULL || !ISSET(sc->sc_if.if_flags, IFF_RUNNING))
return;
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index c535f9cac30..1caa5c66354 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ppp.c,v 1.52 2008/10/22 23:04:45 mpf Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.53 2009/03/15 19:40:41 miod Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
@@ -339,7 +339,7 @@ pppdealloc(sc)
{
struct mbuf *m;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if_down(&sc->sc_if);
sc->sc_if.if_flags &= ~(IFF_UP|IFF_RUNNING);
@@ -895,7 +895,7 @@ ppp_requeue(sc)
enum NPmode mode;
int error;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
for (mpp = &sc->sc_npqueue; (m = *mpp) != NULL; ) {
switch (PPP_PROTOCOL(mtod(m, u_char *))) {
@@ -1107,7 +1107,7 @@ pppintr()
int s, s2;
struct mbuf *m;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
s = splsoftnet(); /* XXX - what's the point of this? see comment above */
LIST_FOREACH(sc, &ppp_softc_list, sc_list) {
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c
index 832678aa985..7bbfd31e0de 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.29 2008/10/16 12:20:27 canacar Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.30 2009/03/15 19:40:41 miod Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -365,7 +365,7 @@ pppoeintr(void)
struct mbuf *m;
int s;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
for (;;) {
s = splnet();
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 7e79567ceec..67e0445ef95 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.638 2009/03/14 23:44:09 mcbride Exp $ */
+/* $OpenBSD: pf.c,v 1.639 2009/03/15 19:40:41 miod Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -804,7 +804,7 @@ int
pf_state_insert(struct pfi_kif *kif, struct pf_state_key *skw,
struct pf_state_key *sks, struct pf_state *s)
{
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
s->kif = kif;
@@ -1081,7 +1081,7 @@ pf_src_tree_remove_state(struct pf_state *s)
void
pf_unlink_state(struct pf_state *cur)
{
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
if (cur->src.state == PF_TCPS_PROXY_DST) {
/* XXX wire key the right one? */
@@ -1111,7 +1111,7 @@ pf_unlink_state(struct pf_state *cur)
void
pf_free_state(struct pf_state *cur)
{
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
#if NPFSYNC > 0
if (pfsync_state_in_use(cur))
diff --git a/sys/net/route.c b/sys/net/route.c
index ef71aca6dba..4cfa782c63a 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.104 2009/02/27 13:15:40 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.105 2009/03/15 19:40:41 miod Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -459,7 +459,7 @@ rtredirect(struct sockaddr *dst, struct sockaddr *gateway,
struct ifaddr *ifa;
struct ifnet *ifp = NULL;
- splassert(IPL_SOFTNET);
+ splsoftassert(IPL_SOFTNET);
/* verify the gateway is directly reachable */
if ((ifa = ifa_ifwithnet(gateway)) == NULL) {