Project

General

Profile

« Previous | Next » 

Revision c553931b

Added by Chris Buechler about 16 years ago

Load glxsb by default, unless disabled. Add option to disable to System -> Advanced.

View differences:

etc/inc/pfsense-utils.inc
854 854
	}
855 855
}
856 856

  
857
/****f* pfsense-utils/setup_glxsb
858
 * NAME
859
 *   setup_glxsb - loads or unloads glxsb module as needed
860
 * INPUTS
861
 *   null
862
 * RESULT
863
 *   null
864
 ******/
865
function setup_glxsb() {
866
        global $config, $g;
867
        $is_loaded = `/sbin/kldstat | /usr/bin/grep -c glxsb`;
868
        if (!isset($config['system']['disableglxsb']) && ($is_loaded == 0)) {
869
                mwexec("/sbin/kldload glxsb");
870
        } elseif (isset($config['system']['disableglxsb']) && ($is_loaded > 0)) {
871
                mwexec("/sbin/kldunload glxsb");
872
        }
873
        
874
}
875

  
857 876
/****f* pfsense-utils/return_dir_as_array
858 877
 * NAME
859 878
 *   return_dir_as_array - Return a directory's contents as an array.
......
3857 3876
}
3858 3877

  
3859 3878

  
3860
?>
3879
?>
etc/rc.bootup
304 304
	echo "Setting up microcode and tx/rx offloading...";
305 305
	setup_microcode();
306 306
	echo "done.\n";
307
	
308
	/* load glxsb unless it's disabled */
309
	setup_glxsb();
307 310

  
308 311
	mwexec("/sbin/pfctl -f /tmp/rules.debug");
309 312

  
usr/local/www/system_advanced.php
60 60
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
61 61
$pconfig['disablenatreflection'] = $config['system']['disablenatreflection'];
62 62
$pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']);
63
$pconfig['disableglxsb'] = isset($config['system']['disableglxsb']);
63 64
$pconfig['disablescrub'] = isset($config['system']['disablescrub']);
64 65
$pconfig['shapertype']             = $config['system']['shapertype'];
65 66
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
......
238 239
			unset($config['system']['disablechecksumoffloading']);
239 240
                        setup_microcode();
240 241
		}
242
                
243
                if($_POST['disableglxsb'] == "yes") {
244
			$config['system']['disableglxsb'] = $_POST['disableglxsb'];
245
                        setup_glxsb();
246
		} else {
247
			unset($config['system']['disableglxsb']);
248
                        setup_glxsb();
249
		}
241 250

  
242 251
		if($_POST['disablescrub'] == "yes") {
243 252
			$config['system']['disablescrub'] = $_POST['disablescrub'];
......
689 698
			<td colspan="2" class="list" height="12">&nbsp;</td>
690 699
		</tr>
691 700
		<tr>
692
			<td colspan="2" valign="top" class="listtopic">Hardware Checksum Offloading</td>
701
			<td colspan="2" valign="top" class="listtopic">Hardware Options</td>
693 702
		</tr>
694 703
		<tr>
695 704
			<td width="22%" valign="top" class="vncell">Disable Hardware Checksum Offloading</td>
......
697 706
				<input name="disablechecksumoffloading" type="checkbox" id="disablechecksumoffloading" value="yes" <?php if (isset($config['system']['disablechecksumoffloading'])) echo "checked"; ?> onclick="enable_change(false)" />
698 707
				<strong>Checking this option will disable hardware checksum offloading.  Checksum offloading is broken in some hardware, particularly some Realtek cards. Rarely, drivers may have problems with checksum offloading and some specific NICs.</strong>
699 708
			</td>
709
		</tr>
710
       		<tr>
711
			<td width="22%" valign="top" class="vncell">Disable glxsb loading</td>
712
			<td width="78%" class="vtable">
713
				<input name="disableglxsb" type="checkbox" id="disableglxsb" value="yes" <?php if (isset($config['system']['disableglxsb'])) echo "checked"; ?> onclick="enable_change(false)" />
714
                                <span class="vexpl"><strong>Checking this option will disable loading of the glxsb driver.</strong></span>
715
                                <br>
716
                                <span>The glxsb crypto accelerator is found on some Geode platforms (PC Engines ALIX among others).  When using a better crypto card such as a Hifn, you will want to disable the glxsb. <strong>If this device is currently in use, YOU MUST REBOOT for it to be unloaded.</strong></span>
717
			</td>
700 718
		</tr>		
719

  
701 720
		<tr>
702 721
			<td width="22%" valign="top">&nbsp;</td>
703 722
			<td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td>

Also available in: Unified diff