diff --git a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml index 69d6bba1a..457928033 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml +++ b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml @@ -50,6 +50,55 @@ true Specify the scheduling algorithm to use + + pipe.codel_enable + + checkbox + true + Enable CoDel active queue management + + + pipe.codel_target + + text + true + Minimum acceptable persistent queue delay (in ms), leave empty for default + + + pipe.codel_interval + + text + true + Interval before dropping packets (in ms), leave empty for default + + + pipe.codel_ecn_enable + + checkbox + true + Explicit Congestion Notification + + + pipe.fqcodel_quantum + + text + true + The number of bytes a queue can serve before being moved to the tail of old queues list (bytes), leave empty for defaults + + + pipe.fqcodel_limit + + text + true + The hard size limit of all queues managed by this instance, leave empty for defaults + + + pipe.fqcodel_flows + + text + true + The number of flow queues that are created and managed, leave empty for defaults + pipe.description diff --git a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml index 4d0df0adb..b2c7fb8d6 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml +++ b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml @@ -26,6 +26,34 @@
  • choose source to provide all connected clients up to a maximum of this pipe configured bandwidth
  • ]]>
    + + queue.codel_enable + + checkbox + true + Enable CoDel active queue management + + + queue.codel_target + + text + true + Minimum acceptable persistent queue delay (in ms), leave empty for default + + + queue.codel_interval + + text + true + Interval before dropping packets (in ms), leave empty for default + + + queue.codel_ecn_enable + + checkbox + true + Explicit Congestion Notification + queue.description diff --git a/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml b/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml index 4358aac9a..81a28cfd3 100644 --- a/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml +++ b/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml @@ -59,8 +59,42 @@ FIFO Deficit Round Robin QFQ + FlowQueue-CoDel + + 0 + Y + + + N + 1 + 10000 + + + N + 1 + 10000 + + + 0 + Y + + + N + 1 + 65535 + + + N + 1 + 65535 + + + N + 1 + 65535 + N /^([a-z,A-Z,1-9]){0,30}$/ @@ -112,6 +146,24 @@ destination + + 0 + Y + + + N + 1 + 10000 + + + N + 1 + 10000 + + + 0 + Y + Y /^([\t\n\v\f\r 0-9a-zA-Z.\-,_\x{00A0}-\x{FFFF}]){1,255}$/u diff --git a/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf b/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf index f08a6f5ea..47bd4039a 100644 --- a/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf +++ b/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf @@ -40,7 +40,18 @@ pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/ if pipe.queue %} queue {{ pipe.queue }}{% if pipe.queueMetric != 'slots' %}{{pipe.queueMetric}}{% endif %}{% endif %}{% if pipe.mask != 'none' %} mask {{ pipe.mask }} 0xffffffff {% endif %} type {% - if pipe.scheduler|default('') != '' %}{{pipe.scheduler}}{% else %}wf2q+{% endif %} + if pipe.scheduler|default('') != '' %} {{pipe.scheduler}} {% else %} wf2q+ {% endif %}{% + if pipe.codel_enable|default('0') == '1' and pipe.scheduler != 'fq_codel' %} codel {% endif %}{% + if pipe.codel_enable|default('0') == '1' or pipe.scheduler == 'fq_codel' %}{% + if pipe.codel_target|default('') != ''%} target {{pipe.codel_target}} {% endif %}{% + if pipe.codel_interval|default('') != ''%} interval {{pipe.codel_interval}} {% endif %}{% + if pipe.codel_ecn_enable|default('0') == '1'%} ecn {% else %} noecn {% endif %} {% + if pipe.scheduler == 'fq_codel' %} {% + if pipe.fqcodel_quantum|default('') != '' %} quantum {{pipe.fqcodel_quantum}} {% endif %} {% + if pipe.fqcodel_limit|default('') != '' %} limit {{pipe.fqcodel_limit}} {% endif %} {% + if pipe.fqcodel_flows|default('') != '' %} flows {{pipe.fqcodel_flows}} {% endif %} +{% endif %} +{% endif %} {% endfor %} {% endif %} @@ -51,7 +62,13 @@ pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/ {% if helpers.exists('OPNsense.TrafficShaper.queues.queue') %} {% for queue in helpers.toList('OPNsense.TrafficShaper.queues.queue') %} {% if helpers.getUUIDtag(queue.pipe) in ['pipe'] %} -queue {{ queue.number }} config pipe {{ helpers.getUUID(queue.pipe).number }} weight {{ queue.weight }} +queue {{ queue.number }} config pipe {{ helpers.getUUID(queue.pipe).number }} weight {{ queue.weight }}{% +if queue.codel_enable|default('0') == '1' %} codel {% + if queue.codel_target|default('') != ''%} target {{queue.codel_target}} {% endif %}{% + if queue.codel_interval|default('') != ''%} interval {{queue.codel_interval}} {% endif %}{% + if queue.codel_ecn_enable|default('0') == '1'%} ecn {% else %} noecn {% endif %} +{% endif %} + {% endif %} {% endfor %} {% endif %}