[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[24/24] vmxnet3: Fix inconsistent LRO state after initialization
    2.6.33-longterm review patch.  If anyone has any objections, please let us know.

    Content-Length: 1709
    Lines: 52

    From: Thomas Jarosch <>

    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 <>
    Acked-by: Stephen Hemminger <>
    Signed-off-by: David S. Miller <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/net/vmxnet3/vmxnet3_ethtool.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
    +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
    @@ -290,6 +290,9 @@ vmxnet3_set_flags(struct net_device *net
    /* toggle the LRO feature*/
    netdev->features ^= NETIF_F_LRO;

    + /* Update private LRO flag */
    + adapter->lro = lro_requested;
    /* update harware LRO capability accordingly */
    if (lro_requested)
    adapter->shared->devRead.misc.uptFeatures &= UPT1_F_LRO;

     \ /
      Last update: 2011-05-19 20:35    [W:0.020 / U:20.616 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site