I've got a problem with enabling the software offloading on the first boot in my custom build. I was reading that UCI goes in files/etc/uci-defaults/99-custom to be run last in the setup. I can confirm the files are getting in the build because I can see them in /rom/.
My 99-customs files looks like this.
uci set firewall.@defaults[0].flow_offloading=1 uci set network.globals.packet_steering=1 uci set irqbalance.irqbalance.enabled=1 uci commit
However, SFO not activated but In the CLI if I run uci set firewall.@defaults[0].flow_offloading=0 and commit/restart network
and then do the enable uci set firewall.@defaults[0].flow_offloading=1
commit/restart network network it will activate.
I thought just committing it and then rebooting might solve it, but it didn't.
Well, I'm new to this and trying to follow what I thought would be the standard way of getting this done. I still would like to know why it will not run on first boot... maybe it's too early and the firewall isn't configured yet?
Let me rephrase this.. the command runs and set's it as (1) and when you do a UCI get firewall.@defaults[0].flow_offloading
It replies back with (1). What it's not doing actually setting the firewall rules that go along with that option.
uci-defaults runs early boot... around the same time or a little later than majority of network cards being brought up... all of this is possibly leading to procd service firewall headbutting...
applying this uci setting is conditional on a firewall restart (AFAIR)... if you attempt this while procd is also doing the same, you will likely run into the issues described above...
This build was for the Mikrotik hAP AC2 and what I did differently than the mainline build is below.
irbalance compiled in by default.
rc.local set the cpu governor to performance.
Enabled packet steering
Enabled irqbalance
Enabled software offloading
Performance on the wire will now saturate the gigabit link at 940mbits using 6 streams in iperf3. System load was a 1.0 during the test. Watching top I think it was around %70 idle cpu.
My uci-defaults/99-custom
Enabeling packet steering
uci set network.globals.packet_steering=1
Enableing irq balancing to load up all the cores
uci set irqbalance.irqbalance.enabled=1
#Sleeping for 45 seconds to allow network and firewall to fully come up (sleep 45;)&