aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-06-19 19:15:47 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-19 19:15:47 -0400
commit0187bdfb05674147774ca79a79942537f3ad54bd (patch)
tree43980261ce9e2b6ef76356dbbbc7efe3dbb60a02 /net/bridge
parent2e3216cd54b142ba605e87522e15f42e0c4e3996 (diff)
net: Disable LRO on devices that are forwarding
Large Receive Offload (LRO) is only appropriate for packets that are destined for the host, and should be disabled if received packets may be forwarded. It can also confuse the GSO on output. Add dev_disable_lro() function which uses the appropriate ethtool ops to disable LRO if enabled. Add calls to dev_disable_lro() in br_add_if() and functions that enable IPv4 and IPv6 forwarding. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_if.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 143c954681b8..832a561500d9 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -387,6 +387,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
387 goto err2; 387 goto err2;
388 388
389 rcu_assign_pointer(dev->br_port, p); 389 rcu_assign_pointer(dev->br_port, p);
390 dev_disable_lro(dev);
390 dev_set_promiscuity(dev, 1); 391 dev_set_promiscuity(dev, 1);
391 392
392 list_add_rcu(&p->list, &br->port_list); 393 list_add_rcu(&p->list, &br->port_list);