From: drt <drt@linux.vnet.ibm.com>
To: Lijun Pan <ljp@linux.ibm.com>
Cc: netdev@vger.kernel.org, sukadev@linux.ibm.com, drt@linux.ibm.com
Subject: Re: [PATCH net 10/15] ibmvnic: no reset timeout for 5 seconds after reset
Date: Fri, 20 Nov 2020 15:01:09 -0800 [thread overview]
Message-ID: <eba79ebb8fdf4fd9993cdc7ff5d327ae@linux.vnet.ibm.com> (raw)
In-Reply-To: <20201120224049.46933-11-ljp@linux.ibm.com>
On 2020-11-20 14:40, Lijun Pan wrote:
> From: Dany Madden <drt@linux.ibm.com>
>
> Reset timeout is going off right after adapter reset. This patch
> ensures
> that timeout is scheduled if it has been 5 seconds since the last
> reset.
> 5 seconds is the default watchdog timeout.
>
Suggested-by: Brian King <brking@linux.ibm.com>
> Signed-off-by: Dany Madden <drt@linux.ibm.com>
Sorry I missed this. Thanks, Brian!
Dany
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 11 +++++++++--
> drivers/net/ethernet/ibm/ibmvnic.h | 2 ++
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index 9d2eebd31ff6..252af4ab6468 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -2291,6 +2291,7 @@ static void __ibmvnic_reset(struct work_struct
> *work)
> rc = do_reset(adapter, rwi, reset_state);
> }
> kfree(rwi);
> + adapter->last_reset_time = jiffies;
>
> if (rc)
> netdev_dbg(adapter->netdev, "Reset failed, rc=%d\n", rc);
> @@ -2394,7 +2395,13 @@ static void ibmvnic_tx_timeout(struct
> net_device *dev, unsigned int txqueue)
> "Adapter is resetting, skip timeout reset\n");
> return;
> }
> -
> + /* No queuing up reset until at least 5 seconds (default watchdog
> val)
> + * after last reset
> + */
> + if (time_before(jiffies, (adapter->last_reset_time +
> dev->watchdog_timeo))) {
> + netdev_dbg(dev, "Not yet time to tx timeout.\n");
> + return;
> + }
> ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
> }
>
> @@ -5316,7 +5323,7 @@ static int ibmvnic_probe(struct vio_dev *dev,
> const struct vio_device_id *id)
> adapter->state = VNIC_PROBED;
>
> adapter->wait_for_reset = false;
> -
> + adapter->last_reset_time = jiffies;
> return 0;
>
> ibmvnic_register_fail:
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.h
> b/drivers/net/ethernet/ibm/ibmvnic.h
> index 9b1f34602f33..d15866cbc2a6 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.h
> +++ b/drivers/net/ethernet/ibm/ibmvnic.h
> @@ -1089,6 +1089,8 @@ struct ibmvnic_adapter {
> unsigned long resetting;
> bool napi_enabled, from_passive_init;
> bool login_pending;
> + /* last device reset time */
> + unsigned long last_reset_time;
>
> bool failover_pending;
> bool force_reset_recovery;
next prev parent reply other threads:[~2020-11-20 23:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 22:40 [PATCH net 00/15] ibmvnic: assorted bug fixes Lijun Pan
2020-11-20 22:40 ` [PATCH net 01/15] ibmvnic: handle inconsistent login with reset Lijun Pan
2020-11-21 23:36 ` Jakub Kicinski
2020-11-20 22:40 ` [PATCH net 02/15] ibmvnic: process HMC disable command Lijun Pan
2020-11-21 23:36 ` Jakub Kicinski
2020-11-21 23:38 ` Jakub Kicinski
2020-11-22 15:12 ` drt
2020-11-23 19:43 ` Jakub Kicinski
2020-11-23 21:46 ` drt
2020-11-20 22:40 ` [PATCH net 03/15] ibmvnic: stop free_all_rwi on failed reset Lijun Pan
2020-11-20 22:40 ` [PATCH net 04/15] ibmvnic: remove free_all_rwi function Lijun Pan
2020-11-21 23:39 ` Jakub Kicinski
2020-11-20 22:40 ` [PATCH net 05/15] ibmvnic: avoid memset null scrq msgs Lijun Pan
2020-11-20 22:40 ` [PATCH net 06/15] ibmvnic: restore adapter state on failed reset Lijun Pan
2020-11-20 22:40 ` [PATCH net 07/15] ibmvnic: delay next reset if hard reset failed Lijun Pan
2020-11-20 22:40 ` [PATCH net 08/15] ibmvnic: track pending login Lijun Pan
2020-11-20 22:40 ` [PATCH net 09/15] ibmvnic: send_login should check for crq errors Lijun Pan
2020-11-20 22:40 ` [PATCH net 10/15] ibmvnic: no reset timeout for 5 seconds after reset Lijun Pan
2020-11-20 23:01 ` drt [this message]
2020-11-20 22:40 ` [PATCH net 11/15] ibmvnic: reduce wait for completion time Lijun Pan
2020-11-20 22:40 ` [PATCH net 12/15] ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues Lijun Pan
2020-11-21 23:44 ` Jakub Kicinski
2020-11-20 22:40 ` [PATCH net 13/15] ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq Lijun Pan
2020-11-20 22:40 ` [PATCH net 14/15] ibmvnic: enhance resetting status check during module exit Lijun Pan
2020-11-20 22:40 ` [PATCH net 15/15] ibmvnic: add some debugs Lijun Pan
2020-11-21 23:45 ` Jakub Kicinski
2020-11-23 19:48 ` Sukadev Bhattiprolu
2020-11-23 19:38 ` [PATCH net 00/15] ibmvnic: assorted bug fixes ljp
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=eba79ebb8fdf4fd9993cdc7ff5d327ae@linux.vnet.ibm.com \
--to=drt@linux.vnet.ibm.com \
--cc=drt@linux.ibm.com \
--cc=ljp@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=sukadev@linux.ibm.com \
/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).