vmxnet3: Fix inconsistent LRO state after initialization
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 16 May 2011 06:28:15 +0000 (06:28 +0000)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:30 +0000 (14:23 -0500)
commit7911967a722719d714cf6975b2a2f94d9a04abf9
tree7e8afe9029f450c76b74bf0fc35c84ffedca7652
parent65abbbfa18bcb3791a4715c81bf6d04f9d055456
vmxnet3: Fix inconsistent LRO state after initialization

BugLink: http://bugs.launchpad.net/bugs/788691

commit ebde6f8acba92abfc203585198a54f47e83e2cd0 upstream.

During initialization of vmxnet3, the state of LRO
gets out of sync with netdev->features.

This leads to very poor TCP performance in a IP forwarding
setup and is hitting many VMware users.

Simplified call sequence:
1. vmxnet3_declare_features() initializes "adapter->lro" to true.

2. The kernel automatically disables LRO if IP forwarding is enabled,
so vmxnet3_set_flags() gets called. This also updates netdev->features.

3. Now vmxnet3_setup_driver_shared() is called. "adapter->lro" is still
set to true and LRO gets enabled again, even though
netdev->features shows it's disabled.

Fix it by updating "adapter->lro", too.

The private vmxnet3 adapter flags are scheduled for removal
in net-next, see commit a0d2730c9571aeba793cb5d3009094ee1d8fda35
"net: vmxnet3: convert to hw_features".

Patch applies to 2.6.37 / 2.6.38 and 2.6.39-rc6.

Please CC: comments.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Steve Conklin <sconklin@canonical.com>
drivers/net/vmxnet3/vmxnet3_ethtool.c