[15/17] QoS: Drop support for setting TOS bits per class

Message ID 20191014164627.18516-15-michael.tremer@ipfire.org
State Staged
Commit 3174d9c6b610c1f1ce1e7a8828a4575def2e2392
Headers show
Series
  • [01/17] QoS: Do not manually load iptables modules
Related show

Commit Message

Michael Tremer Oct. 14, 2019, 4:46 p.m. UTC
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>
---
 config/qos/makeqosscripts.pl | 24 ------------------------
 html/cgi-bin/qos.cgi         | 12 ------------
 2 files changed, 36 deletions(-)

Patch

diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl
index 9a57aad28..4f66b20b4 100644
--- a/config/qos/makeqosscripts.pl
+++ b/config/qos/makeqosscripts.pl
@@ -128,7 +128,6 @@  case "\$1" in
 		echo "[iptables]"
 		iptables -t mangle -n -L QOS-OUT -v -x 2> /dev/null
 		iptables -t mangle -n -L QOS-INC -v -x 2> /dev/null
-		iptables -t mangle -n -L QOS-TOS -v -x 2> /dev/null
 		exit 0
 	  ;;
 	esac
@@ -191,9 +190,7 @@  print <<END
 
 	### ADD QOS-OUT CHAIN TO THE MANGLE TABLE IN IPTABLES
 	iptables -t mangle -N QOS-OUT
-	iptables -t mangle -N QOS-TOS
 	iptables -t mangle -I POSTROUTING -o $qossettings{'RED_DEV'} -j QOS-OUT
-	iptables -t mangle -A POSTROUTING -o $qossettings{'RED_DEV'} -j QOS-TOS
 
 	### Don't change mark on traffic for the ipsec tunnel
 	iptables -t mangle -A QOS-OUT -m mark --mark 50 -j RETURN
@@ -401,7 +398,6 @@  print <<END
 	### ADD QOS-INC CHAIN TO THE MANGLE TABLE IN IPTABLES
 	iptables -t mangle -N QOS-INC
 	iptables -t mangle -A FORWARD -i $qossettings{'RED_DEV'} -j QOS-INC
-	iptables -t mangle -A FORWARD -i $qossettings{'RED_DEV'} -j QOS-TOS
 
 	### SET TOS
 END
@@ -509,22 +505,6 @@  print <<END
 	### REDUNDANT: SET ALL NONMARKED PACKETS TO DEFAULT CLASS
 	iptables -t mangle -A QOS-INC -j CLASSIFY --set-class 2:$qossettings{'DEFCLASS_INC'}
 
-	### SETTING TOS BITS
-END
-;
-	foreach $classentry (sort @classes)
-	{
-		@classline = split( /\;/, $classentry );
-		$qossettings{'CLASS'} = $classline[1];
-		$qossettings{'TOS'} = abs $classline[7] * 2;
-		if ($qossettings{'TOS'} ne "0") {
-			print "\tiptables -t mangle -A QOS-TOS -m mark --mark $qossettings{'CLASS'} -j TOS --set-tos $qossettings{'TOS'}\n";
-			print "\tiptables -t mangle -A QOS-TOS -m mark --mark $qossettings{'CLASS'} -j RETURN\n";
-		}
-	}
-
-print <<END
-
 	## STARTING COLLECTOR
 	/usr/local/bin/qosd $qossettings{'RED_DEV'} >/dev/null 2>&1
 	/usr/local/bin/qosd $qossettings{'IMQ_DEV'} >/dev/null 2>&1
@@ -553,15 +533,11 @@  print <<END
 
 	# REMOVE & FLUSH CHAINS
 	iptables -t mangle --delete POSTROUTING -o $qossettings{'RED_DEV'} -j QOS-OUT >/dev/null 2>&1
-	iptables -t mangle --delete POSTROUTING -o $qossettings{'RED_DEV'} -j QOS-TOS >/dev/null 2>&1
 	iptables -t mangle --delete FORWARD -i $qossettings{'RED_DEV'} -j QOS-INC >/dev/null 2>&1
-	iptables -t mangle --delete FORWARD -i $qossettings{'RED_DEV'} -j QOS-TOS >/dev/null 2>&1
 	iptables -t mangle --flush  QOS-OUT >/dev/null 2>&1
 	iptables -t mangle --delete-chain QOS-OUT >/dev/null 2>&1
 	iptables -t mangle --flush  QOS-INC >/dev/null 2>&1
 	iptables -t mangle --delete-chain QOS-INC >/dev/null 2>&1
-	iptables -t mangle --flush  QOS-TOS >/dev/null 2>&1
-	iptables -t mangle --delete-chain QOS-TOS >/dev/null 2>&1
 
 	rmmod sch_htb >/dev/null 2>&1
 
diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi
index 320eef67d..8211a3ca0 100644
--- a/html/cgi-bin/qos.cgi
+++ b/html/cgi-bin/qos.cgi
@@ -883,18 +883,6 @@  END
 		<tr><td width='33%' align='right'>Ceilburst:
 		    <td width='33%' align='left'><input type='text' size='20' name='CBURST' maxlength='8' value="$qossettings{'CBURST'}" />
 		    <td width='33%' align='center'>&nbsp;
-END
-;
-			$selected{'TOS'}{$qossettings{'TOS'}} = "selected='selected'";
-print <<END
-		<tr><td width='33%' align='right'>TOS-Bit:
-		    <td width='33%' align='left'><select name='TOS'>
-				<option value='0' $selected{'TOS'}{'0'}>$Lang::tr{'disabled'} (0)</option>
-				<option value='8' $selected{'TOS'}{'8'}>$Lang::tr{'min delay'} (8)</option>
-				<option value='4' $selected{'TOS'}{'4'}>$Lang::tr{'max throughput'} (4)</option>
-				<option value='2' $selected{'TOS'}{'2'}>$Lang::tr{'max reliability'} (2)</option>
-				<option value='1' $selected{'TOS'}{'1'}>$Lang::tr{'min costs'} (1)</option></select>
-		    <td width='33%' align='center'>&nbsp;
 		<tr><td width='33%' align='right'>$Lang::tr{'remark'}:
 		    <td width='66%' colspan='2' align='left'><input type='text' name='REMARK' size='40' maxlength='40' value="$qossettings{'REMARK'}" />
 		<tr><td width='33%' align='right'><img src='/blob.gif' alt='*' />&nbsp;$Lang::tr{'required field'}