From: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2] iavf: Add reset to watchdog task
Date: Tue, 25 Jan 2022 00:31:28 +0000 [thread overview]
Message-ID: <fcb47365347a6eea578315cc9c8e6fa218be66b4.camel@intel.com> (raw)
In-Reply-To: <CO1PR11MB48811E81C70B27754A77D92F995B9@CO1PR11MB4881.namprd11.prod.outlook.com>
On Fri, 2022-01-21 at 14:58 +0000, Sokolowski, Jan wrote:
> Remove the reset as separate task and implement
> the reset procedure inside the watchdog state machine.
> This allows to avoid additional overhead for processes
> synchronization. The reset flags are still used to mark
> reset progress for asynchonous invoked callback functions.
>
> Signed-off-by: Jakub Pawlak <jakub.pawlak@intel.com>
> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
A changelog would be nice.
Also:
WARNING: From:/Signed-off-by: email name mismatch: 'From: "Sokolowski,
Jan" <jan.sokolowski@intel.com>' != 'Signed-off-by: Jan Sokolowski
<jan.sokolowski@intel.com>'
> ?drivers/net/ethernet/intel/iavf/iavf.h??????? |? 1 -
> ?.../net/ethernet/intel/iavf/iavf_ethtool.c??? | 12 ++--
> ?drivers/net/ethernet/intel/iavf/iavf_main.c?? | 67 +++++++----------
> --
> ?.../net/ethernet/intel/iavf/iavf_virtchnl.c?? |? 4 +-
> ?4 files changed, 30 insertions(+), 54 deletions(-)
<snip>
> -static void iavf_reset_task(struct work_struct *work)
> +static void iavf_handle_hw_reset(struct iavf_adapter *adapter)
> ?{
> -???????struct iavf_adapter *adapter = container_of(work,
> -???????????????????????????????????????????????????? struct
> iavf_adapter,
> -???????????????????????????????????????????????????? reset_task);
> ????????struct virtchnl_vf_resource *vfres = adapter->vf_res;
> ????????struct net_device *netdev = adapter->netdev;
> ????????struct iavf_hw *hw = &adapter->hw;
> @@ -2651,12 +2647,9 @@ static void iavf_reset_task(struct work_struct
> *work)
> ????????if (mutex_is_locked(&adapter->remove_lock))
> ????????????????return;
> ?
> -???????if (iavf_lock_timeout(&adapter->crit_lock, 200)) {
> -???????????????schedule_work(&adapter->reset_task);
> -???????????????return;
> -???????}
> -???????while (!mutex_trylock(&adapter->client_lock))
> -???????????????usleep_range(500, 1000);
I missed this on v1, but doesn't this unbalance the client_lock?
> +???????adapter->flags |= IAVF_FLAG_RESET_PENDING;
> +???????adapter->flags &= ~IAVF_FLAG_RESET_NEEDED;
> +
> ????????if (CLIENT_ENABLED(adapter)) {
> ????????????????adapter->flags &= ~(IAVF_FLAG_CLIENT_NEEDS_OPEN |
> ??????????????????????????????????? IAVF_FLAG_CLIENT_NEEDS_CLOSE |
prev parent reply other threads:[~2022-01-25 0:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 14:58 [Intel-wired-lan] [PATCH net-next v2] iavf: Add reset to watchdog task Sokolowski, Jan
2022-01-25 0:31 ` Nguyen, Anthony L [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=fcb47365347a6eea578315cc9c8e6fa218be66b4.camel@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.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