Closed honglei closed 4 years ago
Thanks for the report. Can you please confirm what it says on line 139 to 141 for you?
https://github.com/magnific0/wondershaper/blob/master/wondershaper#L139-L141
Also can you copy your conf files? CONF="/etc/systemd/wondershaper.conf"; if that does not exist: CONFLEGACY="/etc/conf.d/wondershaper.conf";
line 138~141
if [[ -n "$USPEED" ]]; then
tc class add dev "$IFACE" parent 1: classid 1:1 htb \
rate "${USPEED}kbit" \
prio 5 ${COMMONOPTIONS[@]};
So, do I need copy the wondershaper-master/wondershaper.conf
to dir /etc/systemd/
?
[root@localhost wondershaper-master]# ls /etc/conf.d
ls: cannot access '/etc/conf.d': No such file or directory
[root@localhost wondershaper-master]# ls /etc/systemd/
coredump.conf logind.conf system user
journald.conf resolved.conf system.conf user.conf
Hmm, thanks. That rules out my few guesses. Can you do
PS4='Line ${LINENO}: ' bash -x ./wondershaper -a ens160 -d 4096 -u 4096
so we can figure out which line the warnings are originating.
[root@localhost wondershaper-master]# PS4='Line ${LINENO}: ' bash -x ./wondershaper -a ens160 -d 4096 -u 4096
+ QUANTUM=6000
+ VERSION=1.4.1
+ CONF=/etc/systemd/wondershaper.conf
+ CONFLEGACY=/etc/conf.d/wondershaper.conf
+ eval export HIPRIODST=
++ export HIPRIODST=
++ HIPRIODST=
+ eval export COMMONOPTIONS=
++ export COMMONOPTIONS=
++ COMMONOPTIONS=
+ eval export NOPRIOHOSTSRC=
++ export NOPRIOHOSTSRC=
++ NOPRIOHOSTSRC=
+ eval export NOPRIOHOSTDST=
++ export NOPRIOHOSTDST=
++ NOPRIOHOSTDST=
+ eval export NOPRIOPORTSRC=
++ export NOPRIOPORTSRC=
++ NOPRIOPORTSRC=
+ eval export NOPRIOPORTDST=
++ export NOPRIOPORTDST=
++ NOPRIOPORTDST=
+ DSPEED=
+ USPEED=
+ IFACE=
+ IFB=ifb0
+ MODE=
+ getopts hvd:u:a:pcs o
+ case "$o" in
+ IFACE=ens160
+ getopts hvd:u:a:pcs o
+ case "$o" in
+ DSPEED=4096
+ getopts hvd:u:a:pcs o
+ case "$o" in
+ USPEED=4096
+ getopts hvd:u:a:pcs o
+ '[' '' = presets ']'
+ [[ -n '' ]]
+ '[' '' = status ']'
+ '[' '' = clear ']'
+ [[ -z 4096 ]]
+ [[ -z ens160 ]]
+ tc qdisc add dev ens160 root handle 1: htb default 20
Error: NLM_F_REPLACE needed to override.
+ [[ -n 4096 ]]
+ tc class add dev ens160 parent 1: classid 1:1 htb rate 4096kbit prio 5
RTNETLINK answers: No such file or directory
+ RATE=819
+ '[' 819 -eq 0 ']'
+ tc class add dev ens160 parent 1:1 classid 1:10 htb rate 819kbit ceil 3891kbit prio 1
RTNETLINK answers: No such file or directory
+ RATE=1638
+ '[' 1638 -eq 0 ']'
+ tc class add dev ens160 parent 1:1 classid 1:20 htb rate 4096kbit ceil 3891kbit prio 2
RTNETLINK answers: No such file or directory
+ RATE=819
+ '[' 819 -eq 0 ']'
+ tc class add dev ens160 parent 1:1 classid 1:30 htb rate 4096kbit ceil 3686kbit prio 3
RTNETLINK answers: No such file or directory
+ tc qdisc add dev ens160 parent 1:10 handle 10: sfq perturb 10 quantum 6000
Error: Failed to find specified qdisc.
+ tc qdisc add dev ens160 parent 1:20 handle 20: sfq perturb 10 quantum 6000
Error: Failed to find specified qdisc.
+ tc qdisc add dev ens160 parent 1:30 handle 30: sfq perturb 10 quantum 6000
Error: Failed to find specified qdisc.
+ tc filter add dev ens160 parent 1: protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
+ for host in "${HIPRIODST[@]}"
+ tc filter add dev ens160 parent 1: protocol ip prio 10 u32 match ip dst '' flowid 1:10
Illegal "match"
+ tc filter add dev ens160 parent 1: protocol ip prio 11 u32 match ip protocol 1 0xff flowid 1:10
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
+ tc filter add dev ens160 parent 1: protocol ip prio 12 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 flowid 1:10
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
+ for a in "${NOPRIOPORTDST[@]}"
+ tc filter add dev ens160 parent 1: protocol ip prio 14 u32 match ip dport '' 0xffff flowid 1:30
Illegal "match"
+ for a in "${NOPRIOPORTSRC[@]}"
+ tc filter add dev ens160 parent 1: protocol ip prio 15 u32 match ip sport '' 0xffff flowid 1:30
Illegal "match"
+ for a in "${NOPRIOHOSTSRC[@]}"
+ tc filter add dev ens160 parent 1: protocol ip prio 16 u32 match ip src '' flowid 1:30
Illegal "match"
+ for a in "${NOPRIOHOSTDST[@]}"
+ tc filter add dev ens160 parent 1: protocol ip prio 17 u32 match ip dst flowid 1:30
Illegal "match"
+ tc filter add dev ens160 parent 1: protocol ip prio 18 u32 match ip dst 0.0.0.0/0 flowid 1:20
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
+ [[ -n 4096 ]]
+ modprobe ifb numifbs=1
+ ip link set dev ifb0 up
+ tc qdisc add dev ens160 handle ffff: ingress
Error: Exclusivity flag on, cannot modify.
+ tc filter add dev ens160 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
+ tc qdisc add dev ifb0 root handle 2: htb
Error: Exclusivity flag on, cannot modify.
+ tc class add dev ifb0 parent 2: classid 2:1 htb rate 4096kbit
RTNETLINK answers: File exists
+ tc filter add dev ifb0 protocol ip parent 2: prio 1 u32 match ip src 0.0.0.0/0 flowid 2:1
[root@localhost wondershaper-master]#
I have same problem while using Debian 10. But wondershaper V1.4.0 was work for me before.
@honglei thank you for showing the log. This helps a lot. It seems with empty arrays for the PRIO NONPRIO hosts the loops were still engaged. @StormYudi thanks for confirming.
Can you please let me know if the latest version is now also fixed for you?
I've tested the latest version in Debian 10, it fixed the problem, thank you for your work, that's a great project and I am loving it : )
Thanks for the quick reply and kind words!