Qualcomm Fast Path For LEDE

wireguard has been moved from the packages feed to the main sources. That is the reason.

The funny thing here is that wireguard has nothing to do with the fastpath implementation.

But as gwlim's "fastpath" patches include tons of changes to things unrelated to fastpath itself, those things may break when there are external changes and the patches are not updated accordingly. (wireguard is currently at version 20171127 at both master and lede-17.01, and the gwlim 17.01 patch tries to change that to 20170629)

@dissent1 I found below , not sure if it is the patch files needed, if yes, hope to know the directory I am supposed to put in bb1407, thank you dissent! http://svn.dd-wrt.com/browser/src/linux/universal/linux-3.10/net/shortcut-fe?rev=32628&order=name

@chros how to apply the patch or run the right way on openwrt cc 15.05.1 ?

I don't know whether it's easily possible, I never did it. But it has problem with SQM and maybe other stuff as well.
Ask those who applied it recently.

dissent1 patchset also has problem with SQM at the moment?

Go down to the last 5-8 comments of this.

https://github.com/lede-project/source/pull/1269#issuecomment-343663001

As far as I can tell, fast path circumvents parts of the linux kernel stack that sqm-scripts require; so to me it looks like they are incompatible by design, at least on the same interface. I believe dissent1's patchset will disable fast path if there is a shaper active on the to be fast-pathed interface, so in that regard there is no problem, on the other hand linux traffic shaping and fast path seem mutually exclusive (functionally, if you manage to instantiate both on the same interface your shaper is only going to see thoose packets that are not handled by fast path).

2 Likes

I do a script .
I modified September Gwlim's script and it works well (only path 066-... not work). Checkout for kernel 4.4.87, actually is kernel 4.4.102 and not work.

git clone https://github.com/lede-project/s'ource.git lede

git clone -b lede-17.01 https://github.com/gwlim/mips74k-lede-patch.git temp;mv temp/patch/066-wireguard-update.patch temp/broken; mv temp/* lede/; rm -rf temp

cd lede

git checkout ab305e147ed7f950e8b34d0de23797c8dbb6a27f

./patch_LEDE.sh

make menuconfig

Works fine!

For using ext-root the modules necessary are (add at make menuconfig):

  • kmod-usb-uhci or kmod-usb-ohci only for USB 1.1 (Kernel modules -> USB support -> kmod-usb-uhci or kmod-usb-ohci)

  • kmod-usb2 for USB 2.0 EHCI (Kernel modules -> USB support -> kmod-usb2)

  • kmod-usb-storage (Kernel modules -> USB support -> kmod-usb-storage)

  • kmod-fs-ext4 (Kernel modules -> Filesystems -> kmod-fs-ext4)

  • kmod-fs-f2fs (recommended for usb flash. Kernel modules -> Filesystems -> kmod-fs-f2fs )

  • block-mount (Base system->block-mount)

  • kmod-scsi-core (Kernel modules -> Block device-> k-mod-scsi-core)
    Optional for compatibility Microsoft format are:

  • kmod-fs-msdos (Kernel modules -> Filesystems -> kmod-fs-msdos )

  • kmod-fs-ntfs (Kernel modules -> Filesystems -> kmod-fs-ntfs )

  • kmod-fs-vfat (Kernel modules -> Filesystems -> kmod-fs-vfat)

  • usbutils: USB devices listing utilities

1 Like

Optimizations for Samba and FTP Servers

Samba:
/etc/samba/smb.conf

add lines:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 SO_KEEPALIVE
use sendfile = no

FTP:
/etc/proftpd.conf
add lines:

SocketOptions rcvbuf 65536 sndbuf 65536
UseSendfile 90%

@dissent1 can this latest patch possibly be applied to openwrt trunk or cc15.05.1 ? tried to modify several times in order to patch cc15.05.1 but failed, but for latest openwrt trunk, even the kernel is same as the lede master, it still fails, don't know why.

Hi @gwlim
I was try build lede from your gwlim/mips74k-ar71xx-lede-patch,but failed

same build environment,build official lede1701 is ok

thanks

/home/jack/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/mips-openwrt-linux-musl/sys-include
checking for suffix of object files... configure: error: in /home/jack/lede/build_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/mips-openwrt-linux-musl/libgcc': configure: error: cannot compute suffix of object files: cannot compile Seeconfig.log' for more details.
Makefile:10906: recipe for target 'configure-target-libgcc' failed
make[4]: *** [configure-target-libgcc] Error 1
make[4]: Leaving directory '/home/jack/lede/build_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial'
Makefile:36: recipe for target '/home/jack/lede/build_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/.built' failed
make[3]: *** [/home/jack/lede/build_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/.built] Error 2
make[3]: Leaving directory '/home/jack/lede/toolchain/gcc/initial'
toolchain/Makefile:91: recipe for target 'toolchain/gcc/initial/compile' failed
make[2]: *** [toolchain/gcc/initial/compile] Error 2
make[2]: Leaving directory '/home/jack/lede'
toolchain/Makefile:89: recipe for target '/home/jack/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/stamp/.toolchain_install' failed
make[1]: *** [/home/jack/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/stamp/.toolchain_install] Error 2
make[1]: Leaving directory '/home/jack/lede'
/home/jack/lede/include/toplevel.mk:205: recipe for target 'world' failed

@nbd, @jow -- is this something that can be integrated into LEDE code sometime down the road, so this wouldn't custom require patching/compilation?

It seems Flow offload infrastructure is more likely to find its way into LEDE.

2 Likes

Would this work on Lantiq like https://wiki.openwrt.org/toh/bt/homehub_v5a ?

@jgvega After make menuconfig, what else needs to be selected besides the "Target System”, “Target Profile” ? Is the patch automatic selecting the right modules?

Hi.
Default Target is TL-WDR4300v1 in Gwlim's script.
You should change for your router model.

For example,I change TL-WRD3600v1 because it's my router model.

If you want to enable Fast Path select the fast path modules in

Kernel Modules > Network Support >

Select

kmod-fast-classifier

Save and exit.

To compile the image:

make V=s

@jgvega I have selected: Target System (Broadcom BCM47xx/53xx (ARM)), Target Profile (D-Link DIR-885L) and also selected kmod-fast-classifier plus a few more packages as in post 547, above. I am getting the bellow error. I am building on a Fedora 27 VM.

Error:
lede/build_dir/toolchain-arm_cortex-a9_gcc-6.3.0_musl-1.1.16_eabi/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|| xloc.file == '\0' || xloc.file[0] == '\xff'
^~~~
make[5]: *** [Makefile:1085: ubsan.o] Error 1
make[5]: Leaving directory

Just wondering if this is the correct patch for my configuration:

git clone -b lede-17.01 https://github.com/gwlim/mips74k-lede-patch.git temp;mv temp/patch/066-wireguard-update.patch temp/broken; mv temp/* lede/; rm -rf temp

so is sqm still broken with sfe?

Clarification, sqm is not broken with sfe, but both are functionally mutually exclusive; I believe @dissent1's patch will disable sfe if there is an active sqm instance on an interface, while @gwlim's patch set will give priority to sfe and effectively disable sqm (or rather sqm will only see those ~128 packets the are needed to trigger the fast pathing). I do not believe this will change any time soon.

2 Likes

Gwlim's script is not compatible for ARM. Only MIPS arquitecture.
Probe dissent1's script.