107 Commits

Author SHA1 Message Date
Michael Tremer
52d0a1e2db Revert "parse-func.pl: Adjust regular expression to changed 'tc' output"
This reverts commit ca06e817b8.

The incorrect output has been fixed in tc.

Fixes: #13150
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2023-06-25 13:42:51 +00:00
Peter Müller
ca06e817b8 parse-func.pl: Adjust regular expression to changed 'tc' output
It is not clear at all why they choose to change the tool's output this
way in upstream commit 010a8388aea11e767ba3a2506728b9ad9760df0e, but
we'll have to make do with this.

Fixes: #13075
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-04-07 14:35:11 +00:00
Peter Müller
65df34a6f6 Do not mark migrate.pl as executable in Git
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-04-04 21:12:39 +00:00
Michael Tremer
f62ea5a998 QoS: Add CAKE profile to commmand line
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-16 15:17:50 +00:00
Michael Tremer
546119da9e QoS: Replace fq_codel by CAKE
This is just swappin the qdisc without any further configuration.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-16 15:17:50 +00:00
Michael Tremer
7091738a5c QoS: Do not try to unload any kernel modules
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2021-11-19 07:30:26 +01:00
Arne Fitzenreiter
98d78fa824 makeqosscript: fix typo in comment.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-25 15:46:07 +02:00
Arne Fitzenreiter
a8dd6e98ba speed.cgi: replave parsing of ip show output
latest ipfroute2 update change the output so this repkace it by reading /sys/class/net/*/statistics

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-25 12:58:10 +02:00
Arne Fitzenreiter
36b00b8ed1 makeqosscript: replace marks b< ipt policy match for upsec
this is more reliable at not loose some connections.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-25 11:46:06 +02:00
Arne Fitzenreiter
819fdfb17a QoS: imgress Connmark restore, layer7 and IPSec handling
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-18 14:44:59 +02:00
Arne Fitzenreiter
3c838a59ea makeqosscripts: add missing parenthesis at QOS_OUT Layer7 rules.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-16 10:18:42 +02:00
Michael Tremer
51c4b73f7a IPsec: Replace MARK 50 by 0x00800000
This change is necessary because we are using the right-hand two bytes
for storing the QoS classes.

All IPsec traffic will now be skipped and never classified by the QoS.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:47:27 +00:00
Michael Tremer
f857c5c630 QoS: Make outgoing packet processing use CONNMARK
This will significantly reduce the load when classifying outgoing
traffic as there won't be any overhead as soon as the connection has
been classified. The classficiation is being stored in the iptables MARK
which will be copied to CONNMARK if changed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:50 +00:00
Michael Tremer
0bb882c4bb QoS: Drop support for hardcoded ACK rules
This feature has to go in order to take advantage of CONNMARK which will
drastically decrease CPU load when passing packets.

We no longer will see every packet in the QOS-INC chain in order to
change classification of that packet. It is also party counter-intuitive
to have parts of one connection in one class and the corresponding ACK
packets in another.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:35 +00:00
Michael Tremer
c825fcef40 firewall: Always restore all connection marks
This was done by tc only when QoS was enabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:23 +00:00
Michael Tremer
45329c0a66 QoS: Use the two right hand bytes to mark packets
In order to not deal with any marks from NAT and the IPS, this patch
adds masks to all places where packets are being marked for individual
QoS classes.

Instead of being able to use the "fw" match in tc, we have to use the
u32 to apply the mask.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:06 +00:00
Michael Tremer
d704e75d75 QoS: Do no classify as default when L7 filter isn't done
We need to allow some more packets to pass through the
mangle chains so that the layer 7 filter can determine
what protocol it finds.

If L7 filter decides that a connection is of type "unknown",
we mark it as default, or it is marked with the correct class.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-22 15:57:01 +00:00
Michael Tremer
615bf6e0f0 QoS: Delete more unused iptables commands
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:36 +00:00
Michael Tremer
76bf53db8b QoS: Drop support for setting TOS bits per class
This is useless since no ISP will evaluate those settings
any more and it has a rather large impact on throughput.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:31 +00:00
Michael Tremer
6f07564242 QoS: No longer set TOS bits for ACK packets
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:29 +00:00
Michael Tremer
1e35eeac59 QoS: Remove some IPsec rules which never worked
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:25 +00:00
Michael Tremer
fc09b98296 QoS: Classify incoming traffic in PREROUTING
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:23 +00:00
Daniel Weismüller
4b5aa97393 QoS: Use CONNMARK to mark connections in connection tracking
This patch modifies the connection tracking in that ways that
it sets a connection mark which will be retrieved when a packet
is being redirected to the IFB interface.

This way, we can use classification without having the packet
being sent through iptables first.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:20 +00:00
Michael Tremer
7d770777e0 Revert "Make IMQ Switchable between PREROUTING and POSTROUTING"
This reverts commit 88b8ffac6b.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:14 +00:00
Michael Tremer
afe23fbb52 QoS: Drop support for subclasses
This feature was never properly implemented and the UI was dead

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:12 +00:00
Michael Tremer
8d6b654369 QoS: Suppress an error message when cleaning up from previous runs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:10 +00:00
Michael Tremer
50ed363e89 QoS: Do not delete egress qdisc after classes have been created
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:58:06 +00:00
Michael Tremer
677c1f47d7 QoS: Start qosd immediately
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:57:59 +00:00
Michael Tremer
96f16b8501 QoS: Tidy up qdiscs after QoS is being stopped
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:57:53 +00:00
Michael Tremer
0dfb3984d0 QoS: Use Intermediate Functional Block
This is an alternative implementation to the Intermediate Queuing
Device (IMQ) which is an out-of-tree kernel patch and has been
criticised for being slow, especially with mutliple processors.

IFB is part of the mainline kernel and a lot less code.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:57:41 +00:00
Michael Tremer
c37af2f004 QoS: Do not manually load iptables modules
This should not be necessary and causes the script to
wait for two seconds.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-21 18:57:14 +00:00
Arne Fitzenreiter
fb41342122 Revert "QoS: Do not manually load iptables modules"
This reverts commit cae6916d59.
2019-10-20 20:25:24 +00:00
Arne Fitzenreiter
bd122644e4 Revert "QoS: Use Intermediate Functional Block"
This reverts commit 3c33d9d854.
2019-10-20 20:24:43 +00:00
Arne Fitzenreiter
707e0471ce Revert "Revert "Make IMQ Switchable between PREROUTING and POSTROUTING""
This reverts commit ec01ebe246.
2019-10-20 20:24:16 +00:00
Arne Fitzenreiter
5e661eb533 Revert "QoS: Tidy up qdiscs after QoS is being stopped"
This reverts commit eedf7b06c0.
2019-10-20 20:23:54 +00:00
Arne Fitzenreiter
005fc8ed5d Revert "QoS: Process incoming packets in PREROUTING only"
This reverts commit e6341c5856.
2019-10-20 20:23:13 +00:00
Arne Fitzenreiter
d7297c477a Revert "QoS: Do not delete egress qdisc after classes have been created"
This reverts commit 39ff91ecf8.
2019-10-20 20:21:53 +00:00
Arne Fitzenreiter
fb8d7759b8 Revert "QoS: Start qosd immediately"
This reverts commit 6a9bcd6c1d.
2019-10-20 20:21:23 +00:00
Arne Fitzenreiter
fc08e632e3 Revert "QoS: Suppress an error message when cleaning up from previous runs"
This reverts commit cebad6e2b9.
2019-10-20 20:19:58 +00:00
Arne Fitzenreiter
896f24cc58 Revert "QoS: Move packet classification to FORWARD chain for ingress"
This reverts commit 424a332fd3.
2019-10-20 20:19:21 +00:00
Arne Fitzenreiter
323900264f Revert "QoS: Use CLASSIFY iptables target instead of MARK"
This reverts commit 3e151d19f9.
2019-10-20 20:18:56 +00:00
Arne Fitzenreiter
bebc33813a Revert "QoS: Drop tc filter rules to move marked packets into the correct class"
This reverts commit 63f7d7475e.
2019-10-20 20:18:34 +00:00
Arne Fitzenreiter
50e97cd55f Revert "QoS: Drop support for subclasses"
This reverts commit bc4d4da870.
2019-10-20 20:18:00 +00:00
Arne Fitzenreiter
6aeaa3a75e Revert "QoS: Drop support for setting TOS bits per class"
This reverts commit 3174d9c6b6.
2019-10-20 20:17:18 +00:00
Arne Fitzenreiter
ac45e4f3e9 Revert "QoS: No longer set TOS bits for ACK packets"
This reverts commit b1c695e872.
2019-10-20 20:16:05 +00:00
Michael Tremer
d33ad4bdfe QoS: Increase queue size and quantum for fq_codel
This optimises the QoS to process more bandwidth.

The limit variable sets the maximum number of packets in the
queue which was regularly exceeded on fast connections with
the old setting. This now allows up to 10G of data transfer
and is set to the default of fq_codel.

Quantum sets how many bytes can be read from the queue per
iteration. This is now set to the default again, which is
the size of an Ethernet frame including its header.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 18:05:21 +00:00
Michael Tremer
b1c695e872 QoS: No longer set TOS bits for ACK packets
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 18:05:06 +00:00
Michael Tremer
3174d9c6b6 QoS: Drop support for setting TOS bits per class
This is useless since no ISP will evaluate those settings
any more and it has a rather large impact on throughput.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 18:04:53 +00:00
Michael Tremer
bc4d4da870 QoS: Drop support for subclasses
This feature was never properly implemented and the UI was dead

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 18:04:39 +00:00
Michael Tremer
63f7d7475e QoS: Drop tc filter rules to move marked packets into the correct class
This is no longer necessary since we are now using CLASSIFY

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 18:03:59 +00:00