Netfilter "Flow offload" / HW NAT

Unfortunately, PPPoE connections cannot be bridged. Hence I was unable to set this up the way I wanted it to :frowning: Maybe it's possible somehow, but I couldn't get it to work. I did manage to kill my network multiple times xD

Could this be combined with HW QoS? The SoC has this feature as well and it seems that this would be at least something instead of SQM.

I didn’t take a look at the inner workings of hw flow offload yet, but I suppose it’s much easier then to integrate a full SQM implementation

Could also be very interesting, but probably a lot more work. I know my Dir-860l can shape at 600-700 mbit without PPPoE (by running iperf from a client on the LAN port to a second client on the WAN port), but with PPPoE it's stuck at around 350-400. Being able to offload PPPoE should be sufficient to bring this number up to 600-700 and possibly even more if the rest can be software offloaded, since the 600-700 figure was without any flow offloading. The software flow offloading should be compatible with SQM.

So as long as things aren't too intertwined, it should be possible to only offload PPPoE and make sure the packets still go through the q-disc.

I have the same problem. It seems the mtu/mss related problem.

has this patch fixed it? unfortunately, not for me.

Did you try mss clamping?

Does any one has the connection leak problem?
My router (Youhua WR1200JS, mt7621+mt7603e+mt7612e) running on OpenWrt 18.06 branch and has many active connections after enabled flow offloading (software or hardware).
After running several days, the active connections reach to 99%, and I have to reboot my router.
My router running these services below:

  1. Shadowsocks
  2. DDNS
  3. IPTV with vlan
  4. dnsmasq-full with customized configure file in 'conf-dir'

Yes, this issue has been mentioned by several people now. It happens both with regular and hw flow offloading. @nbd is there anything we can provide to help debug this issue?

I just upped maximum to 90000 and it stays around 55000, I see no impact on performance (using hw offload)

Please check if running this before starting connections helps with the connection leak problem:
sysctl -w net.netfilter.nf_conntrack_tcp_no_window_check=0

Thank you @nbd, I tried

sysctl -w net.netfilter.nf_conntrack_tcp_no_window_check=0

and my shadowsocks service was abnormal and no help with the leaking problem.

Today I recompiled my router's firmware. Before compiling, I did a

make dirclean

then the active connections seem no leaking problem, but I think I need more time to test it.
After one night, the connections reached to 5k+. :disappointed:

I've pushed a fix, please update and try again (without the sysctl command)


I will compile & test this new commit tomorrow. Thank you very much for your work :slight_smile:

Compiled a new build with your fixes and currently testing it with hw flow offload enabled

@nbd, thanks. I'll cherry pick this commit to openwrt-18.06 branch and test it.

@nbd, this commit seems not fix the leak problem. After 1 hour, the active connections reached to 1000+.
Most of connections are UDP for dns resolve.

I not have anything problem with leak connections, even after 4 or 5 hours... with and without nbd commit.

I also haven't any problems with connection leaks, but i currently use a build with kernel 4.14.43 because i don't know if both wifi cards will work if i updaten to a recent build.

My only problem is related with many "Connection Reset" error, but I have this problem for months, and not is related Flow Offload..

@sotux, please show me the output of cat /proc/net/nf_conntrack when it has accumulated a large number of connections

1 Like