Hardware NAT For LEDE

ar71xx is still on kernel 4.9, while you require kernel >= 4.14 (4.16 in mainline) for flowoffload support. (ar71xx will probably remain on kernel 4.9, until ath79 takes over).

2 Likes

Hi @nbd

On Octeon soc, does flow offload can accel to normal routing (LAN-LAN routing, not NAT routing) ? or just accel to NAT routing ?

Flow offload handles normal routing as well.
By the way, there is no need to manually mess with iptables rules anymore.
Just set option flow_offloading 1 in defaults in /etc/config/firewall
On MT7621 you can additionally set option flow_offloading_hw 1 to enable hardware offloading. This will not work with SQM though.

3 Likes

Once more question.
If i'm enable flow offload & sqm same time, what things is affected ? ex: sqm performance will decrease, flow-offload perf decrease ? ..etc..

1 Like

As far as I know, sqm doesn't work AT ALL with flow offload. The packets don't go through the linux qdiscs etc it just sidesteps everything. Someone please correct me if I'm wrong.

Software offload does not bypass linux qdisc. It only bypasses the CPU intensive iptables rule processing.

Also with QoS scripts?
Many thanks

SQM and QoS does work with flow offloading but not with hw flow offloading!

hw flow offloading is currently only supported for mt7621.

1 Like

A bit late but i just wanted to tell you that its working now in the latest version.

Shaping with hw offloading?

latest version of what?

My message was a reply to nbds comment above asking me for a packet dump.
Its not related to SQM at all. (Im blaming discourse for the bad visibility of that fact)

On a sidenote sqm and hw offloading together will not work as long as the sqm stuff is not done by the offloading hardware itself (so probably never.)

And im using the latest version that is available on the master branch of openwrt aka lede.

Just making sure: is there any kmod package I should be selecting, or is flowoffload baked inside the base code? (or another package I'm not aware of)
I'm trying to replace NSS stack with this as a best option given that I'm not a programmer and can't port the R7800 version of the NSS stack to my device.

All tagets with >= 4.14 Kernel have offloading included.
You only have to set option flow_offloading 1 in firewall default config section.

1 Like

I'm trying to compile this feature in the the openwrt-18 snapshot. Does it need both of these kernel modules enabled?

kmod-ipt-offload
kmod-nft-offload

The ipt module is for iptables, the nft module is for nftables. Use the module for whatever firewall you are using. Lede uses iptables by default.

Is there a way to confirm offloading is running?

Who can help me to make right dts for this router Lava lr25g001 support (mt7620a+mt7610e+qca/ar8327), now work only 1.2.5port on qca8337 switch

Does Witi-mt7621 board has openwrt hardware nat support?
I use openwrt v18.06.0-rc1 from github.
In /etc/config/firewall at default section strings added are:
option flow_offloading 1
option flow_offloading_hw 1
kmod-ipt-offload compiled.
But I see 100% CPU utilization and network bandwidth is 4,8 Mb/sec at packets forwarding.

In /etc/config/firewall at default section strings added are:

You should enable flowoffloading in Network -> Firewall.
Modifying /etc/config files requires a reboot to apply changes.