MT7621 HW NAT Offloading broken

Works for me on 18.06.8

1 Like

I think 18.06.x doesn't need the patch. Only in 19.07.x and master.

I tested myself in 18.06.8 just now by running a speedtest and viewing the output of the top command while connected to the router in SSH, it seems every time I run a speedtest the "sirq" usage goes to 20% or so and idle goes to 80% or so, is this intended behavior when hardware flow offloading is on?

Edit: Hardware flow offloading seems to be broken in 18.06.8. When I downgrade to 18.06.2 and run a speedtest the CPU runs at 97-98% idle, as expected, instead of before where it would use 20% of my CPU when I ran a speed test.

1 Like

I tested with 18.06.5, all the packets are processed by CPU, hardware flow offloading doesn't work even if you check it on. Right now I'm on 18.06.2 and it's working though, not sure if there's any newer version that it works on between 18.06.2 and 18.06.5

Interestingly. I thought that HW NAT worked on all 18.06.x. On 18.06.4 i think it worked, but i'm not sure.

1 Like

It seems I made a mistake. Today I noticed even on 18.06.2, hardware offloading suddenly stopped working for me when it was working a few days ago. Then I realized that NAT6 was for some reason causing hardware offloading to stop working. I reflashed the latest 18.06.x (18.06.8) and now my hardware offloading is working flawlessly. If anyone is having the same problem as me and uses NAT6, try turning it off.

1 Like

HW NAT i think not work fine with ipv6

Yeah it seems to be broken so I turned it off and now HWNAT is working great

A few hours later, even with no NAT6 installed this time, it seems to have reverted back to Software NAT

Finally the patch seems to be this:

Although i have not tried it yet. It was added on June 1 to the branch 19.07 and is included in the new release 19.07.4.

1 Like

I have 19.07.4 installed now. I am seeing hardly any CPU usage (~2%) on a download speedtest (@ 500 mbit/s), but I do see a rather high load during upload speed test (roughly ~50% CPU load @ 500 mbit/s).

I am using a PPPoE connection in case that matters. Anyone with similar results? Previously (before HW offload even became broken) I had very little CPU usage % in both directions. Anyone seeing similar results?

@nbd Is it possible HW NAT offloading is still broken in one direction?

In theory it should be fixed in both directions even with PPPoE. I think it does not work well with IPv6.

Weird. Now the upload direction is offloaded as well. Not sure what's different. I will keep an eye on it and see if the bug returns, and if so, what seems to trigger it.

Hardware NAT now seems to be working in master with the DSA driver as well!;a=commit;h=4fb58813f94ac6cc8167138e23a92189fe50b258

1 Like

You had more troubles with the HW NAT on 19.07.4?

Nice! Might be time for me to take the plunge and migrate the Edgerouter-X home gateway to master on a free weekend day, whenever those happen LOL....

A little off topic, but it also looked like netifd has been updated to process VLAN set up input in the network config file for DSA, which is the last thing I was waiting to see working to make the switch.;a=commit;h=96586ad8cabee6b697a8269b3a9274e138334f9e

No luci DSA switch/VLAN support yet though, so I'll have to learn how to set up my VLANs again the old fashioned way. I see lots of trial and error in my future :wink:

No, no issues on 19.07.4 with hardware flow offloading. Just very excited to see it land in master as well, since it was unsure we would be seeing hardware offloading ever again with the new DSA driver. :slight_smile:

1 Like

Hi guys, I'm searching this forum for answers as I installed latest snapshot on DIR-882 which is an MT7621 device and HW offloading doesn't seem to work. Disclaimer: although I used OpenWrt in the past, many years ago, I'm not familiar with nowadays stuff.

The snapshot was pretty empty (not even LUCI), I just installed LUCI, went to UI and enabled SW offloading, the download performance improved about 60%, checked also HW offloading but doesn't change a thing. I don't even know where and how to debug this. The router limits at 400mbit download speed although direct connection yields about 800-900mbit and I see that during test, one of the router's CPU cores is 100% IRQ busy in htop.

Shouldn't the latest snapshot for this router work? How to investigate next?

The patch I linked to is for the Mediatek arch and not the ramips arch (my bad). This means that for mt7621 devices hardware flow offloading does not work with the DSA driver that is used in the master branch.


@Mushoz Thanks for this info. Then, what can one do? Is there a DSA driver alternative that works with HW offloading?