这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/etc/inc/interfaces.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7063,9 +7063,14 @@ function is_altq_capable($int) {
"sis", "sk", "ste", "stge", "ti", "tun", "txp", "udav",
"ural", "vge", "vlan", "vmx", "vr", "vte", "vtnet", "xl");

// These drivers have optional ALTQ support, which can be disabled
$optionally_capable = array("hn", "vtnet");

$int_family = remove_ifindex($int);

if (in_array($int_family, $capable)) {
if (in_array($int_family, $capable) && !in_array($int_family, $optionally_capable)) {
return true;
} elseif (in_array($int_family, $optionally_capable) && config_path_enabled('system','hn_altq_enable')) {
return true;
} elseif (stristr($int, "l2tp")) { /* VLANs are named $parent_$vlan now */
return true;
Expand Down
6 changes: 4 additions & 2 deletions src/etc/inc/pfsense-utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1324,10 +1324,13 @@ function setup_loader_settings($path = "", $upgrade = false) {
$data[] = 'vm.pmap.pti="0"';
}

/* Enable ALTQ support for hnX NICs. */
/* Enable ALTQ support for vtnetX/hnX NICs. */
if (config_path_enabled('system','hn_altq_enable')) {
$data[] = 'hw.hn.vf_transparent="0"';
$data[] = 'hw.hn.use_if_start="1"';
$data[] = 'hw.vtnet.altq_disable="0"';
} else {
$data[] = 'hw.vtnet.altq_disable="1"';
}

/* Set maximum send queue length. */
Expand Down Expand Up @@ -4672,7 +4675,6 @@ function remove_pppoe_cron_items(string $interface = '') {
}
}
}

/**
* Fixes a variety of configuration issues.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/usr/local/www/system_advanced_network.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@

$section->addInput(new Form_Checkbox(
'hnaltqenable',
'hn ALTQ support',
'Enable the ALTQ support for hn NICs.',
'virtual NIC ALTQ support',
'Enable the ALTQ support for vtnet/hn NICs.',
$pconfig['hnaltqenable']
))->setHelp('Checking this option will enable the ALTQ support for hn NICs. '.
))->setHelp('Checking this option will enable the ALTQ support for vtnet/hn NICs. '.
'The ALTQ support disables the multiqueue API and may reduce the system '.
'capability to handle traffic. This will take effect after a machine reboot.');

Expand Down