summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-19 12:45:14 +0000
committerErmal <eri@pfsense.org>2010-08-19 12:45:14 +0000
commit9a4c3eed1841f2ebd118875acc8cdbc1d14e8b7c (patch)
tree758a133f364ad803cedb9b8e0a2e89cdc18d82c9 /etc/inc/pfsense-utils.inc
parent7b87710838513521a0008228fe04b6362aea63b3 (diff)
downloadpfsense-9a4c3eed1841f2ebd118875acc8cdbc1d14e8b7c.zip
pfsense-9a4c3eed1841f2ebd118875acc8cdbc1d14e8b7c.tar.gz
Setup polling per interface rather only at bootup. This is a proper fix and a optimization on large interface cases. Also setup_microcode and polling defaults before configuring interfaces.
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc38
1 files changed, 6 insertions, 32 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 62e5e6f..3146306 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -275,26 +275,6 @@ function is_schedule_inuse($schedule) {
return false;
}
-/****f* pfsense-utils/setup_polling_defaults
- * NAME
- * sets up sysctls for polling
- * INPUTS
- *
- * RESULT
- * null
- * NOTES
- *
- ******/
-function setup_polling_defaults() {
- global $g, $config;
- if($config['system']['polling_each_burst'])
- mwexec("sysctl kern.polling.each_burst={$config['system']['polling_each_burst']}");
- if($config['system']['polling_burst_max'])
- mwexec("sysctl kern.polling.burst_max={$config['system']['polling_burst_max']}");
- if($config['system']['polling_user_frac'])
- mwexec("sysctl kern.polling.user_frac={$config['system']['polling_user_frac']}");
-}
-
/****f* pfsense-utils/setup_polling
* NAME
* sets up polling
@@ -315,18 +295,12 @@ function setup_polling() {
else
mwexec("/sbin/sysctl kern.polling.idle_poll=0");
- /* if list */
- $iflist = get_configured_interface_list();
-
- foreach ($iflist as $ifent => $ifname) {
- $real_interface = get_real_interface($ifname);
- if (interface_supports_polling($real_interface)) {
- if (isset($config['system']['polling']))
- pfSense_interface_capabilities($real_interface, IFCAP_POLLING);
- else
- pfSense_interface_capabilities($real_interface, -IFCAP_POLLING);
- }
- }
+ if($config['system']['polling_each_burst'])
+ mwexec("/sbin/sysctl kern.polling.each_burst={$config['system']['polling_each_burst']}");
+ if($config['system']['polling_burst_max'])
+ mwexec("/sbin/sysctl kern.polling.burst_max={$config['system']['polling_burst_max']}");
+ if($config['system']['polling_user_frac'])
+ mwexec("/sbin/sysctl kern.polling.user_frac={$config['system']['polling_user_frac']}");
}
/****f* pfsense-utils/setup_microcode
OpenPOWER on IntegriCloud