Skip to content

ethtool -K … lro off` doesn't stick once an ntuple LRO rule exists - #195

Open
meehien wants to merge 1 commit into
frank-w:7.1-mainfrom
meehien:bpi/mtk-eth-lro-fix-features
Open

ethtool -K … lro off` doesn't stick once an ntuple LRO rule exists#195
meehien wants to merge 1 commit into
frank-w:7.1-mainfrom
meehien:bpi/mtk-eth-lro-fix-features

Conversation

@meehien

@meehien meehien commented Jul 30, 2026

Copy link
Copy Markdown

mtk_fix_features() forces NETIF_F_LRO back on whenever the netdev has an
LRO destination address programmed, so a request to disable LRO is silently
reverted. ndo_fix_features() is where a driver resolves dependencies
between features, not a veto — the stack treats an unhonoured request as a
driver bug.

The caller that matters is dev_disable_lro(). The bridge and the routing
path call it to guarantee receive aggregation is off, because a device that
coalesces segments it is about to forward re-segments them wrongly. It
clears the bit, calls netdev_update_features(), and warns if the feature
survives — which is what happens here: enslave the port to a bridge with an
LRO rule programmed, netdev_WARN() fires, and hardware LRO stays on for a
forwarding path.

Programmed destination addresses are inert while LRO is off and are
re-applied by mtk_hwlro_netdev_enable() if it's turned back on, so nothing
is lost by honouring the request. Drop the override.

mtk_fix_features() forces NETIF_F_LRO back on whenever the netdev has an
LRO destination address programmed, so a request to disable LRO is
silently reverted.  ndo_fix_features() is not a veto, it is where a driver
resolves dependencies between features, and the stack treats a request it
did not honour as a driver bug.

dev_disable_lro() is the caller that matters here.  The bridge, the
routing path and every other forwarding user call it to guarantee that
receive aggregation is off, because a device that coalesces segments it
is going to forward will re-segment them wrongly.  It clears
NETIF_F_LRO from wanted_features, calls netdev_update_features(), and
warns if the feature survives - which is exactly what happens on this
driver once an ntuple LRO rule exists: the port is enslaved to a bridge,
netdev_WARN() fires, and hardware LRO stays enabled on a forwarding path.

Programmed destination addresses are inert while LRO is disabled and are
re-applied by mtk_hwlro_netdev_enable() if it is turned back on, so
nothing is lost by honouring the request.  Drop the override.

Signed-off-by: Mihai Ordean <research@mihaiordean.com>
@frank-w

frank-w commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Is lro still working when this flag is dropped?

@meehien

meehien commented Jul 30, 2026

Copy link
Copy Markdown
Author

yes, LRO still works, the patch only removes the veto in mtk_fix_features(), and the enable path (ethtool -K … lro on → mtk_set_features() → mtk_hwlro_netdev_enable()) is not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants