Mediatek mt7622 hardware flow offloading

I wanted to play with SQM on AX3200 (Mediatek mt7622) so I disabled hardware flow offloading and WED, installed luci-app-sqm, rebooted router and found out that cat /sys/kernel/debug/ppe0/entries output isn't empy. Even more, I reset firmware (with followed reboot of course) and output wasn't empty, it was containing entries with IP addresses from previous session (the router was not even connected to Internet). Plugging power off helped resetting ppe0 table but still it wasn't empty...

What do I miss? How do I disable hardware flow offloading completely?

dsa quickpaths.

So, is it OK to have entries from previous session even after reboot/reset?

Uninitiaalized memory maybe. I confirm they are there all the time.

Should I report it somewhere?

Dont know where but useless state tracking and keeping it over reboot is useless at best.

I'm only seeing unbind (UNB) entries.

Doesn't matter what. There should be nothing after reboot (let alone reset).

2 Likes

Just to confirm, you turned off both software and hardware flow offloading before enabling SQM, right?

It seems that both need to be turned off for the SQM to work properly and not to have any PPE entries

I tried resetting the router let alone playing with settings.

Interesting, so even after full settings reset and reboot, the PPE still keeps the entries?

It does indeed sounds like it might be a firmware issue. Is it possible perhaps to have something to do with the way how a boot repartition is required before upgrade to 24.10 on this specific device?

Anyway, I can't seem to reproduce the issue on AX3200 on OpenWrt 23.05.5

I can reproduce on RT-AX54 7621 - enable hw offload disable hw offload reboot - and the entries stay over reboot.

They are changing. (mt7981)

1 Like

Yep, entries survive system's reboot and reset. So looks like some HW initialization problem. I tried to reproduce it 3 times and noticed similar problem with MT7915E wireless when WED is enabled. Whenever I disable previously enabled WED and reboot the system I get non-functioning 5GHz wireless. Powering off completely helped to solve the problem.

1 Like

So on 23.05.5 your cat /sys/kernel/debug/ppe0/entries output is empty if firewall.@defaults[0].flow_offloading set '1' or '0' and firewall.@defaults[0].flow_offloading_hw is '0'. Am I correct?

It's good that you've pointed this out.

The way I was testing whether offloading works is with:
cat /sys/kernel/debug/ppe0/bind

In order to have it show empty, it needs to:

  • Have Software Offload turned off firewall.@defaults[0].flow_offloading='0'
  • Have Hardware Offload turned off firewall.@defaults[0].flow_offloading_hw='0'
  • Have WED Wireless Ethernet Dispatch turned off (cat /sys/module/mt7915e/parameters/wed_enable should show N)

When all of the above are off, the entries seems to be empty also:
cat /sys/kernel/debug/ppe0/entries

I did notice that ppe0 entries linger for a while after turning off hardware offload (without restart), but the bind (cat /sys/kernel/debug/ppe0/bind) shows the empty results right away.

If I need to check anything else, please feel free to let me know.