summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-10-18 13:57:24 +0000
committerandre <andre@FreeBSD.org>2012-10-18 13:57:24 +0000
commit34a9a386cb4df8844bca8e43dae20e4a15710fcc (patch)
tree822857ae1f88eb65d6756450fb5600f0644b00d1 /sys/netgraph
parentbec3d0dcde51da4b3b1a5bc9fbea92a5353a57ed (diff)
downloadFreeBSD-src-34a9a386cb4df8844bca8e43dae20e4a15710fcc.zip
FreeBSD-src-34a9a386cb4df8844bca8e43dae20e4a15710fcc.tar.gz
Mechanically remove the last stray remains of spl* calls from net*/*.
They have been Noop's for a long time now.
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/atm/ccatm/ng_ccatm.c3
-rw-r--r--sys/netgraph/atm/sscfu/ng_sscfu.c3
-rw-r--r--sys/netgraph/atm/sscop/ng_sscop.c3
-rw-r--r--sys/netgraph/atm/uni/ng_uni.c3
-rw-r--r--sys/netgraph/ng_eiface.c9
-rw-r--r--sys/netgraph/ng_ether.c7
-rw-r--r--sys/netgraph/ng_fec.c4
-rw-r--r--sys/netgraph/ng_gif.c9
-rw-r--r--sys/netgraph/ng_ksocket.c9
-rw-r--r--sys/netgraph/ng_source.c3
10 files changed, 4 insertions, 49 deletions
diff --git a/sys/netgraph/atm/ccatm/ng_ccatm.c b/sys/netgraph/atm/ccatm/ng_ccatm.c
index 92e162c..a6ff474 100644
--- a/sys/netgraph/atm/ccatm/ng_ccatm.c
+++ b/sys/netgraph/atm/ccatm/ng_ccatm.c
@@ -1178,10 +1178,8 @@ ng_ccatm_log(const char *fmt, ...)
static int
ng_ccatm_mod_event(module_t mod, int event, void *data)
{
- int s;
int error = 0;
- s = splnet();
switch (event) {
case MOD_LOAD:
@@ -1194,6 +1192,5 @@ ng_ccatm_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/atm/sscfu/ng_sscfu.c b/sys/netgraph/atm/sscfu/ng_sscfu.c
index cca8198..45ccf49 100644
--- a/sys/netgraph/atm/sscfu/ng_sscfu.c
+++ b/sys/netgraph/atm/sscfu/ng_sscfu.c
@@ -587,10 +587,8 @@ sscfu_verbose(struct sscfu *sscfu, void *arg, const char *fmt, ...)
static int
ng_sscfu_mod_event(module_t mod, int event, void *data)
{
- int s;
int error = 0;
- s = splnet();
switch (event) {
case MOD_LOAD:
@@ -603,6 +601,5 @@ ng_sscfu_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/atm/sscop/ng_sscop.c b/sys/netgraph/atm/sscop/ng_sscop.c
index 729c818..67a3f07 100644
--- a/sys/netgraph/atm/sscop/ng_sscop.c
+++ b/sys/netgraph/atm/sscop/ng_sscop.c
@@ -861,10 +861,8 @@ sscop_send_manage(struct sscop *sscop, void *p, enum sscop_maasig sig,
static int
ng_sscop_mod_event(module_t mod, int event, void *data)
{
- int s;
int error = 0;
- s = splnet();
switch (event) {
case MOD_LOAD:
@@ -877,6 +875,5 @@ ng_sscop_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/atm/uni/ng_uni.c b/sys/netgraph/atm/uni/ng_uni.c
index 980b81a..7a3fe92 100644
--- a/sys/netgraph/atm/uni/ng_uni.c
+++ b/sys/netgraph/atm/uni/ng_uni.c
@@ -907,10 +907,8 @@ ng_uni_free(enum unimem type, void *ptr, const char *file, u_int lno)
static int
ng_uni_mod_event(module_t mod, int event, void *data)
{
- int s;
int error = 0;
- s = splnet();
switch(event) {
case MOD_LOAD:
@@ -925,6 +923,5 @@ ng_uni_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index d761a6c..0f471bb 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -132,12 +132,11 @@ ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
const priv_p priv = (priv_p)ifp->if_softc;
struct ifreq *const ifr = (struct ifreq *)data;
- int s, error = 0;
+ int error = 0;
#ifdef DEBUG
ng_eiface_print_ioctl(ifp, command, data);
#endif
- s = splimp();
switch (command) {
/* These two are mostly handled at a higher layer */
@@ -193,7 +192,6 @@ ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = EINVAL;
break;
}
- splx(s);
return (error);
}
@@ -202,14 +200,9 @@ ng_eiface_init(void *xsc)
{
priv_p sc = xsc;
struct ifnet *ifp = sc->ifp;
- int s;
-
- s = splimp();
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-
- splx(s);
}
/*
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index ed928fe..05d2e6e 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -220,8 +220,6 @@ NETGRAPH_INIT(ether, &ng_ether_typestruct);
/*
* Handle a packet that has come in on an interface. We get to
* look at it here before any upper layer protocols do.
- *
- * NOTE: this function will get called at splimp()
*/
static void
ng_ether_input(struct ifnet *ifp, struct mbuf **mp)
@@ -239,8 +237,6 @@ ng_ether_input(struct ifnet *ifp, struct mbuf **mp)
/*
* Handle a packet that has come in on an interface, and which
* does not match any of our known protocols (an ``orphan'').
- *
- * NOTE: this function will get called at splimp()
*/
static void
ng_ether_input_orphan(struct ifnet *ifp, struct mbuf *m)
@@ -759,9 +755,7 @@ static int
ng_ether_mod_event(module_t mod, int event, void *data)
{
int error = 0;
- int s;
- s = splnet();
switch (event) {
case MOD_LOAD:
@@ -802,7 +796,6 @@ ng_ether_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/ng_fec.c b/sys/netgraph/ng_fec.c
index 53f59e7..459931a 100644
--- a/sys/netgraph/ng_fec.c
+++ b/sys/netgraph/ng_fec.c
@@ -753,7 +753,7 @@ static int
ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct ifreq *const ifr = (struct ifreq *) data;
- int s, error = 0;
+ int error = 0;
struct ng_fec_private *priv;
struct ng_fec_bundle *b;
@@ -763,7 +763,6 @@ ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
#ifdef DEBUG
ng_fec_print_ioctl(ifp, command, data);
#endif
- s = splimp();
switch (command) {
/* These two are mostly handled at a higher layer */
@@ -843,7 +842,6 @@ ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = EINVAL;
break;
}
- (void) splx(s);
return (error);
}
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index 1790cbd..d362152 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -163,8 +163,6 @@ NETGRAPH_INIT(gif, &ng_gif_typestruct);
/*
* Handle a packet that has come in on an interface. We get to
* look at it here before any upper layer protocols do.
- *
- * NOTE: this function will get called at splimp()
*/
static void
ng_gif_input(struct ifnet *ifp, struct mbuf **mp, int af)
@@ -181,8 +179,6 @@ ng_gif_input(struct ifnet *ifp, struct mbuf **mp, int af)
/*
* Handle a packet that has come in on an interface, and which
* does not match any of our known protocols (an ``orphan'').
- *
- * NOTE: this function will get called at splimp()
*/
static void
ng_gif_input_orphan(struct ifnet *ifp, struct mbuf *m, int af)
@@ -203,8 +199,6 @@ ng_gif_input_orphan(struct ifnet *ifp, struct mbuf *m, int af)
/*
* Handle a packet that has come in on a gif interface.
* Attach the address family to the mbuf for later use.
- *
- * NOTE: this function will get called at splimp()
*/
static void
ng_gif_input2(node_p node, struct mbuf **mp, int af)
@@ -543,9 +537,7 @@ ng_gif_mod_event(module_t mod, int event, void *data)
VNET_ITERATOR_DECL(vnet_iter);
struct ifnet *ifp;
int error = 0;
- int s;
- s = splnet();
switch (event) {
case MOD_LOAD:
@@ -597,7 +589,6 @@ ng_gif_mod_event(module_t mod, int event, void *data)
error = EOPNOTSUPP;
break;
}
- splx(s);
return (error);
}
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index cacb524..15c8ce0 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -1045,9 +1045,7 @@ ng_ksocket_incoming2(node_p node, hook_p hook, void *arg1, int arg2)
struct mbuf *m;
struct ng_mesg *response;
struct uio auio;
- int s, flags, error;
-
- s = splnet();
+ int flags, error;
/* so = priv->so; *//* XXX could have derived this like so */
KASSERT(so == priv->so, ("%s: wrong socket", __func__));
@@ -1094,10 +1092,8 @@ ng_ksocket_incoming2(node_p node, hook_p hook, void *arg1, int arg2)
* the hook gets created and is connected, this upcall function
* will be called again.
*/
- if (priv->hook == NULL) {
- splx(s);
+ if (priv->hook == NULL)
return;
- }
/* Read and forward available mbuf's */
auio.uio_td = NULL;
@@ -1165,7 +1161,6 @@ sendit: /* Forward data with optional peer sockaddr as packet tag */
}
priv->flags |= KSF_EOFSEEN;
}
- splx(s);
}
/*
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index e4ff1b3..83473f9 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -608,7 +608,6 @@ static int
ng_source_store_output_ifp(sc_p sc, char *ifname)
{
struct ifnet *ifp;
- int s;
ifp = ifunit(ifname);
@@ -624,13 +623,11 @@ ng_source_store_output_ifp(sc_p sc, char *ifname)
* interface with small packets.
* XXX we should restore the original value at stop or disconnect
*/
- s = splimp(); /* XXX is this required? */
if (ifp->if_snd.ifq_maxlen < NG_SOURCE_DRIVER_IFQ_MAXLEN) {
printf("ng_source: changing ifq_maxlen from %d to %d\n",
ifp->if_snd.ifq_maxlen, NG_SOURCE_DRIVER_IFQ_MAXLEN);
ifp->if_snd.ifq_maxlen = NG_SOURCE_DRIVER_IFQ_MAXLEN;
}
- splx(s);
#endif
return (0);
}
OpenPOWER on IntegriCloud