Netdev List
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Loktionov, Aleksandr'" <aleksandr.loktionov@intel.com>,
	<netdev@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: "'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
	"'Andrew Lunn'" <andrew+netdev@lunn.ch>,
	"'David S. Miller'" <davem@davemloft.net>,
	"'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>,
	"'Paolo Abeni'" <pabeni@redhat.com>,
	"'Richard Cochran'" <richardcochran@gmail.com>,
	"'Russell King'" <linux@armlinux.org.uk>,
	"'Keller, Jacob E'" <jacob.e.keller@intel.com>,
	"'Michal Swiatkowski'" <michal.swiatkowski@linux.intel.com>,
	"'Simon Horman'" <horms@kernel.org>,
	"'Kees Cook'" <kees@kernel.org>,
	"'Zaremba, Larysa'" <larysa.zaremba@intel.com>,
	"'Ingo Molnar'" <mingo@kernel.org>, "'Joe Damato'" <joe@dama.to>,
	"'Breno Leitao'" <leitao@debian.org>,
	"'Uwe Kleine-König (The Capable Hub)'"
	<u.kleine-koenig@baylibre.com>,
	"'Johannes Berg'" <johannes@sipsolutions.net>,
	"'Fabio Baltieri'" <fabio.baltieri@gmail.com>,
	"'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
	"'Andrew Lunn'" <andrew+netdev@lunn.ch>,
	"'David S. Miller'" <davem@davemloft.net>,
	"'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>,
	"'Paolo Abeni'" <pabeni@redhat.com>,
	"'Richard Cochran'" <richardcochran@gmail.com>,
	"'Russell King'" <linux@armlinux.org.uk>,
	"'Keller, Jacob E'" <jacob.e.keller@intel.com>,
	"'Michal Swiatkowski'" <michal.swiatkowski@linux.intel.com>,
	"'Simon Horman'" <horms@kernel.org>,
	"'Kees Cook'" <kees@kernel.org>,
	"'Zaremba, Larysa'" <larysa.zaremba@intel.com>,
	"'Ingo Molnar'" <mingo@kernel.org>, "'Joe Damato'" <joe@dama.to>,
	"'Breno Leitao'" <leitao@debian.org>,
	"'Uwe Kleine-König (The Capable Hub)'"
	<u.kleine-koenig@baylibre.com>,
	"'Johannes Berg'" <johannes@sipsolutions.net>,
	"'Fabio Baltieri'" <fabio.baltieri@gmail.com>
Subject: RE: [PATCH net-next v4 4/5] net: wangxun: introduce soft quiesce callbacks for AER recovery
Date: Tue, 2 Jun 2026 10:12:19 +0800	[thread overview]
Message-ID: <088e01dcf235$3dabf3e0$b903dba0$@trustnetic.com> (raw)
In-Reply-To: <IA3PR11MB8986350DE4363EB91F97F1ECE5152@IA3PR11MB8986.namprd11.prod.outlook.com>

> > +static void ngbe_soft_quiesce(struct wx *wx) {
> > +	if (test_and_set_bit(WX_STATE_DOWN, wx->state))
> > +		return;
> > +
> > +	wx_ptp_stop(wx);
> > +	phylink_stop(wx->phylink);
> > +	pci_clear_master(wx->pdev);
> > +	wx_napi_disable_all(wx);
> > +
> > +	clear_bit(WX_FLAG_NEED_PF_RESET, wx->flags);
> > +	timer_delete_sync(&wx->service_timer);
> Can you exlplain how do you handle service_task work item that was ALREADY QUEUED before
> timer_delete_sync()? Because they are NOT cancelled here.

Waiting for the service task to complete may unnecessarily delay PCI error
recovery, especially if the work item is already blocked by the hardware
failure that triggered AER. The service task is not explicitly cancelled in the
AER quiesce path.

The device is marked WX_STATE_DOWN before the timer is stopped. For the already
queued work item, it must check WX_STATE_DOWN at entry and returns immediately
without touching hardware or driver resources.

I think what I need to change is to add WX_STATE_DOWN check at the beginning of
txgbe_service_task()/ngbe_service_task(), just like wx_update_stats() that has
done it.
 


  reply	other threads:[~2026-06-02  2:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  7:22 [PATCH net-next v4 0/5] net: wangxun: timeout and error Jiawen Wu
2026-06-01  7:22 ` [PATCH net-next v4 1/5] net: ngbe: implement libwx reset ops Jiawen Wu
2026-06-02 10:13   ` Larysa Zaremba
2026-06-01  7:22 ` [PATCH net-next v4 2/5] net: wangxun: add Tx timeout process Jiawen Wu
2026-06-01  9:26   ` Loktionov, Aleksandr
2026-06-02 10:32   ` Larysa Zaremba
2026-06-01  7:22 ` [PATCH net-next v4 3/5] net: wangxun: add reinit parameter to wx->do_reset callback Jiawen Wu
2026-06-01  9:05   ` Loktionov, Aleksandr
2026-06-01  7:22 ` [PATCH net-next v4 4/5] net: wangxun: introduce soft quiesce callbacks for AER recovery Jiawen Wu
2026-06-01  9:32   ` Loktionov, Aleksandr
2026-06-01  9:37     ` Jiawen Wu
2026-06-01 10:09   ` Loktionov, Aleksandr
2026-06-02  2:12     ` Jiawen Wu [this message]
2026-06-02 11:16   ` Larysa Zaremba
2026-06-01  7:22 ` [PATCH net-next v4 5/5] net: wangxun: implement pci_error_handlers ops Jiawen Wu
2026-06-01  9:37   ` Loktionov, Aleksandr
2026-06-02  2:28     ` Jiawen Wu
2026-06-02 11:30   ` Larysa Zaremba

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='088e01dcf235$3dabf3e0$b903dba0$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fabio.baltieri@gmail.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=joe@dama.to \
    --cc=johannes@sipsolutions.net \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=leitao@debian.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=u.kleine-koenig@baylibre.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