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 3b68bfc33..85572092d 100644
--- a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
+++ b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
@@ -95,6 +95,12 @@
true
The number of flow queues that are created and managed, leave empty for defaults
+
+ pipe.pie_enable
+
+ checkbox
+ Enable PIE active queue management
+
pipe.delay
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 f35b668c2..d33343861 100644
--- a/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml
+++ b/src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml
@@ -60,6 +60,12 @@
checkbox
true
Explicit Congestion Notification
+
+
+ queue.pie_enable
+
+ checkbox
+ Enable PIE active queue management
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 d631b79aa..7f4ee6790 100644
--- a/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
+++ b/src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
@@ -55,48 +55,67 @@
bucket size should be between 1...65535
- N
-
- Weighted Fair Queueing
-
- FIFO
- Deficit Round Robin
- QFQ
- FlowQueue-CoDel
-
+ N
+
+ Weighted Fair Queueing
+
+ FIFO
+ Deficit Round Robin
+ QFQ
+ FlowQueue-CoDel
+ FlowQueue-PIE
+
- 0
- Y
+ 0
+ Y
+
+
+ Only one option could be selected
+ SingleSelectConstraint
+
+ pie_enable
+
+
+
- N
- 1
- 10000
+ N
+ 1
+ 10000
- N
- 1
- 10000
+ N
+ 1
+ 10000
- 0
- Y
+ 0
+ Y
+
+ 0
+ Y
+
+
+ codel_enable.check001
+
+
+
- N
- 1
- 65535
+ N
+ 1
+ 65535
- N
- 1
- 65535
+ N
+ 1
+ 65535
- N
- 1
- 65535
+ N
+ 1
+ 65535
N
@@ -162,23 +181,41 @@
bucket size should be between 1...65535
- 0
- Y
+ 0
+ Y
+
+
+ CoDel and PIE can not be combined.
+ SingleSelectConstraint
+
+ pie_enable
+
+
+
- N
- 1
- 10000
+ N
+ 1
+ 10000
- N
- 1
- 10000
+ N
+ 1
+ 10000
- 0
- Y
+ 0
+ Y
+
+ 0
+ Y
+
+
+ codel_enable.check001
+
+
+
Y
/^([\t\n\v\f\r 0-9a-zA-Z.\-,_\x{00A0}-\x{FFFF}]){1,255}$/u
@@ -193,10 +230,10 @@
-
- 1
- Y
-
+
+ 1
+ Y
+
1
1000000
diff --git a/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf b/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
index a7cbb4a00..8432a3c3e 100644
--- a/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
+++ b/src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
@@ -52,8 +52,8 @@ pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/
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 %}
+{% endif %}{%
+ elif pipe.pie_enable|default('0') == '1' and pipe.scheduler != 'fq_pie' %} pie {% endif %}
{% endfor %}
{% endif %}
@@ -69,7 +69,8 @@ queue {{ queue.number }} config pipe {{ helpers.getUUID(queue.pipe).number
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 %}
+ if queue.codel_ecn_enable|default('0') == '1'%} ecn {% else %} noecn {% endif %}{%
+elif queue.pie_enable|default('0') == '1' %} pie
{% endif %}
{% endif %}