> -----Original Message----- > From: Breno Leitao <[email protected]> > Sent: Monday, November 9, 2026 3:43 PM > To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw > <[email protected]>; Andrew Lunn <[email protected]>; > David S. Miller <[email protected]>; Eric Dumazet > <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni > <[email protected]>; Chittim, Madhu <[email protected]>; Tantilov, > Emil S <[email protected]>; Hay, Joshua A > <[email protected]>; Alan Brady <[email protected]>; Samudrala, > Sridhar <[email protected]>; Willem de Bruijn > <[email protected]>; Shailendra Bhatnagar > <[email protected]>; Pavan Kumar Linga > <[email protected]> > Cc: Burra, Phani R <[email protected]>; intel-wired- > [email protected]; [email protected]; linux- > [email protected]; [email protected]; Breno Leitao > <[email protected]> > 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 <[email protected]> > --- > 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 <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
