* [PATCH iwl-net v2] idpf: fix transaction timeouts on reset
@ 2024-12-20 2:09 Emil Tantilov
2025-01-06 10:44 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Emil Tantilov @ 2024-12-20 2:09 UTC (permalink / raw)
To: intel-wired-lan
Cc: netdev, larysa.zaremba, decot, willemb, anthony.l.nguyen, davem,
edumazet, kuba, pabeni, aleksander.lobakin
Restore the call to idpf_vc_xn_shutdown() at the beginning of
idpf_vc_core_deinit() provided the function is not called on remove.
In the reset path the mailbox is destroyed, leading to all transactions
timing out.
Fixes: 09d0fb5cb30e ("idpf: deinit virtchnl transaction manager after vport and vectors")
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
---
Changelog:
v2:
- Assigned the current state of REMOVE_IN_PROG flag to a boolean
variable, to be checked instead of reading the flag twice.
- Updated the description to clarify the reason for the timeouts on
reset is due to the mailbox being destroyed.
v1:
https://lore.kernel.org/intel-wired-lan/20241218014417.3786-1-emil.s.tantilov@intel.com/
Testing hints:
echo 1 > /sys/class/net/<netif>/device/reset
---
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
index d46c95f91b0d..7639d520b806 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -3077,12 +3077,21 @@ int idpf_vc_core_init(struct idpf_adapter *adapter)
*/
void idpf_vc_core_deinit(struct idpf_adapter *adapter)
{
+ bool remove_in_prog;
+
if (!test_bit(IDPF_VC_CORE_INIT, adapter->flags))
return;
+ /* Avoid transaction timeouts when called during reset */
+ remove_in_prog = test_bit(IDPF_REMOVE_IN_PROG, adapter->flags);
+ if (!remove_in_prog)
+ idpf_vc_xn_shutdown(adapter->vcxn_mngr);
+
idpf_deinit_task(adapter);
idpf_intr_rel(adapter);
- idpf_vc_xn_shutdown(adapter->vcxn_mngr);
+
+ if (remove_in_prog)
+ idpf_vc_xn_shutdown(adapter->vcxn_mngr);
cancel_delayed_work_sync(&adapter->serv_task);
cancel_delayed_work_sync(&adapter->mbx_task);
--
2.17.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH iwl-net v2] idpf: fix transaction timeouts on reset
2024-12-20 2:09 [PATCH iwl-net v2] idpf: fix transaction timeouts on reset Emil Tantilov
@ 2025-01-06 10:44 ` Simon Horman
2025-01-14 6:57 ` [Intel-wired-lan] " Singh, Krishneil K
0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2025-01-06 10:44 UTC (permalink / raw)
To: Emil Tantilov
Cc: intel-wired-lan, netdev, larysa.zaremba, decot, willemb,
anthony.l.nguyen, davem, edumazet, kuba, pabeni,
aleksander.lobakin
On Thu, Dec 19, 2024 at 06:09:32PM -0800, Emil Tantilov wrote:
> Restore the call to idpf_vc_xn_shutdown() at the beginning of
> idpf_vc_core_deinit() provided the function is not called on remove.
> In the reset path the mailbox is destroyed, leading to all transactions
> timing out.
>
> Fixes: 09d0fb5cb30e ("idpf: deinit virtchnl transaction manager after vport and vectors")
> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> ---
> Changelog:
> v2:
> - Assigned the current state of REMOVE_IN_PROG flag to a boolean
> variable, to be checked instead of reading the flag twice.
> - Updated the description to clarify the reason for the timeouts on
> reset is due to the mailbox being destroyed.
>
> v1:
> https://lore.kernel.org/intel-wired-lan/20241218014417.3786-1-emil.s.tantilov@intel.com/
>
> Testing hints:
> echo 1 > /sys/class/net/<netif>/device/reset
Thanks for the update,
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v2] idpf: fix transaction timeouts on reset
2025-01-06 10:44 ` Simon Horman
@ 2025-01-14 6:57 ` Singh, Krishneil K
0 siblings, 0 replies; 3+ messages in thread
From: Singh, Krishneil K @ 2025-01-14 6:57 UTC (permalink / raw)
To: Simon Horman, Tantilov, Emil S
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Zaremba, Larysa, decot@google.com, willemb@google.com,
Nguyen, Anthony L, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, Lobakin, Aleksander
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Simon Horman
> Sent: Monday, January 6, 2025 2:45 AM
> To: Tantilov, Emil S <emil.s.tantilov@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Zaremba, Larysa
> <larysa.zaremba@intel.com>; decot@google.com; willemb@google.com;
> Nguyen, Anthony L <anthony.l.nguyen@intel.com>; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Lobakin,
> Aleksander <aleksander.lobakin@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] idpf: fix transaction timeouts
> on reset
>
> On Thu, Dec 19, 2024 at 06:09:32PM -0800, Emil Tantilov wrote:
> > Restore the call to idpf_vc_xn_shutdown() at the beginning of
> > idpf_vc_core_deinit() provided the function is not called on remove.
> > In the reset path the mailbox is destroyed, leading to all transactions
> > timing out.
> >
> > Fixes: 09d0fb5cb30e ("idpf: deinit virtchnl transaction manager after vport
> and vectors")
> > Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
> > Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> > ---
> > Changelog:
> > v2:
> > - Assigned the current state of REMOVE_IN_PROG flag to a boolean
> > variable, to be checked instead of reading the flag twice.
> > - Updated the description to clarify the reason for the timeouts on
> > reset is due to the mailbox being destroyed.
> >
> > v1:
> > https://lore.kernel.org/intel-wired-lan/20241218014417.3786-1-
> emil.s.tantilov@intel.com/
> >
> > Testing hints:
> > echo 1 > /sys/class/net/<netif>/device/reset
>
> Thanks for the update,
>
> Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-14 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 2:09 [PATCH iwl-net v2] idpf: fix transaction timeouts on reset Emil Tantilov
2025-01-06 10:44 ` Simon Horman
2025-01-14 6:57 ` [Intel-wired-lan] " Singh, Krishneil K
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).