🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by Breno Leitao Mon, 09 Nov 2026 14:43
[PATCH net] idpf: reset mb_wait_count once the mailbox is up
#13249
Author: Breno Leitao
Date: Mon, 09 Nov 2026 14:43
49 lines
11906 bytes
idpf_vc_core_init() retries a failed virtchnl version and capabilities
handshake up to IDPF_MB_MAX_ERR times before it gives up on the device.
Each failure increments adapter->mb_wait_count, but nothing ever clears
it, so the limit is shared by every initialization in the lifetime of
the adapter, including the one done by each reset.

A device that fails the first handshake after a reset, and then
recovers on the retry, leaves one count behind per reset. Once 20 have
accumulated, the next failure is final, and the device stays down until
the driver is reloaded. This is seen in Meta's fleet on hosts with
recurring Tx timeouts:

  [ 2176.496801] idpf 0016:01:00.0 eth1: Detected Tx timeout: Count 21, Queue 11
  [ 2176.508763] idpf 0016:01:00.0: Device HW Reset initiated
  [ 2237.412541] idpf 0016:01:00.0: Transaction timed-out (op:1 cookie:9800 vc_op:1 salt:98 timeout:60000ms)
  [ 2237.412578] idpf 0016:01:00.0: Failed to establish mailbox communications with hardware

Clear mb_wait_count once the handshake succeeds, so the limit applies
to consecutive failures only.

Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
index 928de868fa624e..7c11c877acd0ba 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -3118,6 +3118,9 @@ int idpf_vc_core_init(struct idpf_adapter *adapter)
 		msleep(task_delay);
 	}
 
+	/* The mailbox is up, give the next reset a fresh retry budget */
+	adapter->mb_wait_count = 0;
+
 	if (idpf_is_cap_ena(adapter, IDPF_OTHER_CAPS, VIRTCHNL2_CAP_LAN_MEMORY_REGIONS)) {
 		err = idpf_cfg_lan_memory_regions(adapter);
 		if (err) {

---
base-commit: 1d5e2c57e9ffc134e14b3f837c8d7c53b508bd22
change-id: 20261109-idpf-mb-wait-count-184efb41b525

Best regards,
--  
Breno Leitao <leitao@debian.org>
Re: [PATCH net] idpf: reset mb_wait_count once the mailbox is up
#15887
Author: Simon Horman
Date: Fri, 13 Nov 2026 17:42
28 lines
9598 bytes
On Mon, Nov 09, 2026 at 06:43:27AM -0800, Breno Leitao wrote:
> idpf_vc_core_init() retries a failed virtchnl version and capabilities
> handshake up to IDPF_MB_MAX_ERR times before it gives up on the device.
> Each failure increments adapter->mb_wait_count, but nothing ever clears
> it, so the limit is shared by every initialization in the lifetime of
> the adapter, including the one done by each reset.
> 
> A device that fails the first handshake after a reset, and then
> recovers on the retry, leaves one count behind per reset. Once 20 have
> accumulated, the next failure is final, and the device stays down until
> the driver is reloaded. This is seen in Meta's fleet on hosts with
> recurring Tx timeouts:
> 
>   [ 2176.496801] idpf 0016:01:00.0 eth1: Detected Tx timeout: Count 21, Queue 11
>   [ 2176.508763] idpf 0016:01:00.0: Device HW Reset initiated
>   [ 2237.412541] idpf 0016:01:00.0: Transaction timed-out (op:1 cookie:9800 vc_op:1 salt:98 timeout:60000ms)
>   [ 2237.412578] idpf 0016:01:00.0: Failed to establish mailbox communications with hardware
> 
> Clear mb_wait_count once the handshake succeeds, so the limit applies
> to consecutive failures only.
> 
> Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Simon Horman <horms@kernel.org>

Tony, maybe this should be routed via the iwl tree?
RE: [PATCH net] idpf: reset mb_wait_count once the mailbox is up
#15926
Author: "Loktionov, Aleksandr"
Date: Fri, 13 Nov 2026 18:04
60 lines
25630 bytes

> -----Original Message-----
> From: Breno Leitao <leitao@debian.org>
> Sent: Monday, November 9, 2026 3:43 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@kernel.org>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Chittim, Madhu <madhu.chittim@intel.com>; Tantilov,
> Emil S <emil.s.tantilov@intel.com>; Hay, Joshua A
> <joshua.a.hay@intel.com>; Alan Brady <alan.brady@intel.com>; Samudrala,
> Sridhar <sridhar.samudrala@intel.com>; Willem de Bruijn
> <willemb@google.com>; Shailendra Bhatnagar
> <shailendra.bhatnagar@intel.com>; Pavan Kumar Linga
> <pavan.kumar.linga@intel.com>
> Cc: Burra, Phani R <phani.r.burra@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [PATCH net] idpf: reset mb_wait_count once the mailbox is up
> 
> idpf_vc_core_init() retries a failed virtchnl version and capabilities
> handshake up to IDPF_MB_MAX_ERR times before it gives up on the device.
> Each failure increments adapter->mb_wait_count, but nothing ever clears
> it, so the limit is shared by every initialization in the lifetime of
> the adapter, including the one done by each reset.
> 
> A device that fails the first handshake after a reset, and then recovers
> on the retry, leaves one count behind per reset. Once 20 have
> accumulated, the next failure is final, and the device stays down until
> the driver is reloaded. This is seen in Meta's fleet on hosts with
> recurring Tx timeouts:
> 
>   [ 2176.496801] idpf 0016:01:00.0 eth1: Detected Tx timeout: Count 21,
> Queue 11
>   [ 2176.508763] idpf 0016:01:00.0: Device HW Reset initiated
>   [ 2237.412541] idpf 0016:01:00.0: Transaction timed-out (op:1
> cookie:9800 vc_op:1 salt:98 timeout:60000ms)
>   [ 2237.412578] idpf 0016:01:00.0: Failed to establish mailbox
> communications with hardware
> 
> Clear mb_wait_count once the handshake succeeds, so the limit applies to
> consecutive failures only.
> 
> Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> index 928de868fa624e..7c11c877acd0ba 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> @@ -3118,6 +3118,9 @@ int idpf_vc_core_init(struct idpf_adapter
> *adapter)
>  		msleep(task_delay);
>  	}
> 
> +	/* The mailbox is up, give the next reset a fresh retry budget */
> +	adapter->mb_wait_count = 0;
> +
>  	if (idpf_is_cap_ena(adapter, IDPF_OTHER_CAPS,
> VIRTCHNL2_CAP_LAN_MEMORY_REGIONS)) {
>  		err = idpf_cfg_lan_memory_regions(adapter);
>  		if (err) {
> 
> ---
> base-commit: 1d5e2c57e9ffc134e14b3f837c8d7c53b508bd22
> change-id: 20261109-idpf-mb-wait-count-184efb41b525
> 
> Best regards,
> --
> Breno Leitao <leitao@debian.org>

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Re: [PATCH net] idpf: reset mb_wait_count once the mailbox is up
#15907
Author: Tony Nguyen
Date: Fri, 13 Nov 2026 18:29
38 lines
22700 bytes

On 11/13/2026 9:42 AM, Simon Horman wrote:
> On Mon, Nov 09, 2026 at 06:43:27AM -0800, Breno Leitao wrote:
>> idpf_vc_core_init() retries a failed virtchnl version and capabilities
>> handshake up to IDPF_MB_MAX_ERR times before it gives up on the device.
>> Each failure increments adapter->mb_wait_count, but nothing ever clears
>> it, so the limit is shared by every initialization in the lifetime of
>> the adapter, including the one done by each reset.
>>
>> A device that fails the first handshake after a reset, and then
>> recovers on the retry, leaves one count behind per reset. Once 20 have
>> accumulated, the next failure is final, and the device stays down until
>> the driver is reloaded. This is seen in Meta's fleet on hosts with
>> recurring Tx timeouts:
>>
>>    [ 2176.496801] idpf 0016:01:00.0 eth1: Detected Tx timeout: Count 21, Queue 11
>>    [ 2176.508763] idpf 0016:01:00.0: Device HW Reset initiated
>>    [ 2237.412541] idpf 0016:01:00.0: Transaction timed-out (op:1 cookie:9800 vc_op:1 salt:98 timeout:60000ms)
>>    [ 2237.412578] idpf 0016:01:00.0: Failed to establish mailbox communications with hardware
>>
>> Clear mb_wait_count once the handshake succeeds, so the limit applies
>> to consecutive failures only.
>>
>> Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
>> Signed-off-by: Breno Leitao <leitao@debian.org>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Tony, maybe this should be routed via the iwl tree?

Hi Simon,

Yea, I'll take this through IWL.

Thanks,
Tony
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads