treewide: support hardware flow offloading
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 14 Oct 2021 18:50:41 +0000 (20:50 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 6 Jan 2022 12:49:06 +0000 (14:49 +0200)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
root/usr/share/firewall4/templates/ruleset.uc
root/usr/share/ucode/fw4.uc

index 9c69aec2351b7640a8f0f023b71d44e6c1d483dd..e392ada76429f7a2b2652d5963373d57d0037f9f 100644 (file)
@@ -10,6 +10,9 @@ table inet fw4 {
        flowtable ft {
                hook ingress priority 0;
                devices = {{ fw4.set(devices, true) }};
+{% if (fw4.default_option("flow_offloading_hw")): %}
+               flags offload;
+{% endif %}
        }
 
 {% endif %}
index 3469b502c02cd49abd2945930c6dfc9a29114e00..7d20871e41c0165c206aa7196b55d89c4d9c0e82 100644 (file)
@@ -1639,7 +1639,7 @@ return {
                        custom_chains: [ "bool", null, UNSUPPORTED ],
                        disable_ipv6: [ "bool", null, UNSUPPORTED ],
                        flow_offloading: [ "bool", "0" ],
-                       flow_offloading_hw: [ "bool", null, UNSUPPORTED ]
+                       flow_offloading_hw: [ "bool", "0" ]
                });
 
                if (defs === false) {