Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
083ca3c8
Commit
083ca3c8
authored
Apr 25, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(traffic shaper) add Codel / FQ-CoDel support,
https://github.com/opnsense/core/issues/505
parent
8c9be5ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
2 deletions
+148
-2
dialogPipe.xml
...p/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
+49
-0
dialogQueue.xml
.../controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml
+28
-0
TrafficShaper.xml
...e/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
+52
-0
ipfw.conf
src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
+19
-2
No files found.
src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
View file @
083ca3c8
...
...
@@ -50,6 +50,55 @@
<advanced>
true
</advanced>
<help>
Specify the scheduling algorithm to use
</help>
</field>
<field>
<id>
pipe.codel_enable
</id>
<label>
Enable CoDel
</label>
<type>
checkbox
</type>
<advanced>
true
</advanced>
<help>
Enable CoDel active queue management
</help>
</field>
<field>
<id>
pipe.codel_target
</id>
<label>
(FQ-)CoDel target
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
Minimum acceptable persistent queue delay (in ms), leave empty for default
</help>
</field>
<field>
<id>
pipe.codel_interval
</id>
<label>
(FQ-)CoDel interval
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
Interval before dropping packets (in ms), leave empty for default
</help>
</field>
<field>
<id>
pipe.codel_ecn_enable
</id>
<label>
(FQ-)CoDel ECN
</label>
<type>
checkbox
</type>
<advanced>
true
</advanced>
<help>
Explicit Congestion Notification
</help>
</field>
<field>
<id>
pipe.fqcodel_quantum
</id>
<label>
FQ-CoDel quantum
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
The number of bytes a queue can serve before being moved to the tail of old queues list (bytes), leave empty for defaults
</help>
</field>
<field>
<id>
pipe.fqcodel_limit
</id>
<label>
FQ-CoDel limit
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
The hard size limit of all queues managed by this instance, leave empty for defaults
</help>
</field>
<field>
<id>
pipe.fqcodel_flows
</id>
<label>
FQ-CoDel flows
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
The number of flow queues that are created and managed, leave empty for defaults
</help>
</field>
<field>
<id>
pipe.description
</id>
<label>
description
</label>
...
...
src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogQueue.xml
View file @
083ca3c8
...
...
@@ -26,6 +26,34 @@
<li>
choose source to provide all connected clients up to a maximum of this pipe configured bandwidth
</li>
]]>
</help>
</field>
<field>
<id>
queue.codel_enable
</id>
<label>
Enable CoDel
</label>
<type>
checkbox
</type>
<advanced>
true
</advanced>
<help>
Enable CoDel active queue management
</help>
</field>
<field>
<id>
queue.codel_target
</id>
<label>
(FQ-)CoDel target
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
Minimum acceptable persistent queue delay (in ms), leave empty for default
</help>
</field>
<field>
<id>
queue.codel_interval
</id>
<label>
(FQ-)CoDel interval
</label>
<type>
text
</type>
<advanced>
true
</advanced>
<help>
Interval before dropping packets (in ms), leave empty for default
</help>
</field>
<field>
<id>
queue.codel_ecn_enable
</id>
<label>
(FQ-)CoDel ECN
</label>
<type>
checkbox
</type>
<advanced>
true
</advanced>
<help>
Explicit Congestion Notification
</help>
</field>
<field>
<id>
queue.description
</id>
<label>
description
</label>
...
...
src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
View file @
083ca3c8
...
...
@@ -59,8 +59,42 @@
<fifo>
FIFO
</fifo>
<rr>
Deficit Round Robin
</rr>
<qfq>
QFQ
</qfq>
<fq_codel>
FlowQueue-CoDel
</fq_codel>
</OptionValues>
</scheduler>
<codel_enable
type=
"BooleanField"
>
<default>
0
</default>
<Required>
Y
</Required>
</codel_enable>
<codel_target
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
10000
</MaximumValue>
</codel_target>
<codel_interval
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
10000
</MaximumValue>
</codel_interval>
<codel_ecn_enable
type=
"BooleanField"
>
<default>
0
</default>
<Required>
Y
</Required>
</codel_ecn_enable>
<fqcodel_quantum
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
65535
</MaximumValue>
</fqcodel_quantum>
<fqcodel_limit
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
65535
</MaximumValue>
</fqcodel_limit>
<fqcodel_flows
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
65535
</MaximumValue>
</fqcodel_flows>
<origin
type=
"TextField"
>
<Required>
N
</Required>
<mask>
/^([a-z,A-Z,1-9]){0,30}$/
</mask>
...
...
@@ -112,6 +146,24 @@
<dst-ip>
destination
</dst-ip>
</OptionValues>
</mask>
<codel_enable
type=
"BooleanField"
>
<default>
0
</default>
<Required>
Y
</Required>
</codel_enable>
<codel_target
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
10000
</MaximumValue>
</codel_target>
<codel_interval
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
1
</MinimumValue>
<MaximumValue>
10000
</MaximumValue>
</codel_interval>
<codel_ecn_enable
type=
"BooleanField"
>
<default>
0
</default>
<Required>
Y
</Required>
</codel_ecn_enable>
<description
type=
"TextField"
>
<Required>
Y
</Required>
<mask>
/^([\t\n\v\f\r 0-9a-zA-Z.\-,_\x{00A0}-\x{FFFF}]){1,255}$/u
</mask>
...
...
src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
View file @
083ca3c8
...
...
@@ -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
}}
0
xffffffff
{%
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
%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment