Skip to content

Commit 19cba17

Browse files
committed
idpf: avoid mailbox timeout delays during reset
JIRA: https://issues.redhat.com/browse/RHEL-79685 commit 9dc63d8 Author: Emil Tantilov <emil.s.tantilov@intel.com> Date: Thu May 8 11:47:15 2025 -0700 idpf: avoid mailbox timeout delays during reset Mailbox operations are not possible while the driver is in reset. Operations that require MBX exchange with the control plane will result in long delays if executed while a reset is in progress: ethtool -L <inf> combined 8& echo 1 > /sys/class/net/<inf>/device/reset idpf 0000:83:00.0: HW reset detected idpf 0000:83:00.0: Device HW Reset initiated idpf 0000:83:00.0: Transaction timed-out (op:504 cookie:be00 vc_op:504 salt:be timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:508 cookie:bf00 vc_op:508 salt:bf timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:512 cookie:c000 vc_op:512 salt:c0 timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:510 cookie:c100 vc_op:510 salt:c1 timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:509 cookie:c200 vc_op:509 salt:c2 timeout:60000ms) idpf 0000:83:00.0: Transaction timed-out (op:509 cookie:c300 vc_op:509 salt:c3 timeout:60000ms) idpf 0000:83:00.0: Transaction timed-out (op:505 cookie:c400 vc_op:505 salt:c4 timeout:60000ms) idpf 0000:83:00.0: Failed to configure queues for vport 0, -62 Disable mailbox communication in case of a reset, unless it's done during a driver load, where the virtchnl operations are needed to configure the device. Fixes: 8077c72 ("idpf: add controlq init and reset checks") Co-developed-by: Joshua Hay <joshua.a.hay@intel.com> Signed-off-by: Joshua Hay <joshua.a.hay@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Samuel Salin <Samuel.salin@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
1 parent 4870a18 commit 19cba17

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,11 +1815,19 @@ void idpf_vc_event_task(struct work_struct *work)
18151815
if (test_bit(IDPF_REMOVE_IN_PROG, adapter->flags))
18161816
return;
18171817

1818-
if (test_bit(IDPF_HR_FUNC_RESET, adapter->flags) ||
1819-
test_bit(IDPF_HR_DRV_LOAD, adapter->flags)) {
1820-
set_bit(IDPF_HR_RESET_IN_PROG, adapter->flags);
1821-
idpf_init_hard_reset(adapter);
1822-
}
1818+
if (test_bit(IDPF_HR_FUNC_RESET, adapter->flags))
1819+
goto func_reset;
1820+
1821+
if (test_bit(IDPF_HR_DRV_LOAD, adapter->flags))
1822+
goto drv_load;
1823+
1824+
return;
1825+
1826+
func_reset:
1827+
idpf_vc_xn_shutdown(adapter->vcxn_mngr);
1828+
drv_load:
1829+
set_bit(IDPF_HR_RESET_IN_PROG, adapter->flags);
1830+
idpf_init_hard_reset(adapter);
18231831
}
18241832

18251833
/**

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static void idpf_vc_xn_init(struct idpf_vc_xn_manager *vcxn_mngr)
376376
* All waiting threads will be woken-up and their transaction aborted. Further
377377
* operations on that object will fail.
378378
*/
379-
static void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr)
379+
void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr)
380380
{
381381
int i;
382382

drivers/net/ethernet/intel/idpf/idpf_virtchnl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,6 @@ int idpf_send_get_stats_msg(struct idpf_vport *vport);
6666
int idpf_send_set_sriov_vfs_msg(struct idpf_adapter *adapter, u16 num_vfs);
6767
int idpf_send_get_set_rss_key_msg(struct idpf_vport *vport, bool get);
6868
int idpf_send_get_set_rss_lut_msg(struct idpf_vport *vport, bool get);
69+
void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr);
6970

7071
#endif /* _IDPF_VIRTCHNL_H_ */

0 commit comments

Comments
 (0)