diff options
author | Michal Kubeček <mkubecek@suse.cz> | 2013-11-15 00:18:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-15 17:55:48 -0500 |
commit | 529d04895446f02449077a4ff49185b593283e19 (patch) | |
tree | 6f19d2911b09276a4f69f13e99272321024417f6 /net | |
parent | be9eac48274a2d9b142d6dd8567b9b2362939346 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 974143d3e727..7e00a7342ee6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -131,6 +131,7 @@ | |||
131 | #include <linux/static_key.h> | 131 | #include <linux/static_key.h> |
132 | #include <linux/hashtable.h> | 132 | #include <linux/hashtable.h> |
133 | #include <linux/vmalloc.h> | 133 | #include <linux/vmalloc.h> |
134 | #include <linux/if_macvlan.h> | ||
134 | 135 | ||
135 | #include "net-sysfs.h" | 136 | #include "net-sysfs.h" |
136 | 137 | ||
@@ -1424,6 +1425,10 @@ void dev_disable_lro(struct net_device *dev) | |||
1424 | if (is_vlan_dev(dev)) | 1425 | if (is_vlan_dev(dev)) |
1425 | dev = vlan_dev_real_dev(dev); | 1426 | dev = vlan_dev_real_dev(dev); |
1426 | 1427 | ||
1428 | /* the same for macvlan devices */ | ||
1429 | if (netif_is_macvlan(dev)) | ||
1430 | dev = macvlan_dev_real_dev(dev); | ||
1431 | |||
1427 | dev->wanted_features &= ~NETIF_F_LRO; | 1432 | dev->wanted_features &= ~NETIF_F_LRO; |
1428 | netdev_update_features(dev); | 1433 | netdev_update_features(dev); |
1429 | 1434 | ||