summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_poll.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-08-15 23:07:43 +0000
committerrwatson <rwatson@FreeBSD.org>2009-08-15 23:07:43 +0000
commit400012e1fe3a91b1e1ba25400408cb2a46974743 (patch)
treed2b8c8d439a64332c690ba6a2ca9c5df822ab8f4 /sys/kern/kern_poll.c
parente905082a5a59cce82377b1bf910e37f03c0eb91c (diff)
downloadFreeBSD-src-400012e1fe3a91b1e1ba25400408cb2a46974743.zip
FreeBSD-src-400012e1fe3a91b1e1ba25400408cb2a46974743.tar.gz
Rather than fix questionable ifnet list locking in the implementation of
the kern.polling.enable sysctl, remove the sysctl. It has been deprecated since FreeBSD 6 in favour of per-ifnet polling flags. Reviewed by: luigi Approved by: re (kib)
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r--sys/kern/kern_poll.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c
index 5df26bb..8441126 100644
--- a/sys/kern/kern_poll.c
+++ b/sys/kern/kern_poll.c
@@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$");
#include <net/netisr.h> /* for NETISR_POLL */
#include <net/vnet.h>
-static int poll_switch(SYSCTL_HANDLER_ARGS);
-
void hardclock_device_poll(void); /* hook from hardclock */
static struct mtx poll_mtx;
@@ -230,10 +228,6 @@ static uint32_t poll_handlers; /* next free entry in pr[]. */
SYSCTL_UINT(_kern_polling, OID_AUTO, handlers, CTLFLAG_RD,
&poll_handlers, 0, "Number of registered poll handlers");
-static int polling = 0;
-SYSCTL_PROC(_kern_polling, OID_AUTO, enable, CTLTYPE_UINT | CTLFLAG_RW,
- 0, sizeof(int), poll_switch, "I", "Switch polling for all interfaces");
-
static uint32_t phase;
SYSCTL_UINT(_kern_polling, OID_AUTO, phase, CTLFLAG_RD,
&phase, 0, "Polling phase");
@@ -538,49 +532,6 @@ ether_poll_deregister(struct ifnet *ifp)
return (0);
}
-/*
- * Legacy interface for turning polling on all interfaces at one time.
- */
-static int
-poll_switch(SYSCTL_HANDLER_ARGS)
-{
- struct ifnet *ifp;
- int error;
- int val = polling;
-
- error = sysctl_handle_int(oidp, &val, 0, req);
- if (error || !req->newptr )
- return (error);
-
- if (val == polling)
- return (0);
-
- if (val < 0 || val > 1)
- return (EINVAL);
-
- polling = val;
-
- IFNET_RLOCK();
- TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
- if (ifp->if_capabilities & IFCAP_POLLING) {
- struct ifreq ifr;
-
- if (val == 1)
- ifr.ifr_reqcap =
- ifp->if_capenable | IFCAP_POLLING;
- else
- ifr.ifr_reqcap =
- ifp->if_capenable & ~IFCAP_POLLING;
- (void) (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr);
- }
- }
- IFNET_RUNLOCK();
-
- log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)");
-
- return (0);
-}
-
static void
poll_idle(void)
{
OpenPOWER on IntegriCloud