@@ -1437,16 +1437,21 @@ EXPORT_SYMBOL(dev_close);
*/
void dev_disable_lro(struct net_device *dev)
{
- /*
- * If we're trying to disable lro on a vlan device
- * use the underlying physical device instead
- */
- if (is_vlan_dev(dev))
- dev = vlan_dev_real_dev(dev);
+ struct net_device *prev_dev;
+
+ do {
+ prev_dev = dev;
+
+ /* If we're trying to disable lro on a vlan device
+ * use the underlying physical device instead
+ */
+ if (is_vlan_dev(dev))
+ dev = vlan_dev_real_dev(dev);
- /* the same for macvlan devices */
- if (netif_is_macvlan(dev))
- dev = macvlan_dev_real_dev(dev);
+ /* the same for macvlan devices */
+ if (netif_is_macvlan(dev))
+ dev = macvlan_dev_real_dev(dev);
+ } while (dev != prev_dev);
dev->wanted_features &= ~NETIF_F_LRO;
netdev_update_features(dev);
Current dev_disable_lro() code passing LRO disabling to lower device handles vlan on top of a macvlan but not the opposite. Repeat the test until the device is neither vlan nor macvlan. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> --- net/core/dev.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)