mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-15 18:04:36 +00:00
macvlan: disable LRO on lower device instead of macvlan
A macvlan device has always LRO disabled so that calling dev_disable_lro() on it does nothing. If we need to disable LRO e.g. because - the macvlan device is inserted into a bridge - IPv6 forwarding is enabled for it - it is in a different namespace than lowerdev and IPv4 forwarding is enabled in it we need to disable LRO on its underlying device instead (as we do for 802.1q VLAN devices). v2: use newly introduced netif_is_macvlan() Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
be9eac4827
commit
529d048954
@ -131,6 +131,7 @@
|
|||||||
#include <linux/static_key.h>
|
#include <linux/static_key.h>
|
||||||
#include <linux/hashtable.h>
|
#include <linux/hashtable.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
#include <linux/if_macvlan.h>
|
||||||
|
|
||||||
#include "net-sysfs.h"
|
#include "net-sysfs.h"
|
||||||
|
|
||||||
@ -1424,6 +1425,10 @@ void dev_disable_lro(struct net_device *dev)
|
|||||||
if (is_vlan_dev(dev))
|
if (is_vlan_dev(dev))
|
||||||
dev = vlan_dev_real_dev(dev);
|
dev = vlan_dev_real_dev(dev);
|
||||||
|
|
||||||
|
/* the same for macvlan devices */
|
||||||
|
if (netif_is_macvlan(dev))
|
||||||
|
dev = macvlan_dev_real_dev(dev);
|
||||||
|
|
||||||
dev->wanted_features &= ~NETIF_F_LRO;
|
dev->wanted_features &= ~NETIF_F_LRO;
|
||||||
netdev_update_features(dev);
|
netdev_update_features(dev);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user