Reply
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

the settings did not apply well for me, my downstream simply will not work no matter what i try. could it be related to my bridge on my other 2 ports?

T1200 - ERX - UAP - R7000 - WEB6000Q
Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

I am 3000 miles away from my edgerouters and thus cannot test right now.

You can get better output from the script if you run it with -x

bash -x the_script 2> /tmp/qoslog

and if you look at that you will see the exact lines from which errors are eminating. Possible things wrong could be:

syntax change to tc

not modprobing/autoloading some kernel module needed fast enough (I tend to explicitly do a modprobe sch_fq, etc)

something else.

I note that this is the worlds most long ubnt thread and I wouldn't mind if a new one started that was specific to 1.6.

There are a few things that work in htb 3.10.12 and later that didn't before, notably correctly working ATM and PPPoE compensation... and rather than continuing with this script my intent was to leverage the battle tested sqm- scripts in cerowrt which have a more abstractable setup mechanism.

 

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

where is the problem ? looks like its near the bottom


admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory


ERL login: admin
Password:
Linux ERL 3.10.20-UBNT #1 SMP Mon Jul 28 21:00:11 UTC 2014 mips64
Welcome to EdgeOS
admin@ERL:~$ #!/bin/bash
admin@ERL:~$
admin@ERL:~$ ethtool -K eth1 gro off
-vbash: ethtool: command not found
WAN_INTF=eth1
admin@ERL:~$
admin@ERL:~$ ### basic settings
admin@ERL:~$ WAN_INTF=eth1
admin@ERL:~$ WAN_UP_SPEED=5500kbit
admin@ERL:~$ WAN_DOWN_SPEED=100000kbit
admin@ERL:~$
admin@ERL:~$ ### advanced settings
admin@ERL:~$ TQDISC=fq_codel
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 300
admin@ERL:~$ #   otherwise: 1514
admin@ERL:~$ FQ_CODEL_QUANTUM_UP=300
admin@ERL:~$ FQ_CODEL_QUANTUM_DOWN=1514
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 3mbit: 15ms
admin@ERL:~$ #   otherwise: 5ms
admin@ERL:~$ FQ_CODEL_TARGET_UP=5ms
admin@ERL:~$ FQ_CODEL_TARGET_DOWN=5ms
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 1500
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
admin@ERL:~$ #   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
admin@ERL:~$ HTB_QUANTUM_UP=1500
admin@ERL:~$ HTB_QUANTUM_DOWN=8000
admin@ERL:~$
admin@ERL:~$ TQDISC_OPTS_UP=
admin@ERL:~$ TQDISC_OPTS_DOWN=
admin@ERL:~$ if [ "$TQDISC" == fq_codel ]; then
>     TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
>     TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
>     TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
>     TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
> fi
admin@ERL:~$
admin@ERL:~$ WAN_IFB="ifb_${WAN_INTF}"
admin@ERL:~$ TC=/sbin/tc
admin@ERL:~$ IP=/sbin/ip
    htb quantum $HTB_QUANTUM_DOWN \
admin@ERL:~$
admin@ERL:~$ $TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
admin@ERL:~$ $TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
admin@ERL:~$ $TC qdisc del dev $WAN_IFB root >/dev/null 2>&1
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
admin@ERL:~$
admin@ERL:~$ [ "$1" == clear ] && exit 0
admin@ERL:~$
admin@ERL:~$ $TC qdisc add dev $WAN_INTF root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP
admin@ERL:~$
admin@ERL:~$ $IP link add $WAN_IFB type ifb >/dev/null 2>&1
admin@ERL:~$ $TC qdisc add dev $WAN_IFB root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN
admin@ERL:~$
admin@ERL:~$ $IP link set $WAN_IFB up
admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory
admin@ERL:~$ $TC filter add dev $WAN_INTF parent ffff: \
>     protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
>     action mirred egress redirect dev $WAN_IFB"

T1200 - ERX - UAP - R7000 - WEB6000Q
Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

Ah, from reading the logs on ifb0 (no packets) it looks as though the act_mirred line is failing to be installed.

that particular filter is complex and relies on at least 3 kernel modules being built and installed - act_mirred, sch_cls and u32 (please note that I don't have this in front of me, so the names might be slightly different)...

 

and it's always possible there was a syntax change somewhere in tc on this.

Do a bash -x on the script to verify this is what is going south, and then fiddle with the busted line and modprobe...

Established Member
Posts: 1,833
Registered: ‎02-07-2014
Kudos: 621
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1


@ConnorM wrote:

where is the problem ? looks like its near the bottom


admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory


ERL login: admin
Password:
Linux ERL 3.10.20-UBNT #1 SMP Mon Jul 28 21:00:11 UTC 2014 mips64
Welcome to EdgeOS
admin@ERL:~$ #!/bin/bash
admin@ERL:~$
admin@ERL:~$ ethtool -K eth1 gro off
-vbash: ethtool: command not found
WAN_INTF=eth1
admin@ERL:~$
admin@ERL:~$ ### basic settings
admin@ERL:~$ WAN_INTF=eth1
admin@ERL:~$ WAN_UP_SPEED=5500kbit
admin@ERL:~$ WAN_DOWN_SPEED=100000kbit
admin@ERL:~$
admin@ERL:~$ ### advanced settings
admin@ERL:~$ TQDISC=fq_codel
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 300
admin@ERL:~$ #   otherwise: 1514
admin@ERL:~$ FQ_CODEL_QUANTUM_UP=300
admin@ERL:~$ FQ_CODEL_QUANTUM_DOWN=1514
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 3mbit: 15ms
admin@ERL:~$ #   otherwise: 5ms
admin@ERL:~$ FQ_CODEL_TARGET_UP=5ms
admin@ERL:~$ FQ_CODEL_TARGET_DOWN=5ms
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 1500
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
admin@ERL:~$ #   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
admin@ERL:~$ HTB_QUANTUM_UP=1500
admin@ERL:~$ HTB_QUANTUM_DOWN=8000
admin@ERL:~$
admin@ERL:~$ TQDISC_OPTS_UP=
admin@ERL:~$ TQDISC_OPTS_DOWN=
admin@ERL:~$ if [ "$TQDISC" == fq_codel ]; then
>     TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
>     TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
>     TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
>     TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
> fi
admin@ERL:~$
admin@ERL:~$ WAN_IFB="ifb_${WAN_INTF}"
admin@ERL:~$ TC=/sbin/tc
admin@ERL:~$ IP=/sbin/ip
    htb quantum $HTB_QUANTUM_DOWN \
admin@ERL:~$
admin@ERL:~$ $TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
admin@ERL:~$ $TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
admin@ERL:~$ $TC qdisc del dev $WAN_IFB root >/dev/null 2>&1
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
admin@ERL:~$
admin@ERL:~$ [ "$1" == clear ] && exit 0
admin@ERL:~$
admin@ERL:~$ $TC qdisc add dev $WAN_INTF root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP
admin@ERL:~$
admin@ERL:~$ $IP link add $WAN_IFB type ifb >/dev/null 2>&1
admin@ERL:~$ $TC qdisc add dev $WAN_IFB root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN
admin@ERL:~$
admin@ERL:~$ $IP link set $WAN_IFB up
admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory
admin@ERL:~$ $TC filter add dev $WAN_INTF parent ffff: \
>     protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
>     action mirred egress redirect dev $WAN_IFB"


@ConnorM you should also change the ethtool line to /sbin/ethtool -K ....

Member
Posts: 276
Registered: ‎11-16-2013
Kudos: 104
Solutions: 15

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

looks like it's really don't work on DOWN, only on UP, i just didn't fully utilized downstream.

 

After sh -x qsetup.sh:

# sh -x qsetupn.sh 
+ WAN_INTF=eth0
+ WAN_UP_SPEED=100mbit
+ WAN_DOWN_SPEED=100mbit
+ FQ_CODEL_QUANTUM_UP=1514
+ FQ_CODEL_QUANTUM_DOWN=1514
+ FQ_CODEL_TARGET_UP=5ms
+ FQ_CODEL_TARGET_DOWN=5ms
+ HTB_QUANTUM_UP=8000
+ HTB_QUANTUM_DOWN=8000
+ TQDISC=fq_codel
+ TQDISC_OPTS_UP=
+ TQDISC_OPTS_DOWN=
+ '[' fq_codel == fq_codel ']'
+ TQDISC_OPTS_UP+='quantum 1514 '
+ TQDISC_OPTS_UP+='target 5ms '
+ TQDISC_OPTS_DOWN+='quantum 1514 '
+ TQDISC_OPTS_DOWN+='target 5ms '
+ WAN_IFB=ifb_eth0
+ TC=/sbin/tc
+ IP=/sbin/ip
+ /sbin/tc qdisc del dev eth0 root
+ /sbin/tc qdisc del dev eth0 ingress
+ /sbin/tc qdisc del dev ifb_eth0 root
+ '[' '' == clear ']'
+ /sbin/tc qdisc add dev eth0 root handle 1: htb default 10
+ /sbin/tc class add dev eth0 parent 1: classid 1:1 htb quantum 8000 rate 100mbit ceil 100mbit
+ /sbin/tc class add dev eth0 parent 1:1 classid 1:10 htb quantum 8000 rate 100mbit ceil 100mbit
+ /sbin/tc qdisc add dev eth0 parent 1:10 handle 100: fq_codel quantum 1514 target 5ms
+ '[' -n 100mbit ']'
+ '[' 100mbit '!=' 0 ']'
+ /sbin/ip link add ifb_eth0 type ifb
+ /sbin/tc qdisc add dev ifb_eth0 root handle 1: htb default 10
+ /sbin/tc class add dev ifb_eth0 parent 1: classid 1:1 htb quantum 8000 rate 100mbit ceil 100mbit
+ /sbin/tc class add dev ifb_eth0 parent 1:1 classid 1:10 htb quantum 8000 rate 100mbit ceil 100mbit
+ /sbin/tc qdisc add dev ifb_eth0 parent 1:10 handle 100: fq_codel quantum 1514 target 5ms
+ /sbin/ip link set ifb_eth0 up
+ /sbin/tc qdisc add dev eth0 handle ffff: ingress #First error, solution recommended here: http://mailman.ds9a.nl/pipermail/lartc/2001q2/001224.html
RTNETLINK answers: No such file or directory
+ /sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb_eth0 # don't know what's wrong here :)
RTNETLINK answers: Invalid argument
We have an error talking to the kernel

*inviting @UBNT-ancheng

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

@dtaht2  could u plz tell me what u mean when u say do a bash -x on the script. i dont know exactly what to do........

@Sugaroverdosethank you for clarifying your downstream does not work aswell, i was like whaatt..

T1200 - ERX - UAP - R7000 - WEB6000Q
Established Member
Posts: 1,833
Registered: ‎02-07-2014
Kudos: 621
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1

Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

 

Looks like there are several bugs here.


@ConnorM wrote:

where is the problem ? looks like its near the bottom


admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory


ERL login: admin
Password:
Linux ERL 3.10.20-UBNT #1 SMP Mon Jul 28 21:00:11 UTC 2014 mips64
Welcome to EdgeOS
admin@ERL:~$ #!/bin/bash
admin@ERL:~$
admin@ERL:~$ ethtool -K eth1 gro off
-vbash: ethtool: command not found
WAN_INTF=eth1
admin@ERL:~$
admin@ERL:~$ ### basic settings
admin@ERL:~$ WAN_INTF=eth1
admin@ERL:~$ WAN_UP_SPEED=5500kbit
admin@ERL:~$ WAN_DOWN_SPEED=100000kbit
admin@ERL:~$
admin@ERL:~$ ### advanced settings
admin@ERL:~$ TQDISC=fq_codel
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 300
admin@ERL:~$ #   otherwise: 1514
admin@ERL:~$ FQ_CODEL_QUANTUM_UP=300
admin@ERL:~$ FQ_CODEL_QUANTUM_DOWN=1514
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 3mbit: 15ms
admin@ERL:~$ #   otherwise: 5ms
admin@ERL:~$ FQ_CODEL_TARGET_UP=5ms
admin@ERL:~$ FQ_CODEL_TARGET_DOWN=5ms
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 1500
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
admin@ERL:~$ #   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
admin@ERL:~$ HTB_QUANTUM_UP=1500
admin@ERL:~$ HTB_QUANTUM_DOWN=8000
admin@ERL:~$
admin@ERL:~$ TQDISC_OPTS_UP=
admin@ERL:~$ TQDISC_OPTS_DOWN=
admin@ERL:~$ if [ "$TQDISC" == fq_codel ]; then
>     TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
>     TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
>     TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
>     TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
> fi
admin@ERL:~$
admin@ERL:~$ WAN_IFB="ifb_${WAN_INTF}"
admin@ERL:~$ TC=/sbin/tc
admin@ERL:~$ IP=/sbin/ip
    htb quantum $HTB_QUANTUM_DOWN \
admin@ERL:~$
admin@ERL:~$ $TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
admin@ERL:~$ $TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
admin@ERL:~$ $TC qdisc del dev $WAN_IFB root >/dev/null 2>&1
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
admin@ERL:~$
admin@ERL:~$ [ "$1" == clear ] && exit 0
admin@ERL:~$
admin@ERL:~$ $TC qdisc add dev $WAN_INTF root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP
admin@ERL:~$
admin@ERL:~$ $IP link add $WAN_IFB type ifb >/dev/null 2>&1
admin@ERL:~$ $TC qdisc add dev $WAN_IFB root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
admin@ERL:~$ $TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN
admin@ERL:~$
admin@ERL:~$ $IP link set $WAN_IFB up
admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
RTNETLINK answers: No such file or directory
admin@ERL:~$ $TC filter add dev $WAN_INTF parent ffff: \
>     protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
>     action mirred egress redirect dev $WAN_IFB"


 

 

1) There is no ethtool installed by default? Or your path is wrong or you have to explicitly set your path (do a which ethtool, if it is not present perhaps it was built as an optional package and can be installed via apt-get (and installed by default in the next release))

2) I had not used this method for setting a named ifb up elsewhere. However it appears that the ingress qdisc setup portion is not functioning correctly, which is before even getting ifb mirred to work, and your log doesn't show the mirred command failing. Puzzling. Perhaps it needs to be deleted first then setup?

 

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

@dtaht2 wrote:

 

 Puzzling. Perhaps it needs to be deleted first then setup?

 


tried like 5 times. when i first ran the script. i simply opened my current one and edited text from upstream only to both to test downstream. upstream was working right away with upgrade, when i changed the text to downstream and downstream, only upstream worked. so i tried deleting and setting up the script again

so change the script name. re run chmod command save reboot.

didnt work at all, then i put upstream only script, worked. switched back to downstream and upstream and upstream only worked

deleted redid that like 3-4 times. tried alot. i was in the middle of fully troubleshooting it when @Sugaroverdose said it was working for him haha, but it turns out its actually not working for him...... i have been troubleshooting this since 1am. 5:20am now

T1200 - ERX - UAP - R7000 - WEB6000Q
Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

Well, it is effectively 5:22 here (I am on the east coast but on west coast time), so I am a little bleary.

1) /sbin/ethtool looks like a fix for the the ethtool call? 

2) as for the ingress portion of the problem, do a:

lsmod | grep ingress # to see if sch_ingress is installed

Otherwise, do a 

modprobe sch_ingress

to see if it can be installed, and if that returns with no error, put it in the top of the script. If it errors out there's a kernel problem with this build.

modprobe sch_fq_codel

modprobe act_mirred

modprobe cls_flow

modprobe cls_fw

modprobe cls_u32

Member
Posts: 276
Registered: ‎11-16-2013
Kudos: 104
Solutions: 15

Re: Testing fq_codel in v1.5.0beta1


@dtaht2 wrote:

Well, it is effectively 5:22 here (I am on the east coast but on west coast time), so I am a little bleary.

1) /sbin/ethtool looks like a fix for the the ethtool call? 

2) as for the ingress portion of the problem, do a:

lsmod | grep ingress # to see if sch_ingress is installed

Otherwise, do a 

modprobe sch_ingress

to see if it can be installed, and if that returns with no error, put it in the top of the script. If it errors out there's a kernel problem with this build.

modprobe sch_fq_codel

modprobe act_mirred

modprobe cls_flow

modprobe cls_fw

modprobe cls_u32


loaded everything exept sch_ingress 

# modprobe sch_ingress
FATAL: Module sch_ingress not found.

 

 

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1


admin@ERL:~$ /sbin/ethtool -K eth1 gro off
admin@ERL:~$
admin@ERL:~$ ### basic settings
admin@ERL:~$ WAN_INTF=eth1
admin@ERL:~$ WAN_UP_SPEED=5500kbit
admin@ERL:~$ WAN_DOWN_SPEED=100000kbit
admin@ERL:~$
admin@ERL:~$ ### advanced settings
admin@ERL:~$ TQDISC=fq_codel
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 300
admin@ERL:~$ #   otherwise: 1514
admin@ERL:~$ FQ_CODEL_QUANTUM_UP=300
admin@ERL:~$ FQ_CODEL_QUANTUM_DOWN=1514
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 3mbit: 15ms
admin@ERL:~$ #   otherwise: 5ms
admin@ERL:~$ FQ_CODEL_TARGET_UP=5ms
admin@ERL:~$ FQ_CODEL_TARGET_DOWN=5ms
admin@ERL:~$
admin@ERL:~$ # Dave Taht's recommendation:
admin@ERL:~$ #   less than 40mbit: 1500
admin@ERL:~$ #   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
admin@ERL:~$ HTB_QUANTUM_UP=1500
admin@ERL:~$ HTB_QUANTUM_DOWN=8000
admin@ERL:~$
admin@ERL:~$ TQDISC_OPTS_UP=
admin@ERL:~$ TQDISC_OPTS_DOWN=
admin@ERL:~$ if [ "$TQDISC" == fq_codel ]; then
>     TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
>     TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
>     TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
>     TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
> fi
admin@ERL:~$
admin@ERL:~$ WAN_IFB="ifb_${WAN_INTF}"
admin@ERL:~$ TC=/sbin/tc
admin@ERL:~$ IP=/sbin/ip
admin@ERL:~$
admin@ERL:~$ $TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
admin@ERL:~$ $TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
admin@ERL:~$ $TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

admin@ERL:~$
admin@ERL:~$ [ "$1" == clear ] && exit 0
admin@ERL:~$
admin@ERL:~$ $TC qdisc add dev $WAN_INTF root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1: classid 1:1 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
admin@ERL:~$ $TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_UP \
>     rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP
admin@ERL:~$ $TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP
admin@ERL:~$
admin@ERL:~$ $IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
admin@ERL:~$ $TC qdisc add dev $WAN_IFB root handle 1: htb default 10
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1: classid 1:1 \
N \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
t 1:1 classid 1:10 \
admin@ERL:~$ $TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
>     htb quantum $HTB_QUANTUM_DOWN \
>     rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN
admin@ERL:~$ $TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN
admin@ERL:~$
admin@ERL:~$ $IP link set $WAN_IFB up
admin@ERL:~$ $TC qdisc add dev $WAN_INTF handle ffff: ingress
$TC filter add dev $WAN_INTF parent ffff: \
RTNETLINK answers: No such file or directory
admin@ERL:~$ $TC filter add dev $WAN_INTF parent ffff: \
>     protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
>     action mirred egress redirect dev $WAN_IFB"

T1200 - ERX - UAP - R7000 - WEB6000Q
Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

OK, well, sounds like ubnt didn't build sch_ingress as part of this kernel build. Can't help you there...

Established Member
Posts: 1,833
Registered: ‎02-07-2014
Kudos: 621
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

on ER-Pro get this:

sh-4.2$ /sbin/modprobe sch_ingress
FATAL: Module sch_ingress not found.
sh-4.2$ /sbin/modprobe sch_fq_codel
sh-4.2$ /sbin/modprobe act_mirred  
sh-4.2$ /sbin/modprobe cls_flow  
ERROR: could not insert 'cls_flow': Operation not permitted
sh-4.2$ /sbin/modprobe cls_fw
ERROR: could not insert 'cls_fw': Operation not permitted
sh-4.2$ /sbin/modprobe cls_u32

So, we'll have to wait for a new build w/ those modules @UBNT-stig @UBNT-ancheng 
Thanks Dave to assist in finding the issue!
 

Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

um, er, you do need to be root to do those modprobes..

Established Member
Posts: 1,833
Registered: ‎02-07-2014
Kudos: 621
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1


@dtaht2 wrote:

um, er, you do need to be root to do those modprobes..


uh, right... **bleep**, thought I'd sudo -s 'ed

ok, so only sch_ingress missing indeed

Member
Posts: 157
Registered: ‎06-30-2014
Kudos: 59

Re: Testing fq_codel in v1.5.0beta1

maybe they patched in imq?

Established Member
Posts: 1,833
Registered: ‎02-07-2014
Kudos: 621
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1

Don't know... I don't see anything like imq..

sh-4.2$ kmod list
Module                  Size  Used by
cls_fw                  5938  0 
cls_flow                7727  0 
act_mirred              4339  1 
cls_u32                 9320  1 
nf_conntrack_netlink    29502  0 
xt_connmark             2293  24 
ifb                     4245  0 
sch_fq_codel            9109  2 
sch_htb                17447  2 
xt_dyn_random           3119  6 
xt_nat                  2249  17 
tun                    23546  4 
pppoe                  12530  2 
pppox                   2306  1 pppoe
ppp_generic            28527  6 pppoe,pppox
slhc                    5850  1 ppp_generic
8021q                  21694  0 
garp                    7358  1 8021q
stp                     2117  1 garp
llc                     4705  2 stp,garp
ipt_MASQUERADE          2066  4 
xt_set                  6776  8 
xt_mark                 1357  61 
xt_recent              10886  2 
xt_state                1487  33 
xt_comment              1067  22 
xt_TCPMSS               4279  6 
xt_tcpudp               2791  47 
ip6table_mangle         2140  1 
ip6table_filter         1644  1 
ip6table_raw            1568  1 
ip6_tables             21224  3 ip6table_filter,ip6table_mangle,ip6table_raw
iptable_nat             3534  1 
nf_conntrack_ipv4       9526  58 
nf_defrag_ipv4          1459  1 nf_conntrack_ipv4
nf_nat_ipv4             4688  1 iptable_nat
iptable_mangle          2040  1 
xt_CT                   4875  4 
iptable_raw             1628  1 
nf_nat_pptp             2298  0 
nf_conntrack_pptp       5048  1 nf_nat_pptp
nf_conntrack_proto_gre     5743  1 nf_conntrack_pptp
nf_nat_h323             7455  0 
nf_conntrack_h323      44940  1 nf_nat_h323
nf_nat_sip             10165  0 
nf_conntrack_sip       26573  1 nf_nat_sip
nf_nat_proto_gre        1733  1 nf_nat_pptp
nf_nat_tftp             1102  0 
nf_nat_ftp              2060  0 
nf_nat                 16063  10 nf_nat_ftp,nf_nat_sip,ipt_MASQUERADE,nf_nat_proto_gre,nf_nat_h323,nf_nat_ipv4,nf_nat_pptp,nf_nat_tftp,xt_nat,iptable_nat
nf_conntrack_tftp       4233  1 nf_nat_tftp
nf_conntrack_ftp        7938  1 nf_nat_ftp
nf_conntrack           74412  20 nf_nat_ftp,nf_nat_sip,xt_CT,nf_conntrack_proto_gre,ipt_MASQUERADE,nf_nat,xt_state,nf_nat_h323,nf_nat_ipv4,nf_nat_pptp,nf_nat_tftp,nf_conntrack_netlink,xt_connmark,nf_conntrack_ftp,nf_conntrack_sip,iptable_nat,nf_conntrack_h323,nf_conntrack_ipv4,nf_conntrack_pptp,nf_conntrack_tftp
iptable_filter          1704  1 
ip_tables              20898  4 iptable_filter,iptable_mangle,iptable_nat,iptable_raw
x_tables               22054  20 ip6table_filter,xt_mark,xt_CT,ip6table_mangle,xt_comment,xt_recent,ip_tables,xt_tcpudp,xt_dyn_random,ipt_MASQUERADE,xt_state,xt_nat,xt_set,iptable_filter,ip6table_raw,xt_TCPMSS,xt_connmark,iptable_mangle,ip6_tables,iptable_raw
ip_set_hash_net        24466  14 
ip_set                 26554  2 ip_set_hash_net,xt_set
nfnetlink               4709  2 ip_set,nf_conntrack_netlink
cvm_ipsec_kame         40575  0 
ipv6                  416215  40 ip6table_mangle,cvm_ipsec_kame
cavium_ip_offload     146616  0 
octeon_rng              2162  0 
rng_core                4600  2 octeon_rng
octeon_ethernet        63356  1 cavium_ip_offload
mdio_octeon             4251  1 octeon_ethernet
of_mdio                 3238  2 octeon_ethernet,mdio_octeon
ethernet_mem            5080  1 octeon_ethernet
octeon_common           2680  1 octeon_ethernet
ubnt_platform         131273  0 
libphy                 23807  4 ubnt_platform,octeon_ethernet,mdio_octeon,of_mdio

 

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5471
Solutions: 1656
Contributions: 2

Re: Testing fq_codel in v1.5.0beta1

Thanks everyone for testing this! Yes the issue is the missing sch_ingress module, which was not enabled in the config (doh!). It will definitely be in the next release but for now I'll build and provide just the module so that you guys can get started testing this!

By the way, this has been a long and exciting thread but I think it has served its purpose, so I'll open a new thread and we can continue the discussions there for the 1.6.0 testing (starting with the missing module Icon Smile ). Thanks everyone for your contributions!

Reply