Skip to content

Commit 1b18f09

Browse files
ricklinddavem330
authored andcommitted
ibmvnic: Properly dispose of all skbs during a failover.
During a reset, there may have been transmits in flight that are no longer valid and cannot be fulfilled. Resetting and clearing the queues is insufficient; each skb also needs to be explicitly freed so that upper levels are not left waiting for confirmation of a transmit that will never happen. If this happens frequently enough, the apparent backlog will cause TCP to begin "congestion control" unnecessarily, culminating in permanently decreased throughput. Fixes: d7c0ef3 ("ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change") Tested-by: Nick Child <[email protected]> Reviewed-by: Brian King <[email protected]> Signed-off-by: Rick Lindsley <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ea1c3b7 commit 1b18f09

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5981,6 +5981,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter, bool reset)
59815981
release_sub_crqs(adapter, 0);
59825982
rc = init_sub_crqs(adapter);
59835983
} else {
5984+
/* no need to reinitialize completely, but we do
5985+
* need to clean up transmits that were in flight
5986+
* when we processed the reset. Failure to do so
5987+
* will confound the upper layer, usually TCP, by
5988+
* creating the illusion of transmits that are
5989+
* awaiting completion.
5990+
*/
5991+
clean_tx_pools(adapter);
5992+
59845993
rc = reset_sub_crq_queues(adapter);
59855994
}
59865995
} else {

0 commit comments

Comments
 (0)