From 65dea9fbc041371113df13ac3dc2023920e675f7 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 13 Oct 2005 02:14:23 +0000 Subject: Enable polling for an interface if it supports it. Thanks to the revised polling code that is SMP compatible! --- etc/inc/pfsense-utils.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'etc/inc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index b7d683a..c1d3738 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -124,6 +124,18 @@ function enable_hardware_offloading($interface) { if(isset($config['system']['do_not_use_nic_microcode'])) return; if($g['booting']) { + /* active polling for interface if it supports it + * man polling on a freebsd box for the following list + */ + $supported_ints = array('dc', 'em', 'fwe', 'fwip', 'fxp', 'ixgb', + 'nge', 're', 'rl', 'sf', 'sis', 'ste', 'vge', 'vr', 'xl', 'fxp'); + foreach($supported_ints as $int) { + echo "\n{$interface} "; + if(stristr($interface,$int) != false) { + echo "enable polling for {$interface}"; + mwexec("/sbin/ifconfig {$interface} polling"); + } + } /* translate wan, lan, opt -> real interface if needed */ $int = filter_translate_type_to_real_interface($interface); if($int <> "") $interface = $int; -- cgit v1.1