Skip to content

Commit

Permalink
ibmvnic: Properly dispose of all skbs during a failover.
Browse files Browse the repository at this point in the history
[ Upstream commit 1b18f09 ]

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 <nnac123@linux.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Rick Lindsley <ricklind@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ricklind authored and gregkh committed Jul 12, 2022
1 parent 2b4659c commit 23cdc57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -5228,6 +5228,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter, bool reset)
release_sub_crqs(adapter, 0);
rc = init_sub_crqs(adapter);
} else {
/* no need to reinitialize completely, but we do
* need to clean up transmits that were in flight
* when we processed the reset. Failure to do so
* will confound the upper layer, usually TCP, by
* creating the illusion of transmits that are
* awaiting completion.
*/
clean_tx_pools(adapter);

rc = reset_sub_crq_queues(adapter);
}
} else {
Expand Down

0 comments on commit 23cdc57

Please sign in to comment.