0
Lucas Schiochet

Solved [sun8i][H3] missing kernel features: /sbin/tc - We have an error talking to the kernel

Recommended Posts

Hi,

 

I'm using an Orange Pi PC and i'm having some issues using traffic control.

 

I'm using the correct network interface using the command

tc qdisc add dev wlx30b5c214fe58 root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev wlx30b5c214fe58 parent 1: classid 1:1 cbq rate 500kbit allot 1500 prio 5 bounded isolated
tc class add dev wlx30b5c214fe58 parent 1: classid 1:2 cbq rate 500kbit allot 1500 prio 5 bounded isolated

tc class add dev wlx30b5c214fe58 parent 1: classid 1:1 cbq rate 10kbit allot 1500 prio 5 bounded isolated

and i received the error RTNETLINK answers: No such file or directory
 
After some reading i saw that is missing 'kernel-modules-extra'.
 

Can someone have this issue also or can help me pls?!

Thanks in advance,

Lucas Schiochet

 

Share this post


Link to post
Share on other sites

@Lucas

 

I have blindly tried

[gr@bpi:~] 2 $ sudo tc qdisc add dev br0:0 root handle 1: cbq avpkt 1000 bandwidth 100mbit
[sudo] password for gr:

so no error message

 

just another blind guess (it is a lamobo-R1)

 

 

[gr@bpi:/armbian_kernel/kern_4.6.4_1] $ ls
linux-dtb-next-sunxi_5.17_armhf.deb             linux-headers-next-sunxi_5.17_armhf.deb  linux-trusty-root-next-lamobo-r1_5.17_armhf.deb
linux-firmware-image-next-sunxi_5.17_armhf.deb  linux-image-next-sunxi_5.17_armhf.deb    linux-u-boot-next-lamobo-r1_5.17_armhf.deb

[gr@bpi:/armbian_kernel/kern_4.6.4_1] $ ls /lib/modules/4.6.4-sunxi/*
/lib/modules/4.6.4-sunxi/modules.alias        /lib/modules/4.6.4-sunxi/modules.dep      /lib/modules/4.6.4-sunxi/modules.softdep
/lib/modules/4.6.4-sunxi/modules.alias.bin    /lib/modules/4.6.4-sunxi/modules.dep.bin  /lib/modules/4.6.4-sunxi/modules.symbols
/lib/modules/4.6.4-sunxi/modules.builtin      /lib/modules/4.6.4-sunxi/modules.devname  /lib/modules/4.6.4-sunxi/modules.symbols.bin
/lib/modules/4.6.4-sunxi/modules.builtin.bin  /lib/modules/4.6.4-sunxi/modules.order

/lib/modules/4.6.4-sunxi/build:
arch   certs   Documentation  firmware  include  ipc      kernel  Makefile  Module.symvers  samples  security  tools  virt
block  crypto  drivers        fs        init     Kconfig  lib     mm        net             scripts  sound     usr

/lib/modules/4.6.4-sunxi/kernel:
arch  crypto  drivers  fs  lib  net  sound

/lib/modules/4.6.4-sunxi/updates:
dkms

 

 

what do you have in /lib/modules/ please?

 

maybe the output of ifconfig and iwconfig as well

 

I wasn't using ifb module but I have read this

https://wiki.archlinux.org/index.php/Advanced_traffic_control

https://github.com/raspberrypi/linux/issues/453

 

but the module loads

Share this post


Link to post
Share on other sites

@zador.blood.stain

 

yes, legacy kernel you cannot load ifb & tc doesn't work

 

 

 

gr@nanopim1:~$ sudo modprobe ifb
modprobe: FATAL: Module ifb not found.
gr@nanopim1:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 0e:e2:95:37:3c:e7
          inet addr:192.168.1.66  Bcast:192.168.255.255  Mask:255.255.0.0
          inet6 addr: fe80::ce2:95ff:fe37:3ce7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8613 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1258 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2273626 (2.1 MiB)  TX bytes:157483 (153.7 KiB)
          Interrupt:114

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1104 (1.0 KiB)  TX bytes:1104 (1.0 KiB)

gr@nanopim1:~$ tc qdisc add dev eth0 root handle 1: cbq avpkt 100 bandwidth 60mbit
RTNETLINK answers: Operation not permitted

 

 

your changes are on igor/lib/master? so I can build a kernel to test? on both OPi2E and NanoPi M1

on your fork?

Share this post


Link to post
Share on other sites

the kernel is booting on M1... module ifb loads, tc doesn't return any error

 

zip includes files... probably only sun8i files are needed

 

http://guillaume.romagny.free.fr/armbian/sun8i_mik20160724.zip

gr@nanopim1:/proc$ sudo tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 50mbit
gr@nanopim1:/proc$ sudo tc qdisc show
qdisc cbq 1: dev eth0 root refcnt 2 rate 50Mbit (bounded,isolated) prio no-transmit

compiling the set of debs for Opi PC, just in case.

Share this post


Link to post
Share on other sites

After reboot and start the hotspot using create_ap the wlan0 start works using traffic control.

 

root@orangepipc:~# sudo tc qdisc add dev wlan0 root handle 1: cbq avpkt 1000 bandwidth 100mbit

root@orangepipc:~# sudo tc class add dev wlan0 parent 1: classid 1:1 cbq rate 500kbit allot 1500 prio 5 bounded isolated

root@orangepipc:~# sudo tc class add dev wlan0 parent 1: classid 1:2 cbq rate 500kbit allot 1500 prio 5 bounded isolated

root@orangepipc:~# sudo tc filter add dev wlan0 parent 1: protocol ip prio 16 u32 match ip dst 192.168.12.7/32 flowid 1:1

 

Thanks again for yours help @wildcat_paris and @zador.blood.stained

 

create_ap -> https://github.com/oblique/create_ap

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0