mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add checkboxes to disable TSO and LRO since some drivers will misbehave with them set. Resolves #703
This commit is contained in:
parent
e88ace7563
commit
9e3aadbe90
@ -215,6 +215,27 @@ function enable_hardware_offloading($interface) {
|
||||
pfSense_interface_capabilities($interface, IFCAP_RXCSUM);
|
||||
}
|
||||
|
||||
if($config['system']['disablesegmentationoffloading']) {
|
||||
if (isset($options['encaps']['tso4']))
|
||||
pfSense_interface_capabilities($interface, -IFCAP_TSO);
|
||||
if (isset($options['encaps']['tso6']))
|
||||
pfSense_interface_capabilities($interface, -IFCAP_TSO);
|
||||
} else {
|
||||
if (isset($options['caps']['tso4']))
|
||||
pfSense_interface_capabilities($interface, IFCAP_TSO);
|
||||
if (isset($options['caps']['tso6']))
|
||||
pfSense_interface_capabilities($interface, IFCAP_TSO);
|
||||
}
|
||||
|
||||
if($config['system']['disablelargereceiveoffloading']) {
|
||||
if (isset($options['encaps']['lro']))
|
||||
pfSense_interface_capabilities($interface, -IFCAP_LRO);
|
||||
} else {
|
||||
if (isset($options['caps']['lro']))
|
||||
pfSense_interface_capabilities($interface, IFCAP_LRO);
|
||||
}
|
||||
|
||||
|
||||
/* if the NIC supports polling *AND* it is enabled in the GUI */
|
||||
$polling = isset($config['system']['polling']);
|
||||
if($polling && isset($options['caps']['polling']))
|
||||
|
||||
@ -54,6 +54,8 @@ $pconfig['ipv6allow'] = isset($config['system']['ipv6allow']);
|
||||
$pconfig['polling_enable'] = isset($config['system']['polling']);
|
||||
$pconfig['sharednet'] = $config['system']['sharednet'];
|
||||
$pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']);
|
||||
$pconfig['disablesegmentationoffloading'] = isset($config['system']['disablesegmentationoffloading']);
|
||||
$pconfig['disablelargereceiveoffloading'] = isset($config['system']['disablelargereceiveoffloading']);
|
||||
$pconfig['flowtable'] = false;
|
||||
$pconfig['flowtable'] = isset($config['system']['flowtable']);
|
||||
|
||||
@ -111,12 +113,24 @@ if ($_POST) {
|
||||
|
||||
if($_POST['disablechecksumoffloading'] == "yes") {
|
||||
$config['system']['disablechecksumoffloading'] = $_POST['disablechecksumoffloading'];
|
||||
setup_microcode();
|
||||
} else {
|
||||
unset($config['system']['disablechecksumoffloading']);
|
||||
setup_microcode();
|
||||
}
|
||||
|
||||
if($_POST['disablesegmentationoffloading'] == "yes") {
|
||||
$config['system']['disablesegmentationoffloading'] = $_POST['disablesegmentationoffloading'];
|
||||
} else {
|
||||
unset($config['system']['disablesegmentationoffloading']);
|
||||
}
|
||||
|
||||
if($_POST['disablelargereceiveoffloading'] == "yes") {
|
||||
$config['system']['disablelargereceiveoffloading'] = $_POST['disablelargereceiveoffloading'];
|
||||
} else {
|
||||
unset($config['system']['disablelargereceiveoffloading']);
|
||||
}
|
||||
|
||||
setup_microcode();
|
||||
|
||||
// Write out configuration (config.xml)
|
||||
write_config();
|
||||
|
||||
@ -234,7 +248,23 @@ function enable_change(enable_over) {
|
||||
<strong><?=gettext("Disable hardware checksum offload"); ?></strong><br>
|
||||
<?=gettext("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."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Hardware TCP Segmentation Offloading"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="disablesegmentationoffloading" type="checkbox" id="disablesegmentationoffloading" value="yes" <?php if (isset($config['system']['disablesegmentationoffloading'])) echo "checked"; ?> />
|
||||
<strong><?=gettext("Disable hardware TCP segmentation offload"); ?></strong><br>
|
||||
<?=gettext("Checking this option will disable hardware TCP segmentation offloading (TSO, TSO4, TSO6). This offloading is broken in some hardware drivers, and may impact performance with some specific NICs."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Hardware Large Receive Offloading"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="disablelargereceiveoffloading" type="checkbox" id="disablelargereceiveoffloading" value="yes" <?php if (isset($config['system']['disablelargereceiveoffloading'])) echo "checked"; ?> />
|
||||
<strong><?=gettext("Disable hardware large receive offload"); ?></strong><br>
|
||||
<?=gettext("Checking this option will disable hardware large receive offloading (LRO). This offloading is broken in some hardware drivers, and may impact performance with some specific NICs.."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("ARP Handling"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user