* [PATCH net-next] net: mana: Reduce waiting time if HWC not responding @ 2025-09-10 20:57 Haiyang Zhang 2025-09-12 12:28 ` Simon Horman 2025-09-14 19:00 ` patchwork-bot+netdevbpf 0 siblings, 2 replies; 4+ messages in thread From: Haiyang Zhang @ 2025-09-10 20:57 UTC (permalink / raw) To: linux-hyperv, netdev Cc: haiyangz, decui, kys, wei.liu, edumazet, davem, kuba, pabeni, longli, ssengar, ernis, dipayanroy, kotaranov, shirazsaleem, andrew+netdev, linux-kernel From: Haiyang Zhang <haiyangz@microsoft.com> If HW Channel (HWC) is not responding, reduce the waiting time, so further steps will fail quickly. This will prevent getting stuck for a long time (30 minutes or more), for example, during unloading while HWC is not responding. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> --- drivers/net/ethernet/microsoft/mana/hw_channel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c index ef072e24c46d..ada6c78a2bef 100644 --- a/drivers/net/ethernet/microsoft/mana/hw_channel.c +++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c @@ -881,7 +881,12 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len, if (!wait_for_completion_timeout(&ctx->comp_event, (msecs_to_jiffies(hwc->hwc_timeout)))) { if (hwc->hwc_timeout != 0) - dev_err(hwc->dev, "HWC: Request timed out!\n"); + dev_err(hwc->dev, "HWC: Request timed out: %u ms\n", + hwc->hwc_timeout); + + /* Reduce further waiting if HWC no response */ + if (hwc->hwc_timeout > 1) + hwc->hwc_timeout = 1; err = -ETIMEDOUT; goto out; -- 2.34.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding 2025-09-10 20:57 [PATCH net-next] net: mana: Reduce waiting time if HWC not responding Haiyang Zhang @ 2025-09-12 12:28 ` Simon Horman 2025-09-12 17:48 ` [EXTERNAL] " Haiyang Zhang 2025-09-14 19:00 ` patchwork-bot+netdevbpf 1 sibling, 1 reply; 4+ messages in thread From: Simon Horman @ 2025-09-12 12:28 UTC (permalink / raw) To: Haiyang Zhang Cc: linux-hyperv, netdev, haiyangz, decui, kys, wei.liu, edumazet, davem, kuba, pabeni, longli, ssengar, ernis, dipayanroy, kotaranov, shirazsaleem, andrew+netdev, linux-kernel On Wed, Sep 10, 2025 at 01:57:21PM -0700, Haiyang Zhang wrote: > From: Haiyang Zhang <haiyangz@microsoft.com> > > If HW Channel (HWC) is not responding, reduce the waiting time, so further > steps will fail quickly. > This will prevent getting stuck for a long time (30 minutes or more), for > example, during unloading while HWC is not responding. > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > --- > drivers/net/ethernet/microsoft/mana/hw_channel.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c > index ef072e24c46d..ada6c78a2bef 100644 > --- a/drivers/net/ethernet/microsoft/mana/hw_channel.c > +++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c > @@ -881,7 +881,12 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len, > if (!wait_for_completion_timeout(&ctx->comp_event, > (msecs_to_jiffies(hwc->hwc_timeout)))) { > if (hwc->hwc_timeout != 0) > - dev_err(hwc->dev, "HWC: Request timed out!\n"); > + dev_err(hwc->dev, "HWC: Request timed out: %u ms\n", > + hwc->hwc_timeout); > + > + /* Reduce further waiting if HWC no response */ > + if (hwc->hwc_timeout > 1) > + hwc->hwc_timeout = 1; Hi, Perhaps it is already the case, but I'm wondering if the configured value of hwc_timeout should be restored at some point. > > err = -ETIMEDOUT; > goto out; > -- > 2.34.1 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXTERNAL] Re: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding 2025-09-12 12:28 ` Simon Horman @ 2025-09-12 17:48 ` Haiyang Zhang 0 siblings, 0 replies; 4+ messages in thread From: Haiyang Zhang @ 2025-09-12 17:48 UTC (permalink / raw) To: Simon Horman, Haiyang Zhang Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, Dexuan Cui, KY Srinivasan, wei.liu@kernel.org, edumazet@google.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, Long Li, ssengar@linux.microsoft.com, ernis@linux.microsoft.com, dipayanroy@linux.microsoft.com, Konstantin Taranov, Shiraz Saleem, andrew+netdev@lunn.ch, linux-kernel@vger.kernel.org > -----Original Message----- > From: Simon Horman <horms@kernel.org> > Sent: Friday, September 12, 2025 8:29 AM > To: Haiyang Zhang <haiyangz@linux.microsoft.com> > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Haiyang Zhang > <haiyangz@microsoft.com>; Dexuan Cui <decui@microsoft.com>; KY Srinivasan > <kys@microsoft.com>; wei.liu@kernel.org; edumazet@google.com; > davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Long Li > <longli@microsoft.com>; ssengar@linux.microsoft.com; > ernis@linux.microsoft.com; dipayanroy@linux.microsoft.com; Konstantin > Taranov <kotaranov@microsoft.com>; Shiraz Saleem > <shirazsaleem@microsoft.com>; andrew+netdev@lunn.ch; linux- > kernel@vger.kernel.org > Subject: [EXTERNAL] Re: [PATCH net-next] net: mana: Reduce waiting time if > HWC not responding > > On Wed, Sep 10, 2025 at 01:57:21PM -0700, Haiyang Zhang wrote: > > From: Haiyang Zhang <haiyangz@microsoft.com> > > > > If HW Channel (HWC) is not responding, reduce the waiting time, so > further > > steps will fail quickly. > > This will prevent getting stuck for a long time (30 minutes or more), > for > > example, during unloading while HWC is not responding. > > > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > > --- > > drivers/net/ethernet/microsoft/mana/hw_channel.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c > b/drivers/net/ethernet/microsoft/mana/hw_channel.c > > index ef072e24c46d..ada6c78a2bef 100644 > > --- a/drivers/net/ethernet/microsoft/mana/hw_channel.c > > +++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c > > @@ -881,7 +881,12 @@ int mana_hwc_send_request(struct hw_channel_context > *hwc, u32 req_len, > > if (!wait_for_completion_timeout(&ctx->comp_event, > > (msecs_to_jiffies(hwc->hwc_timeout)))) { > > if (hwc->hwc_timeout != 0) > > - dev_err(hwc->dev, "HWC: Request timed out!\n"); > > + dev_err(hwc->dev, "HWC: Request timed out: %u ms\n", > > + hwc->hwc_timeout); > > + > > + /* Reduce further waiting if HWC no response */ > > + if (hwc->hwc_timeout > 1) > > + hwc->hwc_timeout = 1; > > Hi, > > Perhaps it is already the case, but I'm wondering if the configured > value of hwc_timeout should be restored at some point. Yes it's already the case: when the driver does reset/recovery, or gets a timeout-value-message from the NIC, the time out value will be updated. Thanks, - Haiyang ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding 2025-09-10 20:57 [PATCH net-next] net: mana: Reduce waiting time if HWC not responding Haiyang Zhang 2025-09-12 12:28 ` Simon Horman @ 2025-09-14 19:00 ` patchwork-bot+netdevbpf 1 sibling, 0 replies; 4+ messages in thread From: patchwork-bot+netdevbpf @ 2025-09-14 19:00 UTC (permalink / raw) To: Haiyang Zhang Cc: linux-hyperv, netdev, haiyangz, decui, kys, wei.liu, edumazet, davem, kuba, pabeni, longli, ssengar, ernis, dipayanroy, kotaranov, shirazsaleem, andrew+netdev, linux-kernel Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 10 Sep 2025 13:57:21 -0700 you wrote: > From: Haiyang Zhang <haiyangz@microsoft.com> > > If HW Channel (HWC) is not responding, reduce the waiting time, so further > steps will fail quickly. > This will prevent getting stuck for a long time (30 minutes or more), for > example, during unloading while HWC is not responding. > > [...] Here is the summary with links: - [net-next] net: mana: Reduce waiting time if HWC not responding https://git.kernel.org/netdev/net-next/c/c4deabbc1abe You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-14 19:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-09-10 20:57 [PATCH net-next] net: mana: Reduce waiting time if HWC not responding Haiyang Zhang 2025-09-12 12:28 ` Simon Horman 2025-09-12 17:48 ` [EXTERNAL] " Haiyang Zhang 2025-09-14 19:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox