Qualcomm Fast Path For LEDE

Is /sys/ does not contain sfe_ipv6 also? Provide 'lsmod | grep shortcut' pls

edit: yes it should be absent as well if there's no dev, seems that ipv6 module is not loaded in your environment.
Set debug to 4 please and provide output

LEDE:~# lsmod | grep short
    shortcut_fe            51225  1 fast_classifier
    shortcut_fe_ipv6       52249  1 fast_classifier

How do I proceed ? I have to recompile ?

Add this on top of my patch https://github.com/dissent1/r7800/commit/e1d07e6fd2ef6def1f87aa06a78ae50d649192a7

What's your device and show your diffconfig please. k4.4 or k4.9? Are you using version of the patch from PR?

run
cat /sys/sfe_ipv6/debug_dev

mknod /dev/sfe_ipv6 c value_from_debug_dev 0

You'll get sfe_ipv6 device

root@LEDE:~# cat /sys/sfe_ipv6/debug_dev
252
root@LEDE:~# mknod /dev/sfe_ipv6 c 252 0
root@LEDE:~# cat /dev/sfe_ipv6
<sfe_ipv6>
        <connections>
        </connections>
        <exceptions>
                <exception name="UDP_NO_CONNECTION" count="721" />
                <exception name="TCP_NO_CONNECTION_SLOW_FLAGS" count="122" />
                <exception name="TCP_NO_CONNECTION_FAST_FLAGS" count="46649" />
                <exception name="ICMP_UNHANDLED_TYPE" count="55" />
                <exception name="UNHANDLED_PROTOCOL" count="756" />
        </exceptions>
        <stats num_connections="0" pkts_forwarded="0" pkts_not_forwarded="48306" create_requests="0" create_collisions="0" destroy_requests="143" destroy_misses="143" flushes="0" hash_hits="0" hash_reorders="0" />
</sfe_ipv6>

For ipv6, "connections" tag is always empty. I'll try the debug firmware today.

1 Like

Connection tag shows only currently offloaded connections. If connection is closed the tag is cleared.
Could you post these statistics again but with 'echo 1 > /sys/fast_classifier/skip_to_bridge_ingress'
And repeat the test.

Certainly, I noticed that, it works for ipv4 during speedtest. Not with ipv6.

root@LEDE:~# echo 1 > /sys/fast_classifier/skip_to_bridge_ingress
root@LEDE:~# cat /dev/sfe_ipv6
<sfe_ipv6>
        <connections>
        </connections>
        <exceptions>
                <exception name="UDP_NO_CONNECTION" count="2562" />
                <exception name="TCP_NO_CONNECTION_SLOW_FLAGS" count="824" />
                <exception name="TCP_NO_CONNECTION_FAST_FLAGS" count="1320749" />
                <exception name="ICMP_UNHANDLED_TYPE" count="553" />
                <exception name="UNHANDLED_PROTOCOL" count="1702899" />
        </exceptions>
        <stats num_connections="0" pkts_forwarded="0" pkts_not_forwarded="3027811" create_requests="0" create_collisions="0" destroy_requests="1159" destroy_misses="1159" flushes="0" hash_hits="0" hash_reorders="0" />

Same behavior. I did the test during an ipv6 speedtest.

@gwlim
last update to lede 17.01 (LEDE Reboot 17.01-SNAPSHOT r3487-48798af / LuCI lede-17.01 branch ( Trunk ) and add to firmware luci-app-nlbwmon)) and last update your FP https://github.com/gwlim/mips74k-ar71xx-lede-patch/commit/d72dd7344011e38099bda70a827c20cf65a27a97 (WNDR4300 = only relayd = automatic disable all ipv6 rule to firewall and manually disable support ipv6 in firmware to some other config file) and:

(...)
Mon Aug  7 10:40:33 2017 user.notice firewall: Reloading firewall due to ifup of wwan (wlan1)
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.628673] 
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.628673] do_page_fault(): sending SIGSEGV to nlbwmon for invalid write access to 00000000
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.637289] epc = 771a0c64 in libc.so[77180000+a0000]
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.642456] ra  = 564a91a8 in nlbwmon[564a4000+a000]
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.647550] 
Mon Aug  7 10:40:33 2017 user.notice root: starting ntpclient
(...)
Mon Aug  7 11:28:33 2017 daemon.err uhttpd[1236]: Error while processing command: Bad file descriptor
Mon Aug  7 11:28:34 2017 daemon.err uhttpd[1236]: Error while processing command: Bad file descriptor
(...)

no any color grafic/statistic in luci-app-nlbwmon

Did you install the ipk as an addon?
Is that ipk installable on lede stable?
Is that ipk part of lede?
One of my patch enable minify luci src option try disabling that then compile.
I will try when I have the time

Could anyone that uses sqm try this patch and provide feedback?

BTW it seems that sfe does not support routed packets (case of native ipv6) but only NATed.

no any change (disable minifi luci src from "make menuconfig"; compile firmware with luci-app-nlbwmon):

(...)
Mon Aug  7 13:42:19 2017 kern.info kernel: [   48.089858] 
Mon Aug  7 13:42:19 2017 kern.info kernel: [   48.089858] do_page_fault(): sending SIGSEGV to nlbwmon for invalid write access to 00000000
Mon Aug  7 13:42:19 2017 kern.info kernel: [   48.098470] epc = 7765ec64 in libc.so[7763e000+a0000]
Mon Aug  7 13:42:19 2017 kern.info kernel: [   48.103665] ra  = 55b3c1a8 in nlbwmon[55b37000+a000]
Mon Aug  7 13:42:19 2017 kern.info kernel: [   48.108744] 
(...)
Mon Aug  7 16:30:31 2017 daemon.err uhttpd[1486]: Error while processing command: Bad file descriptor
Mon Aug  7 16:30:32 2017 daemon.err uhttpd[1486]: Error while processing command: Bad file descriptor
Mon Aug  7 16:30:37 2017 daemon.err uhttpd[1486]: Error while processing command: Bad file descriptor
Mon Aug  7 16:30:37 2017 daemon.err uhttpd[1486]: Error while processing command: Bad file descriptor
Mon Aug  7 16:30:38 2017 daemon.err uhttpd[1486]: Error while processing command: Bad file descriptor
(...)

When disable autostart (/etc/init.d/nlbwmon disable && reboot && exit) problem does not exist - only if disable...practice not possible to using it without errors.
Of course, built according to your instructions at https://github.com/gwlim/mips74k-ar71xx-lede-patch minus patches https://github.com/gwlim/mips74k-ar71xx-lede-patch/blob/lede-17.01/patch/099-add-default-package.patch (I just have a WNDR4300 as a relayd relay, and most of these extra patches really messed me up the router and I do not really need it - config and add some manually in "make menuconfig") and now minus the patch https://github.com/gwlim/mips74k-ar71xx-lede-patch/blob/lede-17.01/patch/065-enable-luci-src-diet.patch (as I understood your advice), and plus a few external news apps/scripts that do not interfere in any way with your modifications/patches/scripts/etc. (my .config http://wklej.org/id/3231289/)
Generally problem still exist.

Right now I am compiling a new image. I'll answer you in a few hours.

@dissent1
At the first glance, this patch seems to return the "normal" SQM functionality for me. Great job.

I have used "flent" RRUL test for latency testing:

  • When I tested two days ago without this patch, Fastpath caused the latency under load to move from the normal 20ms to something like 50ms
  • With this patch the latency stays at the expected ~20ms. I tested with both simple/fq_codel and layer_cake/cake. Looks good to me.

Ps. You might have already noticed, but due to the kernel patch reorganisation, your main SFE patch does not compile any more. Patches need to be in pending-4.9 etc.

I've been trying for about 2 hours with a new image with your new patches, and voila! Finally the SQM ingress works fine, the latency stays stable 100 - 200 ms (My Internet Provider is via wireless). Tested with 5 devices connected at the same time.

PD: Move patches to pending-4.9 and pending-4.4, if not, build fail.

Thanks for pointing out, updated the commit in PR

How is the throughput with:

a) both SQM and SFE enabled
b) only SQM enabled

If I understand the patch correctly, having SQM enabled basically asks SFE to not do anything with the packet, but the throughput performance can still be better by freeing up cpu resources used on other interfaces that doesn't have SQM enabled.

If your ISP bandwidth is a limiting factor, then you probably can enable SQM on lan interface to test this out, assuming that your router isn't powerful enough to max out 1gbps with SQM on in any case...

Thanks.

1 Like

Anyone with dir-860l (b1) can run a iperf3 test WAN->LAN? I don't have 2 gigabit devices at the moment.
You can find images here.

Is this image based on master or stable ? I can dot the tests with dir-860l but I need master for vlan support.
By the way, the dir-860l already performed 1Gbpts WAN-> LAN without SFE.

It's from master.

@adrian_dsl : It did a quick test on my "best effort" 1gbps ftth connection, at this time of the day, the max throughput is 550Mbps with your image (like my previous master image wihtout sfe).
I checked sirq % usage during test, it's really better: 30% (vs 49% with my previous image). I'll perform a new test this night, throughput should be close to 1Gbps.