public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH net 1/3] ibmvnic: don't stop queue in xmit
@ 2021-10-29 22:03 Sukadev Bhattiprolu
  2021-10-29 22:03 ` [PATCH net 2/3] ibmvnic: Process crqs after enabling interrupts Sukadev Bhattiprolu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sukadev Bhattiprolu @ 2021-10-29 22:03 UTC (permalink / raw)
  To: netdev; +Cc: Brian King, Dany Madden, abdhalee, vaish123

If adapter's resetting bit is on, discard the packet but don't stop the
transmit queue - instead leave that to the reset code. With this change,
it is possible that we may get several calls to ibmvnic_xmit() that simply
discard packets and return.

But if we stop the queue here, we might end up doing so just after
__ibmvnic_open() started the queues (during a hard/soft reset) and before
the ->resetting bit was cleared. If that happens, there will be no one to
restart queue and transmissions will be blocked indefinitely.

This can cause a TIMEOUT reset and with auto priority failover enabled,
an unnecessary FAILOVER reset to less favored backing device and then a
FAILOVER back to the most favored backing device. If we hit the window
repeatedly, we can get stuck in a loop of TIMEOUT, FAILOVER, FAILOVER
resets leaving the adapter unusable for extended periods of time.

Fixes: 7f5b030830fe ("ibmvnic: Free skb's in cases of failure in transmit")
Reported-by: Abdul Haleem <abdhalee@in•ibm.com>
Reported-by: Vaishnavi Bhat <vaish123@in•ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux•ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 8f17096e614d..a1533979c670 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1914,8 +1914,6 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
 	ind_bufp = &tx_scrq->ind_buf;
 
 	if (test_bit(0, &adapter->resetting)) {
-		if (!netif_subqueue_stopped(netdev, skb))
-			netif_stop_subqueue(netdev, queue_num);
 		dev_kfree_skb_any(skb);
 
 		tx_send_failed++;
-- 
2.26.2


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

end of thread, other threads:[~2021-11-01 13:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 22:03 [PATCH net 1/3] ibmvnic: don't stop queue in xmit Sukadev Bhattiprolu
2021-10-29 22:03 ` [PATCH net 2/3] ibmvnic: Process crqs after enabling interrupts Sukadev Bhattiprolu
2021-10-29 22:23   ` Dany Madden
2021-10-29 22:03 ` [PATCH net 3/3] ibmvnic: delay complete() Sukadev Bhattiprolu
2021-10-29 22:25   ` Dany Madden
2021-10-29 22:18 ` [PATCH net 1/3] ibmvnic: don't stop queue in xmit Dany Madden
2021-11-01 13:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox