• Nick Child's avatar
    ibmveth: Always stop tx queues during close · 127b7218
    Nick Child authored
    netif_stop_all_queues must be called before calling H_FREE_LOGICAL_LAN.
    As a result, we can remove the pool_config field from the ibmveth
    adapter structure.
    
    Some device configuration changes call ibmveth_close in order to free
    the current resources held by the device. These functions then make
    their changes and call ibmveth_open to reallocate and reserve resources
    for the device.
    
    Prior to this commit, the flag pool_config was used to tell ibmveth_close
    that it should not halt the transmit queue. pool_config was introduced in
    commit 860f242e ("[PATCH] ibmveth change buffer pools dynamically")
    to avoid interrupting the tx flow when making rx config changes. Since
    then, other commits adopted this approach, even if making tx config
    changes.
    
    The issue with this approach was that the hypervisor freed all of
    the devices control structures after the hcall H_FREE_LOGICAL_LAN
    was performed but the transmit queues were never stopped. So the higher
    layers in the network stack would continue transmission but any
    H_SEND_LOGICAL_LAN hcall would fail with H_PARAMETER until the
    hypervisor's structures for the device were allocated with the
    H_REGISTER_LOGICAL_LAN hcall in ibmveth_open. This resulted in
    no real networking harm but did cause several of these error
    messages to be logged: "h_send_logical_lan failed with rc=-4"
    
    So, instead of trying to keep the transmit queues alive during network
    configuration changes, just stop the queues, make necessary changes then
    restart the queues.
    Signed-off-by: default avatarNick Child <nnac123@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    127b7218
ibmveth.h 6.36 KB