gsustek wrote:@lifehacksback please explain what do you tryed to do with this patch?
try this:
I was just about to comment on that. Seems the new wifi driver build requirement is to do so without patches.
Do we have confirmation on this?
The content of this topic has been archived between 16 Sep 2014 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.
gsustek wrote:@lifehacksback please explain what do you tryed to do with this patch?
try this:
I was just about to comment on that. Seems the new wifi driver build requirement is to do so without patches.
Do we have confirmation on this?
@Lantis
There is a note here requiring your mac80211 to be of at least 2016-01-10 vintage to use the content of the readme.
Which 15.05.1 appears to be.
So all that should be required is dropping patches.
Thanks @anomeome
@davidc502
Yes. The readme states that it what you are to do.
(Last edited by anomeome on 2 Jun 2016, 03:35)
@davidc502
Yes. The readme states that it what you are to do.
Good deal -- thanks
anomeome wrote:@Lantis
There is a note here requiring your mac80211 to be of at least 2016-01-10 vintage to use the content of the readme.Which 15.05.1 appears to be.
So all that should be required is dropping patches.Thanks @anomeome
I tried to compile driver in 15.05.1 SDK, but failed with error:
https://github.com/kaloz/mwlwifi/commit … t-17693799
@yuhhaurlin said I have to update 'package/kernel/mac80211'.
Still didn't figured out how to do it.
@NemoAlex Can you check what is the version of compatible wireless package you used?
Package: package/kernel/mac80211
Build directory: build_dir/target-arm_xxxxx/linux-mvebu/compat-wireless-xxxx-xx-xx
Please check if the package is compat-wireless-2016-01-10. If yes, please follow https://github.com/kaloz/mwlwifi/commit … 85fb364914 to build the driver.
hi, is those temperatures OK for 1900ACS?
root@1900acs:~# sensors
tmp421-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1: +48.5°C
temp2: +49.8°C
armada_thermal-virtual-0
Adapter: Virtual device
temp1: +77.0°C
@anomeome with what tool can i check? mtd-utils, nandtest?
(Last edited by gsustek on 2 Jun 2016, 08:45)
@gsustek, just check my ACS, just bit higher then yours. currently under LEDE r469.
root@xxx:~# sensors
tmp421-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1: +50.8°C
temp2: +53.3°C
armada_thermal-virtual-0
Adapter: Virtual device
temp1: +80.4°C
back to my issue with the CESA engine.
I did build my own LEDE image which works fine except the CESA engine:
thanks to @anomeome, I added the needed kernel modules, here my config:
root@OpenWrt:~# lsmod | grep crypt
aead 3746 3 cryptodev
crypto_null 2721 2 authenc
cryptodev 31938 0
root@OpenWrt:~# opkg list_installed | grep crypt
dnscrypt-proxy - 1.6.1-2
kmod-crypto-aead - 4.4.11-1
kmod-crypto-authenc - 4.4.11-1
kmod-crypto-cbc - 4.4.11-1
kmod-crypto-deflate - 4.4.11-1
kmod-crypto-des - 4.4.11-1
kmod-crypto-echainiv - 4.4.11-1
kmod-crypto-hash - 4.4.11-1
kmod-crypto-hmac - 4.4.11-1
kmod-crypto-iv - 4.4.11-1
kmod-crypto-manager - 4.4.11-1
kmod-crypto-md5 - 4.4.11-1
kmod-crypto-null - 4.4.11-1
kmod-crypto-pcompress - 4.4.11-1
kmod-crypto-rng - 4.4.11-1
kmod-crypto-sha1 - 4.4.11-1
kmod-crypto-sha256 - 4.4.11-1
kmod-crypto-wq - 4.4.11-1
kmod-cryptodev - 4.4.11+1.8-mvebu-2
when I do the speed test or openssl:
root@OpenWrt:~# openssl speed -evp aes256
Doing aes-256-cbc for 3s on 16 size blocks: 3533386 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 938498 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 238948 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 59998 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 7507 aes-256-cbc's in 3.00s
OpenSSL 1.0.2h 3 May 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include/fortify -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap /home/carlo/source/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/openssl-1.0.2h:openssl-1.0.2h -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/carlo/source/package/libs/openssl/include -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 18844.73k 20021.29k 20390.23k 20479.32k 20499.11k
Is there anything else I am missing to enable the HW module ?
thanks!
@gsustek, just check my ACS, just bit higher then yours. currently under LEDE r469.
root@xxx:~# sensors
tmp421-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1: +50.8°C
temp2: +53.3°Carmada_thermal-virtual-0
Adapter: Virtual device
temp1: +80.4°C
hi, for my taste a little to high, so maybe put some low noise fan there?:-) is there a PWM controller/pinot just connect to USB:-)?
i know that ACS i s the first model without fan.
back to my issue with the CESA engine.
I did build my own LEDE image which works fine except the CESA engine:
thanks to @anomeome, I added the needed kernel modules, here my config:root@OpenWrt:~# lsmod | grep crypt
aead 3746 3 cryptodev
crypto_null 2721 2 authenc
cryptodev 31938 0root@OpenWrt:~# opkg list_installed | grep crypt
dnscrypt-proxy - 1.6.1-2
kmod-crypto-aead - 4.4.11-1
kmod-crypto-authenc - 4.4.11-1
kmod-crypto-cbc - 4.4.11-1
kmod-crypto-deflate - 4.4.11-1
kmod-crypto-des - 4.4.11-1
kmod-crypto-echainiv - 4.4.11-1
kmod-crypto-hash - 4.4.11-1
kmod-crypto-hmac - 4.4.11-1
kmod-crypto-iv - 4.4.11-1
kmod-crypto-manager - 4.4.11-1
kmod-crypto-md5 - 4.4.11-1
kmod-crypto-null - 4.4.11-1
kmod-crypto-pcompress - 4.4.11-1
kmod-crypto-rng - 4.4.11-1
kmod-crypto-sha1 - 4.4.11-1
kmod-crypto-sha256 - 4.4.11-1
kmod-crypto-wq - 4.4.11-1
kmod-cryptodev - 4.4.11+1.8-mvebu-2when I do the speed test or openssl:
root@OpenWrt:~# openssl speed -evp aes256
Doing aes-256-cbc for 3s on 16 size blocks: 3533386 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 938498 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 238948 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 59998 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 7507 aes-256-cbc's in 3.00s
OpenSSL 1.0.2h 3 May 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include/fortify -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap /home/carlo/source/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/openssl-1.0.2h:openssl-1.0.2h -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/carlo/source/package/libs/openssl/include -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 18844.73k 20021.29k 20390.23k 20479.32k 20499.11kIs there anything else I am missing to enable the HW module ?
thanks!
Ok I maybe have found the issue:
# CONFIG_OPENSSL_HARDWARE_SUPPORT is not set
# CONFIG_OPENSSL_ENGINE_CRYPTO is not set
should be both enabled ?
back to my issue with the CESA engine.
-DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS
Is there anything else I am missing to enable the HW module ?
thanks!
I have also these in compile options
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
So please check you have those in
package/libs/openssl/Makefile
PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE_CRYPTO \
CONFIG_OPENSSL_ENGINE_DIGEST \
CONFIG_OPENSSL_WITH_EC \
CONFIG_OPENSSL_WITH_EC2M \
CONFIG_OPENSSL_WITH_SSL3 \
CONFIG_OPENSSL_HARDWARE_SUPPORT
~/source$ grep OPENSSL .config
# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL=y
CONFIG_OPENSSL_WITH_EC=y
# CONFIG_OPENSSL_WITH_EC2M is not set
# CONFIG_OPENSSL_WITH_SSL3 is not set
CONFIG_OPENSSL_ENGINE_DIGEST=y
CONFIG_OPENSSL_HARDWARE_SUPPORT=y
CONFIG_OPENSSL_ENGINE_CRYPTO=y
# CONFIG_LIBCURL_OPENSSL is not set
acarlo wrote:back to my issue with the CESA engine.
-DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS
Is there anything else I am missing to enable the HW module ?
thanks!
I have also these in compile options
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
So please check you have those in
package/libs/openssl/MakefileMany thanks! I finally got the hardware encryption working!
PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE_CRYPTO \
CONFIG_OPENSSL_ENGINE_DIGEST \
CONFIG_OPENSSL_WITH_EC \
CONFIG_OPENSSL_WITH_EC2M \
CONFIG_OPENSSL_WITH_SSL3 \
CONFIG_OPENSSL_HARDWARE_SUPPORT~/source$ grep OPENSSL .config
# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL=y
CONFIG_OPENSSL_WITH_EC=y
# CONFIG_OPENSSL_WITH_EC2M is not set
# CONFIG_OPENSSL_WITH_SSL3 is not set
CONFIG_OPENSSL_ENGINE_DIGEST=y
CONFIG_OPENSSL_HARDWARE_SUPPORT=y
CONFIG_OPENSSL_ENGINE_CRYPTO=y
# CONFIG_LIBCURL_OPENSSL is not set
Many Thanks, it finally works as it should be!
(Last edited by acarlo on 2 Jun 2016, 12:47)
I haven't had the time, and probably won't until next week, to continue work on the Wiki.
@davidc502 @mrfreeze If either of you have released updates affecting your build links, either please update those links on the wiki or please let me know and I'll update them as soon as I'm notified.
I thought I flagged and categorized a post about the NAND patch, but I'm not able to find it... where can I find the patch at and where do patches need to be placed within the build root?
(Last edited by JW0914 on 2 Jun 2016, 13:41)
@Jw0914
https://github.com/nitroshift/nand-timeout
Placed in target/linux/mvebu/patches-4.4/
(Last edited by kirkgbr on 2 Jun 2016, 13:57)
Hello guys, i'm a proud owner of a new WRT1200ac and im a newbe about OpenWRT. had some previous experience with DD-WRT but newer had such advanced router.
i have read thousends of pages and im really serios im not inventing it... and my conclusions after reading those tutorials ere not so clear. i apologise in advance for my questions... need just pointers for the correct answers in a few words.
So lets start:
1. I would love to flash OpenWRT on the router. i know it has two boot partitions. what isnt clear to me is: when i flash the factory-to-openwrt file does it flash the other partition? if yes for the second openwrt file that i need to flash do i need to revert back to original firmware and than flash or i can do it from openwrt webinterface? would love to have original firmware on one boot.
2. What version of openWRT would you advise to me? i read something about new marvell drivers. All i need is stable wifi and vlan tagging. so wich one should i use? official openwrt or Community Builds from the devs of this forum?
thanks again for your patientce and answers and thanks to all the peaple that make openwrt possible and up to date.
moccolo
(Last edited by moccolo on 2 Jun 2016, 14:08)
@kirkgbr Thanks! =]
1. I would love to flash OpenWRT on the router. i know it has two boot partitions. what isnt clear to me is: when i flash the factory-to-openwrt file does it flash the other partition? if yes for the second openwrt file that i need to flash do i need to revert back to original firmware and than flas or i can do it from openwrt webinterface? would love to have original firmware on one boot.
2. What version of openWRT would you advise to me? i read something about new marvell drivers. All i need is stable wifi and vlan tagging. so wich one should i use? official openwrt or Community Builds from the devs of this forum?
Yes, whenever you flash [via WebUI or sysupgrade], it flashes the opposite partition (mtd7 if booted to mtd5, or vice versa).
I'm not sure what you're referencing with "If yes for the second openwrt file...". You may find the Flashing Firmware section of the wiki helpful.
Please see the Firmware Images Synopsis & Community Builds sections of the wiki.
(Last edited by JW0914 on 2 Jun 2016, 14:18)
I'm not sure what you're referencing with "If yes for the second openwrt file..."
Thanks JW0914 for the quick reply.
i think i misunderstood then...
i tough that the "openwrt-mvebu-armada-385-linksys-caiman-squashfs-factory.img" is just to flash the router and prepare the boot and filesystem. But know i understand that its everything in one file ... the second is just if you upgrade... So just one flash is enough.
thx,moccolo
@acarlo how do you know that hardware encryption is working? please put some results?
@bogey, do i really need to add those flags (-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS )and exactly where in command?
JW0914 wrote:I'm not sure what you're referencing with "If yes for the second openwrt file..."
Thanks JW0914 for the quick reply.
i think i misunderstood then...
i tough that the "openwrt-mvebu-armada-385-linksys-caiman-squashfs-factory.img" is just to flash the router and prepare the boot and filesystem. But know i understand that its everything in one file ... the second is just if you upgrade... So just one flash is enough.thx,moccolo
Correct, and as Openwrt is currently behind, and the LEDE-fork build is more up-to-date (more stable, faster), you might want to consider to flash LEDE from the start (http://ftp.halifax.rwth-aachen.de/lede/ … u/generic/)
@acarlo how do you know that hardware encryption is working? please put some results?
@bogey, do i really need to add those flags (-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS )and exactly where in command?
i never did that
@acarlo how do you know that hardware encryption is working? please put some results?
@bogey, do i really need to add those flags (-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS )and exactly where in command?
Here the result:
root@OpenWrt:~# openssl speed -evp aes256
Doing aes-256-cbc for 3s on 16 size blocks: 194057 aes-256-cbc's in 0.10s
Doing aes-256-cbc for 3s on 64 size blocks: 193501 aes-256-cbc's in 0.10s
Doing aes-256-cbc for 3s on 256 size blocks: 175269 aes-256-cbc's in 0.02s
Doing aes-256-cbc for 3s on 1024 size blocks: 127926 aes-256-cbc's in 0.03s
Doing aes-256-cbc for 3s on 8192 size blocks: 29738 aes-256-cbc's in 0.01s
OpenSSL 1.0.2h 3 May 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/usr/include -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include/fortify -I/home/carlo/source/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap /home/carlo/source/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/openssl-1.0.2h:openssl-1.0.2h -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/carlo/source/package/libs/openssl/include -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 31049.12k 123840.64k 2243443.20k 4366540.80k 24361369.60k
In my case I missed the the .config file to enable the support for hardware encryption in the openssl library.
In regards to: -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
They have been added once I enabled (via make menuconfig) the hardware encryption in openssl
(Last edited by acarlo on 2 Jun 2016, 14:47)
@acarlo, thnx
Here is my result:
\________\/ -----------------------------------------------------------
root@1900acs:~# openssl speed -evp aes256
Doing aes-256-cbc for 3s on 16 size blocks: 184093 aes-256-cbc's in 0.08s
Doing aes-256-cbc for 3s on 64 size blocks: 184655 aes-256-cbc's in 0.06s
Doing aes-256-cbc for 3s on 256 size blocks: 172542 aes-256-cbc's in 0.04s
Doing aes-256-cbc for 3s on 1024 size blocks: 125720 aes-256-cbc's in 0.04s
Doing aes-256-cbc for 3s on 8192 size blocks: 29110 aes-256-cbc's in 0.01s
OpenSSL 1.0.2h 3 May 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPE
NSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/gs/LEDE/staging_dir/target-arm_cortex-a9+vfpv3_musl-
1.1.14_eabi/usr/include -I/home/gs/LEDE/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/include -I/home/g
s/LEDE/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/usr/include -I/home/gs/LEDE/staging_d
ir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include/fortify -I/home/gs/LEDE/staging_dir/toolchain
-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV
-DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -fno
-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=sof
t -iremap /home/gs/LEDE/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.14_eabi/openssl-1.0.2h:openssl-1.0.2h -Wfor
mat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/gs/LEDE/p
ackage/libs/openssl/include -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 36818.60k 196965.33k 1104268.80k 3218432.00k 23846912.00k
root@1900acs:~#
i didn't do any "magic" on like you do, on LEDE latest source, only minor selection of aditional packages:-)
@all
does anyone have or had squashfs errors like me? Specialy during the samba,ftp copying?
@NemoAlex Can you check what is the version of compatible wireless package you used?
Package: package/kernel/mac80211
Build directory: build_dir/target-arm_xxxxx/linux-mvebu/compat-wireless-xxxx-xx-xxPlease check if the package is compat-wireless-2016-01-10. If yes, please follow https://github.com/kaloz/mwlwifi/commit … 85fb364914 to build the driver.
Since I'm using the SDK to compile the ipk package, it doesn't has this folder.
After I do
scripts/feed update -a
I found the file ./feeds/base/package/kernel/mac80211/Makefile
PKG_VERSION:=2016-01-10
PKG_RELEASE:=1
But still, same error.
Anyway, is it possible that let 15.05.1 users use the new driver?
(Last edited by NemoAlex on 3 Jun 2016, 09:47)
updated 950-add-cake-to-tc.patch (thanks to hnyman)
(wash removed)
if someone could review this. thank you.
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -877,4 +877,78 @@
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
};
+
+/* CAKE */
+enum {
+ TCA_CAKE_UNSPEC,
+ TCA_CAKE_BASE_RATE,
+ TCA_CAKE_DIFFSERV_MODE,
+ TCA_CAKE_ATM,
+ TCA_CAKE_FLOW_MODE,
+ TCA_CAKE_OVERHEAD,
+ TCA_CAKE_RTT,
+ TCA_CAKE_TARGET,
+ TCA_CAKE_AUTORATE,
+ TCA_CAKE_MEMORY,
+ __TCA_CAKE_MAX
+};
+#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
+
+struct tc_cake_traffic_stats {
+ __u32 packets;
+ __u32 link_ms;
+ __u64 bytes;
+};
+
+#define TC_CAKE_MAX_TINS (8)
+struct tc_cake_xstats {
+ __u16 version; /* == 3, increments when struct extended */
+ __u8 max_tins; /* == TC_CAKE_MAX_TINS */
+ __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */
+
+ __u32 threshold_rate [TC_CAKE_MAX_TINS];
+ __u32 target_us [TC_CAKE_MAX_TINS];
+ struct tc_cake_traffic_stats sent [TC_CAKE_MAX_TINS];
+ struct tc_cake_traffic_stats dropped [TC_CAKE_MAX_TINS];
+ struct tc_cake_traffic_stats ecn_marked[TC_CAKE_MAX_TINS];
+ struct tc_cake_traffic_stats backlog [TC_CAKE_MAX_TINS];
+ __u32 interval_us [TC_CAKE_MAX_TINS];
+ __u32 way_indirect_hits[TC_CAKE_MAX_TINS];
+ __u32 way_misses [TC_CAKE_MAX_TINS];
+ __u32 way_collisions [TC_CAKE_MAX_TINS];
+ __u32 peak_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to bulk flows */
+ __u32 avge_delay_us [TC_CAKE_MAX_TINS];
+ __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */
+ __u16 sparse_flows [TC_CAKE_MAX_TINS];
+ __u16 bulk_flows [TC_CAKE_MAX_TINS];
+ __u32 last_skblen [TC_CAKE_MAX_TINS]; /* skb_headlen */
+ __u32 max_skblen [TC_CAKE_MAX_TINS];
+ __u32 capacity_estimate; /* version 2 */
+ __u32 memory_limit; /* version 3 */
+ __u32 memory_used; /* version 3 */
+};
+
+struct tc_cake_old_xstats {
+ __u16 type; /* constant magic 0xCAFE */
+ __u16 class_cnt;
+ struct {
+ __u32 rate;
+ __u32 target_us;
+ __u32 packets;
+ __u32 interval_us;
+ __u64 bytes;
+ __u32 dropped;
+ __u32 ecn_marked;
+ __u32 way_indirect_hits;
+ __u32 way_misses;
+ __u32 way_collisions;
+ __u32 backlog_bytes;
+ __u32 peak_delay; /* delay to fat flows */
+ __u32 avge_delay;
+ __u32 base_delay; /* delay to sparse flows */
+ __u16 sparse_flows;
+ __u16 bulk_flows;
+ } cls[8];
+};
+
#endif
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -64,6 +64,7 @@
TCMODULES += q_codel.o
TCMODULES += q_fq_codel.o
TCMODULES += q_fq.o
TCMODULES += q_pie.o
+TCMODULES += q_cake.o
TCMODULES += q_hhf.o
TCMODULES += e_bpf.o
--- /dev/null
+++ b/tc/q_cake.c
@@ -0,0 +1,598 @@
+/*
+ * Common Applications Kept Enhanced -- CAKE
+ *
+ * Copyright (C) 2014-2015 Jonathan Morton <chromatix99@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * Alternatively, provided that this notice is retained in full, this
+ * software may be distributed under the terms of the GNU General
+ * Public License ("GPL") version 2, in which case the provisions of the
+ * GPL apply INSTEAD OF those given above.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ */
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+
+#include "utils.h"
+#include "tc_util.h"
+
+static void explain(void)
+{
+ fprintf(stderr, "Usage: ... cake [ bandwidth RATE | unlimited* | autorate_ingress ]\n"
+ " [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic | satellite | interplanetary ]\n"
+ " [ besteffort | precedence | diffserv8 | diffserv4* ]\n"
+ " [ flowblind | srchost | dsthost | hosts | flows* | dual-srchost | dual-dsthost | triple-isolate ]\n"
+ " [ atm | noatm* ] [ overhead N | conservative | raw* ]\n"
+ " [ memlimit LIMIT ]\n"
+ " (* marks defaults)\n");
+}
+
+static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
+ struct nlmsghdr *n)
+{
+ int unlimited = 0;
+ unsigned bandwidth = 0;
+ unsigned interval = 0;
+ unsigned target = 0;
+ unsigned diffserv = 0;
+ unsigned memlimit = 0;
+ int overhead = 0;
+ bool overhead_set = false;
+ int flowmode = -1;
+ int atm = -1;
+ int autorate = -1;
+ struct rtattr *tail;
+
+ while (argc > 0) {
+ if (strcmp(*argv, "bandwidth") == 0) {
+ NEXT_ARG();
+ if (get_rate(&bandwidth, *argv)) {
+ fprintf(stderr, "Illegal \"bandwidth\"\n");
+ return -1;
+ }
+ unlimited = 0;
+ autorate = 0;
+ } else if (strcmp(*argv, "unlimited") == 0) {
+ bandwidth = 0;
+ unlimited = 1;
+ autorate = 0;
+ } else if (strcmp(*argv, "autorate_ingress") == 0) {
+ autorate = 1;
+
+ } else if (strcmp(*argv, "rtt") == 0) {
+ NEXT_ARG();
+ if (get_time(&interval, *argv)) {
+ fprintf(stderr, "Illegal \"rtt\"\n");
+ return -1;
+ }
+ target = interval / 20;
+ if(!target)
+ target = 1;
+ } else if (strcmp(*argv, "datacentre") == 0) {
+ interval = 100;
+ target = 5;
+ } else if (strcmp(*argv, "lan") == 0) {
+ interval = 1000;
+ target = 50;
+ } else if (strcmp(*argv, "metro") == 0) {
+ interval = 10000;
+ target = 500;
+ } else if (strcmp(*argv, "regional") == 0) {
+ interval = 30000;
+ target = 1500;
+ } else if (strcmp(*argv, "internet") == 0) {
+ interval = 100000;
+ target = 5000;
+ } else if (strcmp(*argv, "oceanic") == 0) {
+ interval = 300000;
+ target = 15000;
+ } else if (strcmp(*argv, "satellite") == 0) {
+ interval = 1000000;
+ target = 50000;
+ } else if (strcmp(*argv, "interplanetary") == 0) {
+ interval = 3600000000U;
+ target = 5000;
+
+ } else if (strcmp(*argv, "besteffort") == 0) {
+ diffserv = 1;
+ } else if (strcmp(*argv, "precedence") == 0) {
+ diffserv = 2;
+ } else if (strcmp(*argv, "diffserv8") == 0) {
+ diffserv = 3;
+ } else if (strcmp(*argv, "diffserv4") == 0) {
+ diffserv = 4;
+ } else if (strcmp(*argv, "diffserv") == 0) {
+ diffserv = 4;
+ } else if (strcmp(*argv, "diffserv-llt") == 0) {
+ diffserv = 5;
+
+ } else if (strcmp(*argv, "flowblind") == 0) {
+ flowmode = 0;
+ } else if (strcmp(*argv, "srchost") == 0) {
+ flowmode = 1;
+ } else if (strcmp(*argv, "dsthost") == 0) {
+ flowmode = 2;
+ } else if (strcmp(*argv, "hosts") == 0) {
+ flowmode = 3;
+ } else if (strcmp(*argv, "flows") == 0) {
+ flowmode = 4;
+ } else if (strcmp(*argv, "dual-srchost") == 0) {
+ flowmode = 5;
+ } else if (strcmp(*argv, "dual-dsthost") == 0) {
+ flowmode = 6;
+ } else if (strcmp(*argv, "triple-isolate") == 0) {
+ flowmode = 7;
+
+ } else if (strcmp(*argv, "atm") == 0) {
+ atm = 1;
+ } else if (strcmp(*argv, "noatm") == 0) {
+ atm = 0;
+
+ } else if (strcmp(*argv, "raw") == 0) {
+ atm = 0;
+ overhead = 0;
+ overhead_set = true;
+ } else if (strcmp(*argv, "conservative") == 0) {
+ /*
+ * Deliberately over-estimate overhead:
+ * one whole ATM cell plus ATM framing.
+ * A safe choice if the actual overhead is unknown.
+ */
+ atm = 1;
+ overhead = 48;
+ overhead_set = true;
+
+ /* Various ADSL framing schemes */
+ } else if (strcmp(*argv, "ipoa-vcmux") == 0) {
+ atm = 1;
+ overhead += 8;
+ overhead_set = true;
+ } else if (strcmp(*argv, "ipoa-llcsnap") == 0) {
+ atm = 1;
+ overhead += 16;
+ overhead_set = true;
+ } else if (strcmp(*argv, "bridged-vcmux") == 0) {
+ atm = 1;
+ overhead += 24;
+ overhead_set = true;
+ } else if (strcmp(*argv, "bridged-llcsnap") == 0) {
+ atm = 1;
+ overhead += 32;
+ overhead_set = true;
+ } else if (strcmp(*argv, "pppoa-vcmux") == 0) {
+ atm = 1;
+ overhead += 10;
+ overhead_set = true;
+ } else if (strcmp(*argv, "pppoa-llc") == 0) {
+ atm = 1;
+ overhead += 14;
+ overhead_set = true;
+ } else if (strcmp(*argv, "pppoe-vcmux") == 0) {
+ atm = 1;
+ overhead += 32;
+ overhead_set = true;
+ } else if (strcmp(*argv, "pppoe-llcsnap") == 0) {
+ atm = 1;
+ overhead += 40;
+ overhead_set = true;
+
+ /* Typical VDSL2 framing schemes */
+ /* NB: PTM includes HDLC's 0x7D/7E expansion, adds extra 1/128 */
+ } else if (strcmp(*argv, "pppoe-ptm") == 0) {
+ atm = 0;
+ overhead += 27;
+ } else if (strcmp(*argv, "bridged-ptm") == 0) {
+ atm = 0;
+ overhead += 19;
+
+ } else if (strcmp(*argv, "via-ethernet") == 0) {
+ /*
+ * The above overheads are relative to an IP packet,
+ * but if the physical interface is Ethernet, Linux
+ * includes Ethernet framing overhead already.
+ */
+ overhead -= 14;
+ overhead_set = true;
+
+ /* Additional Ethernet-related overheads used by some ISPs */
+ } else if (strcmp(*argv, "ether-phy") == 0) {
+ /* ethernet pre-amble & interframe gap 20 bytes
+ * Linux will have already accounted for MACs & frame type 14 bytes
+ * you probably want to add an FCS as well*/
+ overhead += 20;
+ overhead_set = true;
+ } else if (strcmp(*argv, "ether-all") == 0) {
+ /* ethernet pre-amble & interframe gap & FCS
+ * Linux will have already accounted for MACs & frame type 14 bytes
+ * you may need to add vlan tag*/
+ overhead += 24;
+ overhead_set = true;
+
+ } else if (strcmp(*argv, "ether-fcs") == 0) {
+ /* Frame Check Sequence */
+ /* we ignore the minimum frame size, because IP packets usually meet it */
+ overhead += 4;
+ overhead_set = true;
+ } else if (strcmp(*argv, "ether-vlan") == 0) {
+ /* 802.1q VLAN tag - may be repeated */
+ overhead += 4;
+ overhead_set = true;
+
+ } else if (strcmp(*argv, "overhead") == 0) {
+ char* p = NULL;
+ NEXT_ARG();
+ overhead = strtol(*argv, &p, 10);
+ if(!p || *p || !*argv || overhead < -64 || overhead > 256) {
+ fprintf(stderr, "Illegal \"overhead\", valid range is -64 to 256\\n");
+ return -1;
+ }
+ overhead_set = true;
+
+ } else if (strcmp(*argv, "memlimit") == 0) {
+ NEXT_ARG();
+ if(get_size(&memlimit, *argv)) {
+ fprintf(stderr, "Illegal value for \"memlimit\": \"%s\"\n", *argv);
+ return -1;
+ }
+
+ } else if (strcmp(*argv, "help") == 0) {
+ explain();
+ return -1;
+ } else {
+ fprintf(stderr, "What is \"%s\"?\n", *argv);
+ explain();
+ return -1;
+ }
+ argc--; argv++;
+ }
+
+ tail = NLMSG_TAIL(n);
+ addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
+ if (bandwidth || unlimited)
+ addattr_l(n, 1024, TCA_CAKE_BASE_RATE, &bandwidth, sizeof(bandwidth));
+ if (diffserv)
+ addattr_l(n, 1024, TCA_CAKE_DIFFSERV_MODE, &diffserv, sizeof(diffserv));
+ if (atm != -1)
+ addattr_l(n, 1024, TCA_CAKE_ATM, &atm, sizeof(atm));
+ if (flowmode != -1)
+ addattr_l(n, 1024, TCA_CAKE_FLOW_MODE, &flowmode, sizeof(flowmode));
+ if (overhead_set)
+ addattr_l(n, 1024, TCA_CAKE_OVERHEAD, &overhead, sizeof(overhead));
+ if (interval)
+ addattr_l(n, 1024, TCA_CAKE_RTT, &interval, sizeof(interval));
+ if (target)
+ addattr_l(n, 1024, TCA_CAKE_TARGET, &target, sizeof(target));
+ if (autorate != -1)
+ addattr_l(n, 1024, TCA_CAKE_AUTORATE, &autorate, sizeof(autorate));
+ if (memlimit)
+ addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit, sizeof(memlimit));
+
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+ return 0;
+}
+
+
+static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
+{
+ struct rtattr *tb[TCA_CAKE_MAX + 1];
+ unsigned bandwidth = 0;
+ unsigned diffserv = 0;
+ unsigned flowmode = 0;
+ unsigned interval = 0;
+ unsigned memlimit = 0;
+ int overhead = 0;
+ int atm = 0;
+ int autorate = 0;
+ SPRINT_BUF(b1);
+ SPRINT_BUF(b2);
+
+ if (opt == NULL)
+ return 0;
+
+ parse_rtattr_nested(tb, TCA_CAKE_MAX, opt);
+
+ if (tb[TCA_CAKE_BASE_RATE] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE]) >= sizeof(__u32)) {
+ bandwidth = rta_getattr_u32(tb[TCA_CAKE_BASE_RATE]);
+ if(bandwidth)
+ fprintf(f, "bandwidth %s ", sprint_rate(bandwidth, b1));
+ else
+ fprintf(f, "unlimited ");
+ }
+ if (tb[TCA_CAKE_AUTORATE] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_AUTORATE]) >= sizeof(__u32)) {
+ autorate = rta_getattr_u32(tb[TCA_CAKE_AUTORATE]);
+ if(autorate == 1)
+ fprintf(f, "autorate_ingress ");
+ else if(autorate)
+ fprintf(f, "(?autorate?) ");
+ }
+ if (tb[TCA_CAKE_DIFFSERV_MODE] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_DIFFSERV_MODE]) >= sizeof(__u32)) {
+ diffserv = rta_getattr_u32(tb[TCA_CAKE_DIFFSERV_MODE]);
+ switch(diffserv) {
+ case 1:
+ fprintf(f, "besteffort ");
+ break;
+ case 2:
+ fprintf(f, "precedence ");
+ break;
+ case 3:
+ fprintf(f, "diffserv8 ");
+ break;
+ case 4:
+ fprintf(f, "diffserv4 ");
+ break;
+ case 5:
+ fprintf(f, "diffserv-llt ");
+ break;
+ default:
+ fprintf(f, "(?diffserv?) ");
+ break;
+ };
+ }
+ if (tb[TCA_CAKE_FLOW_MODE] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_FLOW_MODE]) >= sizeof(__u32)) {
+ flowmode = rta_getattr_u32(tb[TCA_CAKE_FLOW_MODE]);
+ switch(flowmode) {
+ case 0:
+ fprintf(f, "flowblind ");
+ break;
+ case 1:
+ fprintf(f, "srchost ");
+ break;
+ case 2:
+ fprintf(f, "dsthost ");
+ break;
+ case 3:
+ fprintf(f, "hosts ");
+ break;
+ case 4:
+ fprintf(f, "flows ");
+ break;
+ case 5:
+ fprintf(f, "dual-srchost ");
+ break;
+ case 6:
+ fprintf(f, "dual-dsthost ");
+ break;
+ case 7:
+ fprintf(f, "triple-isolate ");
+ break;
+ default:
+ fprintf(f, "(?flowmode?) ");
+ break;
+ };
+ }
+ if (tb[TCA_CAKE_ATM] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_ATM]) >= sizeof(__u32)) {
+ atm = rta_getattr_u32(tb[TCA_CAKE_ATM]);
+ }
+ if (tb[TCA_CAKE_OVERHEAD] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_OVERHEAD]) >= sizeof(__u32)) {
+ overhead = rta_getattr_u32(tb[TCA_CAKE_OVERHEAD]);
+ }
+ if (tb[TCA_CAKE_RTT] &&
+ RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
+ interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
+ }
+
+ if (interval)
+ fprintf(f, "rtt %s ", sprint_time(interval, b2));
+
+ if (atm)
+ fprintf(f, "atm ");
+ else if (overhead)
+ fprintf(f, "noatm ");
+
+ if (overhead || atm)
+ fprintf(f, "overhead %d ", overhead);
+
+ if (!atm && !overhead)
+ fprintf(f, "raw ");
+
+ if (memlimit)
+ fprintf(f, "memlimit %s", sprint_size(memlimit, b1));
+
+ return 0;
+}
+
+static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
+ struct rtattr *xstats)
+{
+ /* fq_codel stats format borrowed */
+ struct tc_fq_codel_xstats *st;
+ struct tc_cake_xstats *stnc;
+ SPRINT_BUF(b1);
+ SPRINT_BUF(b2);
+
+ if (xstats == NULL)
+ return 0;
+
+ if (RTA_PAYLOAD(xstats) < sizeof(st->type))
+ return -1;
+
+ st = RTA_DATA(xstats);
+ stnc = RTA_DATA(xstats);
+
+ if (st->type == TCA_FQ_CODEL_XSTATS_QDISC && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
+ fprintf(f, " maxpacket %u drop_overlimit %u new_flow_count %u ecn_mark %u",
+ st->qdisc_stats.maxpacket,
+ st->qdisc_stats.drop_overlimit,
+ st->qdisc_stats.new_flow_count,
+ st->qdisc_stats.ecn_mark);
+ fprintf(f, "\n new_flows_len %u old_flows_len %u",
+ st->qdisc_stats.new_flows_len,
+ st->qdisc_stats.old_flows_len);
+ } else if (st->type == TCA_FQ_CODEL_XSTATS_CLASS && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
+ fprintf(f, " deficit %d count %u lastcount %u ldelay %s",
+ st->class_stats.deficit,
+ st->class_stats.count,
+ st->class_stats.lastcount,
+ sprint_time(st->class_stats.ldelay, b1));
+ if (st->class_stats.dropping) {
+ fprintf(f, " dropping");
+ if (st->class_stats.drop_next < 0)
+ fprintf(f, " drop_next -%s",
+ sprint_time(-st->class_stats.drop_next, b1));
+ else
+ fprintf(f, " drop_next %s",
+ sprint_time(st->class_stats.drop_next, b1));
+ }
+ } else if (stnc->version >= 1 && stnc->version < 0xFF
+ && stnc->max_tins == TC_CAKE_MAX_TINS
+ && RTA_PAYLOAD(xstats) >= offsetof(struct tc_cake_xstats, capacity_estimate))
+ {
+ int i;
+
+ if(stnc->version >= 3)
+ fprintf(f, " memory used: %s of %s\n", sprint_size(stnc->memory_used, b1), sprint_size(stnc->memory_limit, b2));
+
+ if(stnc->version >= 2)
+ fprintf(f, " capacity estimate: %s\n", sprint_rate(stnc->capacity_estimate, b1));
+
+ switch(stnc->tin_cnt) {
+ case 4:
+ fprintf(f, " Bulk Best Effort Video Voice\n");
+ break;
+
+ case 5:
+ fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
+ break;
+
+ default:
+ fprintf(f, " ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, " Tin %u", i);
+ fprintf(f, "\n");
+ };
+
+ fprintf(f, " thresh ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_rate(stnc->threshold_rate[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " target ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_time(stnc->target_us[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " interval");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_time(stnc->interval_us[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " pk_delay");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_time(stnc->peak_delay_us[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " av_delay");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_time(stnc->avge_delay_us[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " sp_delay");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12s", sprint_time(stnc->base_delay_us[i], b1));
+ fprintf(f, "\n");
+
+ fprintf(f, " pkts ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->sent[i].packets);
+ fprintf(f, "\n");
+
+ fprintf(f, " bytes ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12llu", stnc->sent[i].bytes);
+ fprintf(f, "\n");
+
+ fprintf(f, " way_inds");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->way_indirect_hits[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " way_miss");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->way_misses[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " way_cols");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->way_collisions[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " drops ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->dropped[i].packets);
+ fprintf(f, "\n");
+
+ fprintf(f, " marks ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->ecn_marked[i].packets);
+ fprintf(f, "\n");
+
+ fprintf(f, " sp_flows");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->sparse_flows[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " bk_flows");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->bulk_flows[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " last_len");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->last_skblen[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, " max_len ");
+ for(i=0; i < stnc->tin_cnt; i++)
+ fprintf(f, "%12u", stnc->max_skblen[i]);
+ fprintf(f, "\n");
+ } else {
+ return -1;
+ }
+ return 0;
+}
+
+struct qdisc_util cake_qdisc_util = {
+ .id = "cake",
+ .parse_qopt = cake_parse_opt,
+ .print_qopt = cake_print_opt,
+ .print_xstats = cake_print_xstats,
+};
(Last edited by shm0 on 2 Jun 2016, 17:47)
Sorry, posts 11826 to 11825 are missing from our archive.