What's new

[Release] FreshJR Adaptive QOS (Improvements / Custom Rules / and Inner workings)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
After applying the change to line 118 do we need to reboot or restart QOS?

Restart QOS yes, restart router no.

A restart is not typical between updates. That was just a one time thing due to firmware changes and a glitched state.
 
Beta 5 running on ac3200 version 384.3 without any problems.

Is there any easy way to allow a single device to use unlimited bandwidth and have priority over all others? I want to use my raspberry pi trick to feed speedtest results into the manual bandwidth fields giving a workaround for automatic bandwidth adjustment.
 
Beta 5 running on ac3200 version 384.3 without any problems.

Is there any easy way to allow a single device to use unlimited bandwidth and have priority over all others? I want to use my raspberry pi trick to feed speedtest results into the manual bandwidth fields giving a workaround for automatic bandwidth adjustment.

Create a rule for it and apply flowid 1:2
 
Restart QOS yes, restart router no.

A restart is not typical between updates. That was just a one time thing due to firmware changes and a glitched state.

If I restart QOS without a reboot I get these errors messages in log and it dosen't seem to stop:

Code:
Feb 21 21:19:21 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 21 21:19:21 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 21 21:19:21 kernel: ioctl_iqos_op_config() fail!
Feb 21 21:19:21 kernel: ERR[qos_start:3344] QoS is already started!
Feb 21 21:19:21 kernel: ioctl_iqos_op_switch(1) fail!
Feb 21 21:19:24 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 21 21:19:24 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 21 21:19:24 kernel: ioctl_iqos_op_config() fail!
Feb 21 21:19:24 kernel: ERR[qos_start:3344] QoS is already started!
Feb 21 21:19:24 kernel: ioctl_iqos_op_switch(1) fail!
Feb 21 21:19:27 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 21 21:19:27 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 21 21:19:27 kernel: ioctl_iqos_op_config() fail!
Feb 21 21:19:27 kernel: ERR[qos_start:3344] QoS is already started!
Feb 21 21:19:27 kernel: ioctl_iqos_op_switch(1) fail!
 
Those messages should stop after QOS is finished setting itself up within 3 minutes

Let it set itself up for 12 minutes but no change unfotunately.

Also manually issued a service restart_qos but it seems to fail:

Code:
Feb 21 21:37:40 rc_service: skip the event: restart_qos;restart_firewall.

Only a full reboot gets QOS running again :mad:.

FYI, if I remove your scripts this doesn't happen.
 
FYI, if I remove your scripts this doesn't happen.

In that case I will have to look into what could be causing it from my end.
Drawing blanks so it might be a while.


Feel free to switch back to the non-fakeTC method posted a few pages back.
That one should work without the messages.
 
In that case I will have to look into what could be causing it from my end.
Drawing blanks so it might be a while.


Feel free to switch back to the non-fakeTC method posted a few pages back.
That one should work without the messages.

Thank U
 
Create a rule for it and apply flowid 1:2

Thanks.

If I use an IP address I can add the flowid 1:2 instead of the variable name for the download traffic, what should I specify for the upload traffic as I will need to use iptables command?

Also, I assume the bandwidths have the decimal figures stripped off as part of the script, where should I update to include the decimal part of the bandwidth, I previously used bc to perform the floating point calculations and any advice appreciated.

Thanks one again!
 
Thanks.

If I use an IP address I can add the flowid 1:2 instead of the variable name for the download traffic, what should I specify for the upload traffic as I will need to use iptables command?

Also, I assume the bandwidths have the decimal figures stripped off as part of the script, where should I update to include the decimal part of the bandwidth, I previously used bc to perform the floating point calculations and any advice appreciated.

Thanks one again!

The ceil/rates are specified in kbits.
No decimals are supported.

Why are you trying to modify these? flowid "1:2" has a ciel of 1gbit if i recall correctly. No modifications necessary in this area.

Yes use "flowid 1:2" instead of "flowid ${Category}"

For upload choose a mark between 0x402C0000 - 0x403F0000 in iptables, then create a rule to match on that mark in TC where that rule will send that traffic to flowid 1:2
 
Great, I will give that a try.

On the bandwidth using decimals I am looking to use as much of the bandwidth available as possible when assigning the percentages to the categories e.g. my up bandwidth should be 4.7 to get A rating on buffer bloat speedtest but I will lose nearly 1mb by stripping off the decimals
 
Great, I will give that a try.

On the bandwidth using decimals I am looking to use as much of the bandwidth available as possible when assigning the percentages to the categories e.g. my up bandwidth should be 4.7 to get A rating on buffer bloat speedtest but I will lose nearly 1mb by stripping off the decimals

4.7mbit = 4812kbit

It's 1024 kbits per mbit. (They are using Mib notation vs Mb notation)
 
That's great, I was forgetting the figures are translated from the web UI numbers to kbit behind the scenes.

Will the following additions to the main script (not the fake tc script) allow me to have unlimited and prioritised bandwidth for the specific device?

realtc filter add dev br0 protocol all prio 2 u32 match ip dst 192.168.65.129/32 flowid 1:2

realtc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 0x402D0000 fw flowid 1:2
iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.129/32 -j MARK --set-mark 0x402D0000 &> /dev/null
iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.129/32 -j MARK --set-mark 0x402D0000

Thanks.
 
That's great, I was forgetting the figures are translated from the web UI numbers to kbit behind the scenes.

Will the following additions to the main script (not the fake tc script) allow me to have unlimited and prioritised bandwidth for the specific device?

realtc filter add dev br0 protocol all prio 2 u32 match ip dst 192.168.65.129/32 flowid 1:2

realtc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 0x402D0000 fw flowid 1:2
iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.129/32 -j MARK --set-mark 0x402D0000 &> /dev/null
iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.129/32 -j MARK --set-mark 0x402D0000

Thanks.

not quite, for upload try

realtc filter add dev eth0 protocol all prio 2 u32 match mark 0x402D000 0xc03f0000 flowid 1:2
 
Thanks for the help, it appears to be functioning as expected, my Raspberry Pi is now feeding the up and down speeds via a scheduled speedtest into the manual figures of the router.

One thing I have noticed is that the script fails when the router is rebooted, I assume I will need to add a delay to wait until qos is fully started or check for a specific amount of uptime?

Thanks.
 
Thanks for the help, it appears to be functioning as expected, my Raspberry Pi is now feeding the up and down speeds via a scheduled speedtest into the manual figures of the router.

One thing I have noticed is that the script fails when the router is rebooted, I assume I will need to add a delay to wait until qos is fully started or check for a specific amount of uptime?

Thanks.

As soon as firewall-start is executed, the script replaces RMerlines TC command interceptor with my modified version.

It should not fail on reboot. No idea. Check logs what is going on.
 
pscp.exe is not required to copy the scripts over, correct? I have a linux machine, so it would still work to just put the files in the directory and then run the commands? I'm assuming yes :)

Again, thanks for your work on this!
 
Maybe a stupid question but if I am regularly updating the manual bandwidth figures via script do I just call the FreshJR_QOS script with the -start option to apply the new figures as part of the script?
 
Maybe a stupid question but if I am regularly updating the manual bandwidth figures via script do I just call the FreshJR_QOS script with the -start option to apply the new figures as part of the script?

No. you would have to create a new function that uses TC to change all the class rates similar to what was done before this version.

This version intercepts the commands instead of changing them after the fact. The start function just verifies the interceptor (fakeTC) is active. Since ASUS will not be sending any new commands, there will be nothing to intercept.

Maybe switch back to the older version for your needs.

@MysticGold04, yes your Linux equivalent should work the same.

@Gingernut

Here are my results after disabling FreshJR_QOS

Fresh BOOT (QOS NOT DONE SETTING ITSELF UP)
Code:
Feb 22 21:53:43 qos: Applying codel patch
Feb 22 21:53:44 kernel: Init chrdev /dev/detector with major 190
Feb 22 21:53:44 kernel: tdts: tcp_conn_max = 8000
Feb 22 21:53:44 kernel: tdts: tcp_conn_timeout = 300 sec
Feb 22 21:53:59 kernel: SHN Release Version: 2.0.1 3529123_patch
Feb 22 21:53:59 kernel: UDB Core Version: 0.2.14 r3529123
Feb 22 21:53:59 kernel: Init chrdev /dev/idpfw with major 191
Feb 22 21:54:00 kernel: IDPfw: IDPfw is ready
Feb 22 21:54:00 kernel: sizeof forward pkt param = 192
Feb 22 21:54:05 kernel: ERR[qos_start:3356] qos_ops is not registered!
Feb 22 21:54:05 kernel: ioctl_iqos_op_switch(1) fail!
Feb 22 21:54:05 kernel: ERR[qos_start:3356] qos_ops is not registered!
Feb 22 21:54:05 kernel: ioctl_iqos_op_switch(1) fail!
Feb 22 21:54:05 rc_service: udhcpc 392:notify_rc start_firewall
Feb 22 21:54:06 miniupnpd[535]: shutting down MiniUPnPd

Toggle QOS (OFF -> ON) -- messages present but not repeatable upon every toggle
Code:
Feb 22 21:56:14 rc_service: httpd 282:notify_rc restart_qos;restart_firewall
Feb 22 21:56:35 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 22 21:56:35 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 22 21:56:35 kernel: ioctl_iqos_op_config() fail!
Feb 22 21:56:35 kernel: ERR[qos_start:3344] QoS is already started!
Feb 22 21:56:35 kernel: ioctl_iqos_op_switch(1) fail!

Toggle QOS (ON -> OFF) -- no messages
Code:
Feb 22 21:58:28 rc_service: httpd 282:notify_rc restart_qos;restart_firewall
Feb 22 21:58:49 miniupnpd[1630]: shutting down MiniUPnPd
Feb 22 21:58:49 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Feb 22 21:58:49 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Feb 22 21:58:49 miniupnpd[14019]: HTTP listening on port 57778
Feb 22 21:58:49 miniupnpd[14019]: Listening for NAT-PMP/PCP traffic on port 5351

I still have more debugging ideas, but I am not entirely convinced these messages are coming from my end, since the messages are present without the script running and even a reboot after the removal of the script.
 
Last edited:
Status
Not open for further replies.

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top