Skip to content

Commit b31692e

Browse files
committed
idpf: avoid mailbox timeout delays during reset
jira LE-3467 Rebuild_History Non-Buildable kernel-4.18.0-553.58.1.el8_10 commit-author Emil Tantilov <emil.s.tantilov@intel.com> commit 9dc63d8 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> (cherry picked from commit 9dc63d8) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent de41e80 commit b31692e

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
@@ -1817,11 +1817,19 @@ void idpf_vc_event_task(struct work_struct *work)
18171817
if (test_bit(IDPF_REMOVE_IN_PROG, adapter->flags))
18181818
return;
18191819

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

18271835
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static void idpf_vc_xn_init(struct idpf_vc_xn_manager *vcxn_mngr)
385385
* All waiting threads will be woken-up and their transaction aborted. Further
386386
* operations on that object will fail.
387387
*/
388-
static void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr)
388+
void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr)
389389
{
390390
int i;
391391

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)