I try to start BPI-R2 work as router with integrated card + frank-w kernel 4.14, and after iperf3 tests, my speed at wifi link is down to 0. After more manipulations, I detect what this trouble only at kernels > 4.14-main-20190125150733 from (https://github.com/frank-w/BPI-R2-4.14/releases/tag/CI-BUILD-20190125150730-1089b6c7a609) And I think “troubles” with [defconfig] added options for Traffic Shaping at next kernel versions. P.S. Thanks frank-w for big work! Anybody known how to, disable traffic shaping?
I don’t think adding traffic shaping causes wifi-problems but you can revert this commit.
git revert commitid
And rebuild…if you run iperf you should limit traffic by tc (the functions you want to disable). see commands in wifi.sh. these are taken from offfical wiki.
Hi, Pavel, If you changed config - pls check CONFIG_NET_SCH_FQ option. It should be disabled for an internal wifi. At least it helped me with similar problem on 5.5-kernel.
Good day, Alex. I don’t change config. State of this option in config: CONFIG_NET_SCH_FQ is not set
After your speed drops to 0 is it works at all? I mean ping, ssh, etc? If not could you tcpdump ap0? In my case there were only incoming traffic.
[BPI-R2] internal Wifi/BT (MT6625L) - Kernel there is my discussion at the eno of the thread. How similar are your symptoms?
All not work. But yes, ap0 tcpdump incoming traffic I see too. Now I recompile latest 4.14 kernel from frank-w github with: CONFIG_IFB=n CONFIG_NET_SCH_FQ_CODEL=n CONFIG_NET_ACT_MIRRED=n My symptoms are similar of you.
P.S. After recompile with this modifications, WIN!
i wonder why my ap0 is working (but i did not do iperf on it)…i’m currently using 4.14.131-bpi-r2-main and my default config like it’s on github…i know time for an update, but want to move to 5.4 soon
[13:27] root@bpi-r2-e:~ (500)# tc qdisc show dev ap0
qdisc mq 0: root
qdisc pfifo_fast 0: parent :4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
[13:27] root@bpi-r2-e:~ (501)# uname -a
Linux bpi-r2-e 4.14.131-bpi-r2-main #259 SMP Mon Jul 1 19:20:17 CEST 2019 armv7l GNU/Linux
what is your tc qdisc show dev ap0?
mine working is:
bpi-r2-gentoo ~ # tc qdisc show dev ap0
qdisc mq 0: root
qdisc pfifo_fast 0: parent :4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
I’m not sure that it’a s root but could you check it?
tc qdisc show dev ap0
At work frank-w kernel 4.14.158 with changes in .config: qdisc mq 0: root qdisc pfifo_fast 0: parent :4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
At standart frank-w kernel 4.14.158 from git: qdisc mq 0: root qdisc fq_codel 0: parent :4 limit 3069009476p flows 3069009476 quantum 3069009476 target 5.0ms interval 100.0ms memory_limit 32Mb ecn qdisc fq_codel 0: parent :3 limit 3069009476p flows 3069009476 quantum 3069009476 target 5.0ms interval 100.0ms memory_limit 32Mb ecn qdisc fq_codel 0: parent :2 limit 3069009476p flows 3069009476 quantum 3069009476 target 5.0ms interval 100.0ms memory_limit 32Mb ecn qdisc fq_codel 0: parent :1 limit 3069009476p flows 3069009476 quantum 3069009476 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
Could you put output in codeblock (select code and click on <> button
It looks like on standart you have defined any trafficshaping…where do you have the problems?
Btw. 5.14 is not out yet
Haha, really, fix mistake. If I correct understand your post… standart .config from:
CONFIG_IFB=m
CONFIG_NET_SCH_FQ_CODEL=m
CONFIG_NET_ACT_MIRRED=m
to:
CONFIG_IFB=n CONFIG_NET_SCH_FQ_CODEL=n CONFIG_NET_ACT_MIRRED=n
But I don’t manipulate trafficshaping policy self… And from first post answered how to disable it, without kernel recompile. In lsmod I don’t see what any traffic shaping modules has been added, but is idea, see for it later.
interesting will be which module makes problems and why…these options are added on 4.14.95 and should break my ap0 too…i see none of these modules in my lsmod
[19:52] frank@bpi-r2-e:~$ lsmod
Module Size Used by
nft_compat 20480 0
nf_tables 86016 1 nft_compat
nfnetlink 16384 2 nft_compat,nf_tables
aes_arm_bs 20480 0
crypto_simd 16384 1 aes_arm_bs
cryptd 24576 1 crypto_simd
xt_TCPMSS 16384 1
xt_tcpmss 16384 1
pppoe 20480 4
pppox 16384 1 pppoe
ppp_generic 32768 10 pppox,pppoe
slhc 16384 1 ppp_generic
xt_addrtype 16384 4
veth 16384 0
ip6t_REJECT 16384 1
nf_reject_ipv6 16384 1 ip6t_REJECT
xt_mac 16384 4
ip6t_rt 16384 3
nf_conntrack_ipv6 20480 10
nf_defrag_ipv6 20480 1 nf_conntrack_ipv6
ip6table_filter 16384 1
ip6_tables 24576 7 ip6table_filter
ipt_REJECT 16384 2
nf_reject_ipv4 16384 1 ipt_REJECT
xt_limit 16384 2
xt_iprange 16384 9
xt_recent 20480 14
tun 36864 2
xt_conntrack 16384 39
iptable_filter 16384 1
ipt_MASQUERADE 16384 4
nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE
xt_nat 16384 12
xt_tcpudp 16384 53
iptable_nat 16384 1
nf_conntrack_ipv4 16384 46
nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
nf_nat_ipv4 16384 1 iptable_nat
nf_nat 32768 3 xt_nat,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 126976 8 xt_nat,nf_conntrack_ipv6,nf_conntrack_ipv4,ipt_MASQUERADE,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
xt_mark 16384 3
iptable_mangle 16384 1
mt76x2e 61440 0
mt76 36864 1 mt76x2e
mtk_thermal 16384 0
thermal_sys 61440 1 mtk_thermal
spi_mt65xx 20480 0
pwm_mediatek 16384 0
evbug 16384 0
mt6577_auxadc 16384 0
nvmem_mtk_efuse 16384 0
mtk_pmic_keys 16384 0
rtc_mt6397 16384 1
nfsd 339968 13
ip_tables 24576 4 iptable_mangle,iptable_filter,iptable_nat
x_tables 28672 21 ipt_REJECT,xt_nat,iptable_mangle,ip_tables,nft_compat,iptable_filter,xt_mark,xt_mac,xt_tcpudp,xt_tcpmss,ipt_MASQUERADE,xt_limit,ip6t_REJECT,xt_recent,ip6table_filter,xt_addrtype,xt_iprange,ip6t_rt,xt_conntrack,ip6_tables,xt_TCPMSS
these options result in own modules
[19:52] frank@bpi-r2-e:~$ find /lib/modules/$(uname -r) -iname '*sch*.ko'
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_teql.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_tbf.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_cbq.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_sfq.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_prio.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_netem.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_fq_codel.ko <<<<<<<<<
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_htb.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_red.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_dsmark.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_gred.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/sch_ingress.ko
[19:54] frank@bpi-r2-e:~$ find /lib/modules/$(uname -r) -iname '*ifb*.ko'
/lib/modules/4.14.131-bpi-r2-main/kernel/drivers/net/ifb.ko <<<<<<<<<<<<<<<<
[19:54] frank@bpi-r2-e:~$ find /lib/modules/$(uname -r) -iname '*act*.ko'
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/act_vlan.ko
/lib/modules/4.14.131-bpi-r2-main/kernel/net/sched/act_mirred.ko <<<<<<<
maybe you can try to unload them if loaded
Only sch_fq_codel module will be loaded and while try to rmmod sch_fq_codel rmmod: ERROR: Module sch_fq_codel is in use. Then I try to blacklist sch_fq_codel in /etc/modprobe.d/blacklist.conf, but module will be loaded with ignore it.
lsmod shows which module uses other modules in “used by” column. Afair there is a forced mode in modprobe (modprobe -rf …)
modprobe -rf sch_fq_codel modprobe: FATAL: Module sch_fq_codel is in use.
glad you did it.
Me too, looks like it loads by wifi driver.
You should remove if from all devices, likely by using tc command. I’m not such familiar with it, so I don’t know exact command.
As i know - it prevents module loading on boot, by init scripts, but it still able to load it maunally. If wifi driver loads it you can simply check it: Remove wifi-init script from autostart, reboot and check if it’s loaded. If it’s not - start wifi-init manually and recheck module.
Please show your lsmod.
Have you activated tc-lines in wifi.sh?
Good day frank-w! I not have in my /etc/init.d/wifi.sh tc-lines. lsmod with troubles:
Module Size Used by
ip6table_filter 16384 0
ip6_tables 24576 1 ip6table_filter
ipt_MASQUERADE 16384 1
nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE
iptable_nat 16384 1
nf_conntrack_ipv4 16384 2
nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
nf_nat_ipv4 16384 1 iptable_nat
nf_nat 32768 2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 126976 5 nf_conntrack_ipv4,ipt_MASQUERADE,nf_nat_masquerade_ipv4,nf_nat_ipv4,nf_nat
iptable_filter 16384 0
ath10k_pci 49152 0
ath10k_core 286720 1 ath10k_pci
ath 28672 1 ath10k_core
pwm_mediatek 16384 0
mtk_pmic_keys 16384 0
rtc_mt6397 16384 1
mtk_thermal 16384 0
thermal_sys 65536 2 mtk_thermal,ath10k_core
mt6577_auxadc 16384 0
nvmem_mtk_efuse 16384 0
spi_mt65xx 20480 0
sch_fq_codel 20480 7
mtkhnat 24576 0
ip_tables 24576 2 iptable_filter,iptable_nat
x_tables 28672 5 ip_tables,iptable_filter,ipt_MASQUERADE,ip6table_filter,ip6_tables
lsmod without troubles:
Module Size Used by
fuse 106496 1
ip6table_filter 16384 0
ip6_tables 24576 1 ip6table_filter
ipt_MASQUERADE 16384 1
nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE
iptable_nat 16384 1
nf_conntrack_ipv4 16384 2
nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
nf_nat_ipv4 16384 1 iptable_nat
nf_nat 32768 2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 126976 5 nf_conntrack_ipv4,ipt_MASQUERADE,nf_nat_masquerade_ipv4,nf_nat_ipv4,nf_nat
iptable_filter 16384 0
ath10k_pci 53248 0
ath10k_core 286720 1 ath10k_pci
ath 28672 1 ath10k_core
mtk_thermal 16384 0
thermal_sys 61440 2 mtk_thermal,ath10k_core
spi_mt65xx 20480 0
pwm_mediatek 16384 0
nvmem_mtk_efuse 16384 0
rtc_mt6397 16384 1
mt6577_auxadc 16384 0
mtk_pmic_keys 16384 0
mtkhnat 24576 0
ip_tables 24576 2 iptable_filter,iptable_nat
x_tables 28672 5 ip_tables,iptable_filter,ipt_MASQUERADE,ip6table_filter,ip6_tables
Afair No,lexas patches are only in 5.4+
I guess problematic system calls tc anyhow…