Software offload and PPPoE over DSL
I support a user who has a BT HomeHub 5a with a 80MBPS PPPoE VDSL2 connection on dsl.101. There was a patch a while back which made quite an improvement to speed -
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -2049,8 +2049,8 @@ return {
});
}
- if (net.physdev && !e.invert)
- push(related_physdevs, net.physdev);
+ if (net.up && net.device && !e.invert)
+ push(related_physdevs, net.device);
push(related_subnets, ...(net.ipaddrs || []));
}
The out-of-the-box 24.10.2 and earlier fw4.uc result in dsl0.101 being included in the list of interfaces.
flowtable ft {
hook ingress priority filter
devices = { br-lan, dsl0.101, pppoe-wan, wan }
counter
}
Making the patch change above gives this flowtable (I have a wireguard interface):
flowtable ft {
hook ingress priority filter
devices = { br-lan, pppoe-wan, wg }
counter
}
The result of not including the dsl0.101 interface from the flowtable seems to increase the speed of the line from ~68MBPS to full speed (~76 MBPS)
Please can this patch be reviewed for consideration for future inclusion as it makes quite a difference.
Good idea, but seems serving one setup (i am 10 years away from dsl or pppoe, cant check your concept is good or bad)
What interfaces are in wan network?
What offloads are seen in ethtool -k dsl0 | grep vlan-o?
root@router:/# ethtool -k wan | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] root@router:/# ethtool -k dsl0 | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] root@router:/# ethtool -k dsl0.101 | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] root@router:/# ethtool -k pppoe-wan | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] root@router:/# ethtool -k wg | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] root@router:/# ethtool -k ifb4pppoe-wan | grep vlan-o rx-vlan-offload: off [fixed] tx-vlan-offload: on
It's the same regardless of the different flowtables. Above are all the WAN type interfaces. However, leaving out dsl0.101 from the flowtable really does seem to make an improvement!
This patch originally came from https://forum.openwrt.org/t/dynalink-dl-wrx36-askey-rt5010w-ipq8072a-technical-discussion/110454/1422
That applies to OpenWrt 22. At that time pppoe offload did not work at all, just failing on every packet, then enabling offload on every other packet. The code is re-worked in v24.10 and the segment you are patching is no longer there, there is one code branch for soft other for hardware offload detecting devices.
What interfaces are in wan network?
uci show firewall.@zone[1]
firewall.cfg03dc81=zone
firewall.cfg03dc81.name='wan'
firewall.cfg03dc81.network='wan' 'wan6'
firewall.cfg03dc81.input='DROP'
firewall.cfg03dc81.output='ACCEPT'
firewall.cfg03dc81.forward='DROP'
firewall.cfg03dc81.masq='1'
I did some further controlled tests this morning and it seems that the perceived gains I saw yesterday may have been down to some other effect I can't identify. In other words the change didn't make a statistical difference. Sorry for any wasted effort I may have caused.
Peter
No problem. We can continue in forum, since as a matter of fact pppoe offload is working in kernel in v24 and v23.05.5 and the device lists may not be complete. since dsl0 misses vlan offloads - most optimal place to attach flowtable would be dsl0 itself, so that frame on the interface is converted and copied once to the destination. Also unlikely SQM (derived from ifb device) will work in that device at usable speeds.
Hi
No, SQM is only enabled for upload to control latency where there is sufficient CPU power. It doesn't much help on download.
Peter
In general SQM sets priority, but it can not change it as connection is in offload states.
What I find puzzling - firewall4 tests contain pppoe-wan and br-lan but not pppoe-lan lowlevel device in wan zone. Check around the options if you can straighten this out with configurations.
I did some further controlled tests this morning and it seems that the perceived gains I saw yesterday may have been down to some other effect I can't identify. In other words the change didn't make a statistical difference. Sorry for any wasted effort I may have caused.
Peter
Having said that, I think that this patch may have some positive effect on Wireless <-> WAN speeds - it doesn't seem to affect the LAN <-> WAN speed. Next time I'm on site I will aim to confirm this.
root@router:~# cat fw4.uc.patch
--- /rom/usr/share/ucode/fw4.uc 2025-06-23 21:40:36.000000000 +0100
+++ /usr/share/ucode/fw4.uc 2025-06-29 19:47:33.000000000 +0100
@@ -2068,8 +2068,8 @@
});
}
- if (net.physdev && !e.invert)
- push(related_physdevs, net.physdev);
+ if (net.up && net.device && !e.invert)
+ push(related_physdevs, net.device);
push(related_subnets, ...(net.ipaddrs || []));
Please make a PR? It has to be rebased to new lines. https://github.com/openwrt/firewall4/blob/b6e5157527d361f99ad52eaa6da273cb0f2dfd59/root/usr/share/ucode/fw4.uc#L2071