summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-28 15:56:53 -0400
committerjim-p <jimp@pfsense.org>2010-06-28 15:59:03 -0400
commit9e3aadbe90cb6708fa86471fef45be5965bea602 (patch)
tree77a987f5a3c82469d4763781274dbeb28aab52d4
parente88ace756391836878b81e8b4fb88776d96872c5 (diff)
downloadpfsense-9e3aadbe90cb6708fa86471fef45be5965bea602.zip
pfsense-9e3aadbe90cb6708fa86471fef45be5965bea602.tar.gz
Add checkboxes to disable TSO and LRO since some drivers will misbehave with them set. Resolves #703
-rw-r--r--etc/inc/pfsense-utils.inc21
-rw-r--r--usr/local/www/system_advanced_network.php36
2 files changed, 54 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index e3eef07..8d2e894 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -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']))
diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php
index d744a47..6c67e30 100644
--- a/usr/local/www/system_advanced_network.php
+++ b/usr/local/www/system_advanced_network.php
@@ -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">
OpenPOWER on IntegriCloud