netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lijun Pan <ljp@linux.ibm.com>
To: netdev@vger.kernel.org
Cc: Lijun Pan <ljp@linux.ibm.com>, Brian King <brking@linux.vnet.ibm.com>
Subject: [PATCH net 2/2] ibmvnic: skip tx timeout reset while in resetting
Date: Wed, 28 Oct 2020 00:57:42 -0500	[thread overview]
Message-ID: <20201028055742.74941-3-ljp@linux.ibm.com> (raw)
In-Reply-To: <20201028055742.74941-1-ljp@linux.ibm.com>

Sometimes it takes longer than 5 seconds to complete failover,
migration, and other resets. In stead of scheduling another timeout reset,
we wait for the current one to complete.

Suggested-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 718da39f5ae4..eb0eb1e8ac22 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2336,6 +2336,12 @@ static void ibmvnic_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
 	struct ibmvnic_adapter *adapter = netdev_priv(dev);
 
+	if (test_bit(0, &adapter->resetting)) {
+		netdev_err(adapter->netdev,
+			   "adapter is resetting, skip timeout reset\n");
+		return;
+	}
+
 	ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
 }
 
-- 
2.23.0


      parent reply	other threads:[~2020-10-28 22:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  5:57 [PATCH net 0/2] ibmvnic: fixes in reset path Lijun Pan
2020-10-28  5:57 ` [PATCH net 1/2] ibmvnic: notify peers when failover and migration happen Lijun Pan
2020-10-30 20:27   ` Jakub Kicinski
2020-11-05  4:54     ` drt
2020-10-28  5:57 ` Lijun Pan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201028055742.74941-3-ljp@linux.ibm.com \
    --to=ljp@linux.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).