Flow_offloading_hw=1 not working on latest trunk

I have an mt7621 based router and before i used to add

flow_offloading=1
flow_offloading_hw=1

to /etc/config/firewall

and have hw offloading, this stopped working on the latest builds.

Any pointers?

1 Like

How did you verify that it is not working? We need some more specifics in order to debug this :slight_smile: Also, reporting this to Flyspray might increase the chance of @nbd seeing the bug report (one of the authors of the HW flow offloading patch).

before when using
flow_offloading=1
flow_offloading_hw=1

cpu load used to be <5% accross all cores when pushing 250mb and SQM would not work.. now sqm is working and cpu load is >50% (even if i disable sqm manually)

What logs / test shall i perform ?

What is the exact config that you are trying in /etc/config ?

"flow_offloading_hw=1" is not even in /etc/config format, so I assume that your actual config item is different.

And are you sure that you have installed the offloading kmods? I think that some are needed, at least kmod-ipt-offload.

flow_offloading=1
flow_offloading_hw=1

in /etc/config/firewall

the kmods are included in my build.. will try step back through builds to see which is the last one working..

The needed kmod modules are included by default on mt7621 iirc. The offloading can be turned on by including them in the firewall config file.

Like I said above, that looks quite wrong. that is not in the format that uci config parses understands in /etc/config/firewall

I think that it should be:

option flow_offloading 1
option flow_offloading_hw 1
1 Like

Yes apologies here is extract from actual file

config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option flow_offloading '1'
option flow_offloading_hw '1'

I can confirm this.
With the latest snapshot downloading through my Xiaomi Mi 3G on full bandwidth on my 1000/200 fiber PPPoE connection causes insane loads and doesn't even able to handle the full bandwidth, maxes out at around 800mbps.
I had a snapshot from May 10th before and it was working great without any significant load even on full bandwidth.

The worst part is I can't seem to be able to downgrade to my previous image using sysupgrade. It reboots the router without any error message, but fails to flash the image.
I solved this by manually flashing with mtd.

Rolling back to my image from the 10th of May solved the problem, I'm having practically 0 CPU load even when using 1gbps bandwidth.

Can you use a git bisect to find out which commit broke the functionality?

I might be able to do it later, but it won't be easy because I'm using this router on my internet connection and I don't have a spare one.

This patch is the culprit
https://github.com/openwrt/openwrt/commit/a3096b4b33dcc5fcc07b229346ef337aa5962019.patch

If i revert it HW offload works fine again

I opened bug report https://bugs.openwrt.org/index.php?do=details&task_id=1551

1 Like

Fixed in the latest version, thanks for reporting.

5 Likes

Yes thanks, Confirmed works fine now. Thanks for your great work.