qos-scripts: drop the use of IMQ, use ifb and act_connmark instead
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25640 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5b934a6fcf
commit
5e317a6c87
4 changed files with 40 additions and 24 deletions
|
@ -33,26 +33,34 @@ print_comments() {
|
|||
echo ''
|
||||
}
|
||||
|
||||
get_device() {
|
||||
( config_load network; scan_interfaces; config_get "$1" ifname )
|
||||
}
|
||||
|
||||
interface_stats() {
|
||||
local interface="$1"
|
||||
local device
|
||||
|
||||
config_get device "$interface" device
|
||||
device="$(get_device "$interface")"
|
||||
[ -z "$device" ] && config_get device "$interface" device
|
||||
config_get_bool enabled "$interface" enabled 1
|
||||
[ -z "$device" -o 1 -ne "$enabled" ] && {
|
||||
return 1
|
||||
}
|
||||
config_get_bool halfduplex "$interface" halfduplex
|
||||
config_get_bool halfduplex "$interface" halfduplex 0
|
||||
|
||||
[ 1 -ne "$halfduplex" ] && {
|
||||
if [ 1 -ne "$halfduplex" ]; then
|
||||
unset halfduplex
|
||||
print_comments "$interface" "Egress" "Start"
|
||||
tc -s class show dev "$device"
|
||||
print_comments "$interface" "Egress" "End"
|
||||
}
|
||||
id="root"
|
||||
else
|
||||
id=""
|
||||
fi
|
||||
|
||||
print_comments "$interface" "Ingress${halfduplex:+/Egress}" "Start"
|
||||
tc -s class show dev "$(iptables -v -L PREROUTING -t mangle | awk '/IMQ: todev .*$/ && $6 ~ /'$device'/ {print "imq"$12}')"
|
||||
tc -s class show dev "$(tc filter show dev $device $id | grep mirred | sed -e 's,.*\(ifb.*\)).*,\1,')"
|
||||
print_comments "$interface" "Ingress${halfduplex:+/Egress}" "End"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue