All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]     ibmvnic: Properly dispose of all skbs during a failover.
@ 2022-06-30  0:03 Rick Lindsley
  2022-06-30 12:25 ` Brian King
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rick Lindsley @ 2022-06-30  0:03 UTC (permalink / raw)
  To: netdev; +Cc: bjking1, haren, nnac123, mmc

    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.

    This was noted during testing of heavy data transfers in
    conjunction with multiple consecutive device failovers.

Signed-off-by: Rick Lindsley <ricklind@us.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 7e7fe5bdf1f8..5ab7c0f81e9a 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5981,6 +5981,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 {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ibmvnic: Properly dispose of all skbs during a failover.
  2022-06-30  0:03 [PATCH] ibmvnic: Properly dispose of all skbs during a failover Rick Lindsley
@ 2022-06-30 12:25 ` Brian King
  2022-06-30 15:35 ` Nick Child
  2022-06-30 17:52 ` Jakub Kicinski
  2 siblings, 0 replies; 4+ messages in thread
From: Brian King @ 2022-06-30 12:25 UTC (permalink / raw)
  To: Rick Lindsley, netdev; +Cc: bjking1, haren, nnac123, mmc

Reviewed-by: Brian King <brking@linux.vnet.ibm.com>

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ibmvnic: Properly dispose of all skbs during a failover.
  2022-06-30  0:03 [PATCH] ibmvnic: Properly dispose of all skbs during a failover Rick Lindsley
  2022-06-30 12:25 ` Brian King
@ 2022-06-30 15:35 ` Nick Child
  2022-06-30 17:52 ` Jakub Kicinski
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Child @ 2022-06-30 15:35 UTC (permalink / raw)
  To: Rick Lindsley, netdev; +Cc: bjking1, haren, mmc

Tested-by: Nick Child <nnac123@linux.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]     ibmvnic: Properly dispose of all skbs during a failover.
  2022-06-30  0:03 [PATCH] ibmvnic: Properly dispose of all skbs during a failover Rick Lindsley
  2022-06-30 12:25 ` Brian King
  2022-06-30 15:35 ` Nick Child
@ 2022-06-30 17:52 ` Jakub Kicinski
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2022-06-30 17:52 UTC (permalink / raw)
  To: Rick Lindsley; +Cc: netdev, bjking1, haren, nnac123, mmc

On Wed, 29 Jun 2022 17:03:17 -0700 Rick Lindsley wrote:
>     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.
> 
>     This was noted during testing of heavy data transfers in
>     conjunction with multiple consecutive device failovers.

The indentation in the patch itself is unnecessary, git adds it when
formatting the output of git log (I'm guessing that's the reason you
went this way). Note that the same goes for the subject which looks
padded with spaces from the left.

Please add a Fixes tag pointing at a commit which introduced the
behavior (initial git commit if it's always been there), and repost 
with [PATCH net v2] in the subject.

Please keep the review tags you already received when reposting.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-30 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30  0:03 [PATCH] ibmvnic: Properly dispose of all skbs during a failover Rick Lindsley
2022-06-30 12:25 ` Brian King
2022-06-30 15:35 ` Nick Child
2022-06-30 17:52 ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.