Thread (4 messages) 4 messages, 4 authors, 2025-09-14

RE: [EXTERNAL] Re: [PATCH net-next] net: mana: Reduce waiting time if HWC not responding

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: 2025-09-12 17:48:10
Also in: linux-hyperv, lkml

-----Original Message-----
From: Simon Horman <horms@kernel.org>
Sent: Friday, September 12, 2025 8:29 AM
To: Haiyang Zhang <redacted>
Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Haiyang Zhang
[off-list ref]; Dexuan Cui [off-list ref]; KY Srinivasan
[off-list ref]; wei.liu@kernel.org; edumazet@google.com;
davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Long Li
[off-list ref]; ssengar@linux.microsoft.com;
ernis@linux.microsoft.com; dipayanroy@linux.microsoft.com; Konstantin
Taranov [off-list ref]; Shiraz Saleem
[off-list ref]; 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:
quoted
From: Haiyang Zhang <haiyangz@microsoft.com>

If HW Channel (HWC) is not responding, reduce the waiting time, so
further
quoted
steps will fail quickly.
This will prevent getting stuck for a long time (30 minutes or more),
for
quoted
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
quoted
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,
quoted
 	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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help