Qualcomm Fast Path For LEDE

Now it looks like true.
In my environment inserting sfe-cm back again stops fast-classifier counters completely. But that maybe kernel, architecture or cpu speed dependent, because fast-classifier has some additional checks, so maybe sfe-cm for me reacts a small bit faster and grabs the connection first.

Apart from that sfe-cm doesn't set "offloaded" mark that dev.c parses to take a turnover (check the corresponding patch to enable SFE).

Thanks for the explanation!

What does this part mean? What is 128 pkts? (I saw that it can be modded by adjusting /sys/fast_classifier/offload_at_pkts)

About my values: I actually rrmod shortcut-fe-cm, after 4 hours the values look like this:

[ root: ~ ]# cat /sys/fast_classifier/debug_info
size=4 offload=0 offload_no_match=0 offloaded=0 done=0 offloaded_fail=11 done_fail=9
o=1, p=17 [xx::xx:xx:xx:xx]:192.168.xx.xx:xxxxx xxx.xxx.xxx.xxx:xxx:[00:00:00:00:00:00] m=00000000 h=27029788

Please note that: only 1 laptop is active that uses VPN via UPD (!). During the evening I'll try it out with the other one (disabling VPN on it) and take a look at these values.

lsmod output looks like this after removing shortcut-fe-cm:

[ root: ~ ]# lsmod | grep fast
fast_classifier        44768  0
nf_conntrack           51056 30 fast_classifier,nf_nat_pptp,nf_nat_ipv4,nf_nat_amanda,nf_conntrack_pptp,nf_conntrack_ipv6,nf_conntrack_ipv4,nf_conntrack_amanda,xt_state,xt_helper,xt_conntrack,xt_connmark,xt_connlimit,xt_connbytes,nf_nat_tftp,nf_nat_snmp_basic,nf_nat_sip,nf_nat_masquerade_ipv4,nf_nat_irc,nf_nat_h323,nf_nat,nf_conntrack_tftp,nf_conntrack_snmp,nf_conntrack_sip,nf_conntrack_rtcache,nf_conntrack_proto_gre,nf_conntrack_irc,nf_conntrack_h323,nf_conntrack_broadcast,sch_cake
shortcut_fe            51408  1 fast_classifier
shortcut_fe_ipv6       52560  1 fast_classifier

Is it possible to build for Kirkwood target (Linksys viper) using your patches?

You could upload an image for the x86 architecture. I've been trying to compile for this architecture for 3 days, but it ends up failing.

Yes if it would be possible upstream I and benefit more instead of relying on custom build. All the better.

The codes are GPL and can be forked, right?

I have cloned your repository and copied patches for kernel 4.9 (950, 951, 952), but patch 952 throws an error when compiling, at least Linux version 4.9.37. Any ideas?

I have an updated cleaned out version which I'll post in a couple of hours, I've been doing some tuning for compilation process

Okay. I am anxious to prove the result. I have been sleeping very little for 3 days, because I really want to try this feature in my environment.

Best Regards, David.

For k4.9. You should pick only kmod-fast-classifier under kernel modules - network support in menuconfig.
https://github.com/dissent1/r7800/commit/6e2637f7199526bdcc2ad7acb2aea6935e7a5ff2

1 Like

This is my data without VPN (shortcut-fe-cm removed):

[ root: ~ ]# cat /sys/fast_classifier/debug_info
size=1279 offload=0 offload_no_match=0 offloaded=0 done=0 offloaded_fail=327 done_fail=250

Yes, the counters are raising.

But that's interesting: what happens with VPN connection from inside LAN? I thought it should be handled by FP as well.

It is, check the last value h=27029788, it's the number of packets that has came through a specific connection. VPN operates through a single connection to vpn server, that's why there's so low offloaded counter.

Btw you have a size of 1279, does it tend to decrease eventually or you have so many devices that open so many connections? Because if not then it's a broken compilation with some config symbols not applied while compiling.

Hi @musashino
The wireless driver for BCM4331 works well on LEDE ?

locossaurorex please start a dedicated thread for your enquiry about BCM4331, it has absolutely nothing to do with Qualcomm fast path.

@slh OK sorry, I will try build for wzr-1750dhp that uses this driver.

No. The BCM4331 is recognized by the system with LEDE, but drivers are not compatible with the 5GHz band, and the radio waves in the 2.4GHz band are weak and unstable.

[   15.204315] b43-phy0: Broadcom 4331 WLAN found (core revision 29)
[   15.210520] bcma: bus1: Switched to core: 0x812
[   15.220240] b43-phy0: Found PHY: Analog 9, Type 7 (HT), Revision 1
[   15.226408] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1
[   15.233799] b43-phy0 warning: 5 GHz band is unsupported on this PHY
[   15.240039] b43-phy0 ERROR: b43 can't support any band on this device
[   15.246499] b43: probe of bcma1:1 failed with error -95
[   15.251792] b43-phy1: Broadcom 4331 WLAN found (core revision 29)
[   15.257861] bcma: bus2: Switched to core: 0x812
[   15.260217] b43-phy1: Found PHY: Analog 9, Type 7 (HT), Revision 1
[   15.266383] b43-phy1: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1
[   15.280347] Broadcom 43xx driver loaded [ Features: NL ]
1 Like

OK Thank you !

Would you please provide patches for kernel 4.4. My router is on SoC AR9344, which has only kernel 4.4 for now.

Hi, I have managed to compile without any errors. But in my environment the file: /sys/fast_classifier/debug_info, not exist.

Running the lsmod | grep fast-classifier command does not display anything at all. Running lsmod | grep shortcut_fe displays the following:

shortcut_fe 81201 0
shortcut_fe_ipv6 81969 0

I think the fast-classifier module is not loaded into the kernel.

If I run modprobe fast-classifier this is the message:

1 module could not be probed

  • fast-classifier

    As is logical, if I deal with rmmod fast-classifier the message is:

    Module is not loaded.

    Anyway, thanks for your work.

What's in the log? grep for 'fast-classifier'
And what version of compiler are you using?
Have you ran make clean before compiling if you are using your current buildroot?
Do you have kmod-shortcut-fe-cm unchecked? Compiler/kernel support me that fast-classifier and sfe-cm cannot co-exist, so when compiled within 1 source package both modules can't be loaded at once. Maybe for your soc arch/compiler version it shouldn't be even compiled together.

"logread | grep fast-classifier" shows absolutely nothing. Instead "dmesg | grep fast-classifier" shows:

[71.134923] fast-classifier: starting up
[71.641250] fast-classifier: starting up
[72.111331] fast-classifier: starting up
[72.591220] fast-classifier: starting up
[73.011121] fast-classifier: starting up
[73.381307] kmodloader: - fast-classifier - 0

Before compiling I always run "make dirclean". Follow your instructions and just leave selected kmod-fast-classifier.