From 29ebd0e5201e268952dbfc8c03db8a502784e3c8 Mon Sep 17 00:00:00 2001 From: Mihai Ordean Date: Thu, 30 Jul 2026 13:36:37 +0000 Subject: [PATCH] net: ethernet: mtk_eth_soc: do not override a disabled LRO request 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 --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index d1bcc8afefa7..8f1f8874feeb 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3570,17 +3570,6 @@ static void mtk_rss_uninit(struct mtk_eth *eth) static netdev_features_t mtk_fix_features(struct net_device *dev, netdev_features_t features) { - if (!(features & NETIF_F_LRO)) { - struct mtk_mac *mac = netdev_priv(dev); - int ip_cnt = mtk_hwlro_get_ip_cnt(mac); - - if (ip_cnt) { - netdev_info(dev, "RX flow is programmed, LRO should keep on\n"); - - features |= NETIF_F_LRO; - } - } - if ((features & NETIF_F_IP_CSUM) && non_mtk_uses_dsa(dev)) features &= ~NETIF_F_IP_CSUM;