Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0711d15c authored by Rick Lindsley's avatar Rick Lindsley Committed by Greg Kroah-Hartman
Browse files

ibmvnic: Properly dispose of all skbs during a failover.



[ Upstream commit 1b18f09d31cfa7148df15a7d5c5e0e86f105f7d1 ]

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: d7c0ef36 ("ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change")
Tested-by: default avatarNick Child <nnac123@linux.ibm.com>
Reviewed-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarRick Lindsley <ricklind@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent aa698aff
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -5022,6 +5022,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter)
			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 {