Commit a801eb11 authored by Ad Schellevis's avatar Ad Schellevis

interface offloading, add txcsum6, trxcsum6 for https://github.com/opnsense/core/issues/1227

parent e55feb1e
...@@ -245,6 +245,7 @@ function configure_interface_hardware($ifs) ...@@ -245,6 +245,7 @@ function configure_interface_hardware($ifs)
if (!stristr($ifs, "_vlan") && is_array($intf_details)) { if (!stristr($ifs, "_vlan") && is_array($intf_details)) {
// get current settings // get current settings
$csum_set = in_array('rxcsum', $intf_details['options']) || in_array('txcsum', $intf_details['options']); $csum_set = in_array('rxcsum', $intf_details['options']) || in_array('txcsum', $intf_details['options']);
$csumv6_set = in_array('rxcsum6', $intf_details['options']) || in_array('txcsum6', $intf_details['options']);
$tso_set = in_array('tso4', $intf_details['options']) || in_array('tso6', $intf_details['options']); $tso_set = in_array('tso4', $intf_details['options']) || in_array('tso6', $intf_details['options']);
$lro_set = in_array('lro', $intf_details['options']); $lro_set = in_array('lro', $intf_details['options']);
...@@ -254,6 +255,12 @@ function configure_interface_hardware($ifs) ...@@ -254,6 +255,12 @@ function configure_interface_hardware($ifs)
} elseif (!isset($config['system']['disablechecksumoffloading']) && !$csum_set) { } elseif (!isset($config['system']['disablechecksumoffloading']) && !$csum_set) {
legacy_interface_flags($ifs, 'txcsum rxcsum', false); legacy_interface_flags($ifs, 'txcsum rxcsum', false);
} }
if (isset($config['system']['disablechecksumoffloading']) && $csumv6_set) {
legacy_interface_flags($ifs, '-txcsum6 -rxcsum6', false);
} elseif (!isset($config['system']['disablechecksumoffloading']) && !$csumv6_set) {
legacy_interface_flags($ifs, 'txcsum6 rxcsum6', false);
}
// TCP segmentation offloading // TCP segmentation offloading
if (isset($config['system']['disablesegmentationoffloading']) && $tso_set) { if (isset($config['system']['disablesegmentationoffloading']) && $tso_set) {
legacy_interface_flags($ifs, '-tso', false); legacy_interface_flags($ifs, '-tso', false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment