Hardware NAT For LEDE

#24

Fixed the 2 patches

0 Likes

#25

How would I go about adding dependencies, I'm trying to follow instructions on stackoverflow with similar problems and can't find a clue

This is for building kmod-qca-ssdk-nohnat for my WDR3600 and WNDR3700V4 Router. Building kmod-qca-ssdk-hnat runs into no issues btw

chmod 0755 /home/user/source/build_dir/target-mips_74kc+dsp2_musl-1.1.15/linux-ar71xx_nand/qca-ssdk-g37060c2/ipkg-mips_74kc_dsp2/kmod-qca-ssdk-nohnat/CONTROL/postinst-pkg; fi
find /home/user/source/build_dir/target-mips_74kc+dsp2_musl-1.1.15/linux-ar71xx_nand/qca-ssdk-g37060c2/ipkg-mips_74kc_dsp2/kmod-qca-ssdk-nohnat -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package kmod-qca-ssdk-nohnat is missing dependencies for the following libraries:
nf_conntrack.ko
ppp_generic.ko
Makefile:133: recipe for target '/home/user/source/bin/targets/ar71xx/nand/packages/kmod-qca-ssdk-nohnat_4.4.44+g37060c2-1_mips_74kc_dsp2.ipk' failed
make[3]: *** [/home/user/source/bin/targets/ar71xx/nand/packages/kmod-qca-ssdk-nohnat_4.4.44+g37060c2-1_mips_74kc_dsp2.ipk] Error 1
make[3]: Leaving directory '/home/user/source/package/ssdk/qca-ssdk'
package/Makefile:105: recipe for target 'package/ssdk/qca-ssdk/compile' failed
make[2]: *** [package/ssdk/qca-ssdk/compile] Error 2
make[2]: Leaving directory '/home/user/source'
package/Makefile:101: recipe for target '/home/user/source/staging_dir/target-mips_74kc+dsp2_musl-1.1.15/stamp/.package_compile' failed
make[1]: *** [/home/user/source/staging_dir/target-mips_74kc+dsp2_musl-1.1.15/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/user/source'
/home/user/source/include/toplevel.mk:197: recipe for target 'world' failed
make: *** [world] Error 2
0 Likes

#26

The nf_conntrack.ko module is provided by kmod-nf-conntrack and ppp_generic.ko is provided by kmod-ppp.

Add DEPENDS := kmod-nf-conntrack kmod-ppp to your define KernelPackage and the dependency errors should disappear.

0 Likes

#27

Fixed nohnat using jow's advice. Thanks
More importantly integration with LEDE is needed

0 Likes

#28

Document Syntax Examples

0 Likes

#29

Works ty!

This would be awesome!

EDIT: I had a quick test with kmod-qca-ssdk-nohnat and after a few minutes after boots the wireless AP would completely disappear, LEDs for both 2.4 and 5ghz remained on. Doing a power cycle recovers AP momentarily but disappears again. I didnt look too much into the logs but it might be because my setup is Client+AP. I'm going back to my old config for now and may do more testing later.

EDIT: Solved below

0 Likes

Netfilter "Flow offload" / HW NAT
#30

Hardware NAT is probably not related to that. You might be looking at bug #432.

0 Likes

#31

I'll attempt to remove the patches from your link and do further testing

EDIT: Solved below

0 Likes

#32

Don't remove anything manually, use git revert with the commit hash to undo the commit.

Best practice is creating a local branch so next time you pull updates for master there are no conflicts:

$ git branch test
$ git checkout test
$ git revert $commit_hash

If you want to continue using the branch with updated sources, do:

$ git checkout master
$ git pull
$ git checkout test
$ git rebase master

Once things are fixed you can delete your local branch and resume building from master.

0 Likes

#33

Thank you for the heads up, I actually removed patches #354-357 to test and the wireless went back to normal! To note, this also includes the kmod-qca-ssdk-nohnat which is awesome

Referencing:

0 Likes

#34

Sorry, my advice was meant for just rolling back and continue building. If you want to help testing, obviously nbd's procedure is the way to go.

0 Likes

#35

Oh no, your comment was perfectly fine, I just had no idea how to roll back initially and wanted to find a quick fix

Thank you, much appreciated

0 Likes

#36

But LEDE is already no hwnat why would you still want no hwnat?

0 Likes

#37

just for the sake of stability and performance comparison :slight_smile:

0 Likes

#38

Yea I understand where you are coming from but even so I believe it is still using LEDE Default NAT

0 Likes

#39

Oh hmmm, so the following log doesn't really tell me much? is there a way to check?

Thu Jan 26 09:16:59 2017 kern.warn kernel: [   11.149241] ssdk_plat_init start
Thu Jan 26 09:16:59 2017 kern.warn kernel: [   11.152857] Register QCA PHY driver
Thu Jan 26 09:16:59 2017 kern.warn kernel: [   11.158000] PHY ID is 0x4dd034
Thu Jan 26 09:16:59 2017 kern.warn kernel: [   11.225509] qca probe f1 phy driver succeeded!
Thu Jan 26 09:16:59 2017 kern.warn kernel: [   11.230035] qca-ssdk module init succeeded!
Thu Jan 26 09:16:59 2017 kern.info kernel: [   11.237959] tun: Universal TUN/TAP device driver, 1.6
0 Likes

#40

You misunderstood porting the 2 package over doesn't automatically enable NAT.
Rather you need to modify the switch registers to activate HW NaT
Previously there is no way because LEDE switch driver does not have the driver function but now you can with QCA SSDK
You can use ssdk_h shell to key in commands to configure the switch HWNAT.
Look at the PDFs in the repo
This is going to be the bulk of work getting it usable

0 Likes

#41

My issue here is ssdk shell is poorly documented with very terse examples so I am still find out the commands you need to key into ssdk shell to activate a basic NAT

0 Likes

#42

Ahhh I see, I'll definitely take a deeper look into it: Currently looking at these files for clues https://github.com/paul-chambers/netgear-r7800/search?utf8=✓&q=ssdk_sh&type=Code more specifically enet.sh

Also: https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fblog.csdn.net%2Fdreamflyliwei9%2Farticle%2Fdetails%2F46352807

0 Likes

#43

Are things still smooth on your end? I'm also experiencing mediocre WiFi, making the AP's rate go as low as ~6 Mbps. On WNDR3800 LEDE r3186.

0 Likes