Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: d7c0ef36bde03 ("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>

authored by

Rick Lindsley and committed by
David S. Miller
1b18f09d ea1c3b77

+9
+9
drivers/net/ethernet/ibm/ibmvnic.c
··· 5981 5981 release_sub_crqs(adapter, 0); 5982 5982 rc = init_sub_crqs(adapter); 5983 5983 } 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 + 5984 5993 rc = reset_sub_crq_queues(adapter); 5985 5994 } 5986 5995 } else {