🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18396

Re: [PATCH net-next] net: mana: Add CQE polling as first-level TX timeout recovery

#18396
From: Sahil Chandna
Date: Wed, 18 Nov 2026 09:24
80 lines
12529 bytes
On 13-11-2026 15:46, Breno Leitao wrote:
> On Fri, Nov 13, 2026 at 02:04:08PM +0530, Sahil Chandna wrote:
>> On 12-11-2026 17:37, Breno Leitao wrote:
>>> Hello Sahil,
>>>
>>> On Thu, Nov 12, 2026 at 04:57:18AM -0600, Sahil Chandna wrote:
>>>> Implement a graduated recovery approach: on the first TX timeout (or
>>>> when the previous timeout was more than 2 minutes ago), schedule NAPI on
>>>> the stalled queue's TX CQ via napi_schedule(). This triggers
>>>> mana_poll_tx_cq() through the normal NAPI path, processing any pending
>>>> completions without relying on the interrupt and recovering
>>>> missed-interrupt scenarios without queue reset.
>>>
>>> Which interrupt is being missed here?
>>>
>> Hi Breno,
>>
>> It is the TX CQ completion interrupt. After NAPI finishes, it re-arms
>> the TX CQ. When a new CQE arrives, the hardware post EQE, which raises
>> the MSI-X and schedules NAPI. If that notification for the TX CQ is lost
>> , NAPI never runs for the TX CQ and pending_sends never drains and the
>> queue stays stopped,  so napi_schedule() polls the CQ, reaps the CQEs
>> and re-arms it.
> 
> Thanks.  Which one gets lost, the EQE or the MSI-X?
Hi Breno,

Sorry for the delay, i was checking on these with my team.
Regarding what is lost here. The patch is trying to solve the scenario
where TX CQ never arrive due to some reason, it is not handling the
MSI-X lost scenario and one of the netdev bot comment highlights the
same. Though i will work on framing commit message more clearly in next
version. Thanks !
> 
>>>> If any subsequent TX timeout fires on any queue, within 2 minutes of
>>>> the previous one, escalate to the existing port-level detach/attach
>>>> reset, as the CQE poll did not recover the queue.
>>>
>>> How was 2 minutes chosen? mana sets watchdog_timeo to 15 * HZ, no?
>> The watchdog_timeo is TX stall timeout setting i.e if a queue remains
>> stalled for this much time, it trigger watchdog timeout. Here, 2 minute
>> is not timeout/wait. The 2 minutes here is for deciding whether a new
>> queue stall event is a repeat of the previous incident or a new,
>> unrelated one that should get the cheap poll first. For e.g. if a queue
>> gets stalled, 15 * HZ sec later, timeout occurs and this patch trigger
>> manual NAPI, if another stall occurs (it can be on any queue) within 2
>> minutes of last one, the existing recovery mechanism of mana
>> detach/attach will be tried.The patch is adding a first level less
>> destructive recovery first.
>> For selecting 2 minutes, I do not have any hardware basis for it afaik,
>> but I can confirm and check with our host team as well.
> 
> So the goal is to tell an isolated stall from a wider problem.
> 
Yes, and take just a minimal step to solve it rather than entire port
detach/attach.
> A port-wide timestamp only approximates that. It cannot tell the same
> queue from another one, and since dev_watchdog() reports one queue per
> run, two queues that stall together show up ~15s apart: the first gets
> a kick, the second gets the port reset anyway, no?
> 
yes, that is correct. The approach in this patch solves first instance
of stall on any queue with CQE polling and if that does not solve it
(based on another queue stall observed) go for existing mechanism
(detach/attach), but I agree to your point here that another queue which
stall after one queue had level 1 CQE polling would have a full
detach/attach rather than level 1 polling. I will work on this in v2.
> Could mana_tx_timeout() check this directly? Look at the other TX queues
> the way dev_watchdog() does (stopped, with trans_start older than
> watchdog_timeo). If more than one is stalled, reset right away.
> 
> Otherwise kick this queue, and reset if the same queue times out again
> within a couple of watchdog periods, as gve_tx_timeout_try_q_kick()
> does. That also gets rid of the 2 minutes.
Thanks, I will go through this approach and update in v2. I am currently
discussing this internally.

Regards,
Sahil
Technical Details
Message-ID: <d739628d-ae56-4543-b15d-a7976ab8f92b@linux.microsoft.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365980-linux-kernel-netdev=dewy.ru
References: <20261112105752.978446-1-sahilchandna@linux.microsoft.com> <avWrMQK_DuZ1hAwD@gmail.com> <fc2ae552-86ee-40af-a997-454c2d3b176d@linux.microsoft.com> <avbdPt1WSC9qEuYw@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365980-linux-kernel-netdev=dewy.ru
From: sahilchandna@linux.microsoft.com (Sahil Chandna)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] net: mana: Add CQE polling as first-level TX
 timeout recovery
Date: Wed, 18 Nov 2026 14:54:58 +0530
Organization: Usenet Network
Message-ID: <d739628d-ae56-4543-b15d-a7976ab8f92b@linux.microsoft.com>
References: <20261112105752.978446-1-sahilchandna@linux.microsoft.com>
 <avWrMQK_DuZ1hAwD@gmail.com>
 <fc2ae552-86ee-40af-a997-454c2d3b176d@linux.microsoft.com>
 <avbdPt1WSC9qEuYw@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2553916"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:9Rfz2C3RSfW2FnB0rO44wDT3RJI= sha256:LCcZsVBr0h1rwBktPFG2gAuypeFbpDPl8uXnXCHjLj8=
	sha1:weIZlfK+wWZo2Z81hnFUA+x/OJg= sha256:p6vnz62FOu3yTwQ+CLkoNxh0BxRcKxtYqRXTrKvGJRg=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id A1962115214; Wed, 18 Nov 2026 12:25:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.microsoft.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id KU0W-U2j_1lX;
	Wed, 18 Nov 2026 12:25:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-365980-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0A0461151CF; Wed, 18 Nov 2026 12:25:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 49784360E6; Wed, 18 Nov 2026 09:25:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1794993906;
	b=ILVBMPneHkxPT2D/H6rXkSx3FWzeXagL1lHX0h2oQgmYoAxajhSmm5qDcpdIi1MT8qRh
	 ULSH9lVUy1EfSGSvJoJlvp2wzcRbLX5aMl029my155mIVnjBWNLwAH/sDt4Pi8VshljDS
	 BFVMNgj4w4ZUCepCPluMFW4GDYAMcXgyATzMEvXP7MMTB9jcLBjMCPpNJ99bQcB92v3GI
	 FkZBpYmBuL3hF0/PcqP6BlJ72ntLfBiGcX3dAZq4qUHlyfu4TVqj+k4hXgeo2wWTmBOF1
	 X40Kdqu6XAsCvPMSqVDU1QaFV4Kz3UD3/tEKCCO6IoTYt114gVZJXiV8qg5z6oEsLow==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794993906;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Filter:
	 DKIM-Signature:Message-ID:Date:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
	 From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=k4+R43wkQ5coZwEY7y2Wgwoj0XAwBzUTWTsiGrCMIT0=;
	b=HzRLF75F1R5iiwUtBPaoadvaiDDevU9JM2H6F7WE9Oy7jiAA28YUJEku+RqVBPNiISMA
	 dPwIFkEG70UPIIipHii91y6saiSXJMPuA5qPmYFBEpah+LIp5UuZ6vbUWqP4jcH51tXEq
	 wgGiQvrbxSyYt+/B3sASoxB/lup8Qe+MfjdzQUeDP76j5yWrKXw/O5GQVTxp/3w9Hzoav
	 KYjcimbNI6ALfTuq6k6bV05UOz61WABbHEoPXQmri9TDBomV96PT7Eq7C6Xq9+f8ufLs2
	 FZbyhqLwlyg2GXJSkJtLX2HbeKQd8I22fakxbwRdJCqjAqZLa8ytChMz3j4gvZTjSqg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b="M/Dw6inN";
	dmarc=pass header.from=linux.microsoft.com;
	spf=pass smtp.mailfrom=linux.microsoft.com;
	arc=fail smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BB0B606A338;
	Wed, 18 Nov 2026 09:25:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=M/Dw6inN
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=13.77.154.182
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794993905;
	b=wbDxYoqd0xQHku6piz1G6rOIHIKZD758S3m9excd2Ey3Oup8zJT6/Hh66KXxMh30NppU
	 uGMoj9uUSeiTtXDjf+2LkmdZ13P9rPFYw3JZdamo8Q7oUz2qL6OaDngnoyfOl2yZbopnr
	 ewu1uOoc6DjtAcZg7pho5EhH8/dageoAftYOUfxfu9RmHIVlDJOXrwMAQ9PEn5VjlzZa4
	 XVGzi8t6qkVI3zhbCRS2xOmeSjhj6erajpQlaAkpZFruGmiDGiYluTAeN0adIzl6pOmNz
	 UMgvkUxQmNrJwoWSbJUP04aPQ7FnkdC1y00eleJwyKGw5zqiT4AE+pV3DXo0v/bXk2A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794993905;
	h=DMARC-Filter:Received:DKIM-Filter:DKIM-Signature:Message-ID:Date:
	 MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
	 From:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Spam-Status:
	 X-Spam-Checker-Version;
	bh=k4+R43wkQ5coZwEY7y2Wgwoj0XAwBzUTWTsiGrCMIT0=;
	b=0wLx6LZoUHc1e8D+CjrruphUN22lyFtOPuiIX4EFjA/jbB9Q5u7a/Nfz0z0v7UXNKj2Q
	 PPwLuXFCueLiSe7vcswVOZE2ujiUX942OqP9ihr5sHseqdgjweO98Rqx0h1Ed31phaAfi
	 TrmsC3Aid9+j5uVcYxgojmuWiiu/UGCiy7OQkeuID1zgefPb/fXWX6L4J5I0LzCBI6HI/
	 27Q9a1fdaYprrCORsgfu2Pcv74FKEfOsialVjAU2RZYv2fmZpqgn9nPsK0YWuW0mPb/uy
	 LtEOmLYvANiNaWw6UomgvYllEJwf9PKAlAuX3dI4AI+P3+72rabn74KygikIkEBsviA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.microsoft.com;
	spf=pass smtp.mailfrom=linux.microsoft.com;
	dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b="M/Dw6inN";
	arc=none smtp.remote-ip=13.77.154.182
X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E88A606A31C;
	Wed, 18 Nov 2026 09:25:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2E88A606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com
X-Received: from [10.26.7.43] (unknown [4.213.232.23])
	by linux.microsoft.com (Postfix) with ESMTPSA id 996FB20B7169;
	Wed, 18 Nov 2026 01:24:59 -0800 (PST)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 996FB20B7169
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
	s=default; t=1794993903;
	bh=k4+R43wkQ5coZwEY7y2Wgwoj0XAwBzUTWTsiGrCMIT0=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=M/Dw6inNHz55R75Vl0dUx8c1XG7vMvdfPiYaAdYX0UkRIq93SU6DVHfSG96WyVPW1
	 fe0YQFyR9Zh9HiuM2pFWjrQo18F80YdyTozEf5VCK4apalCthdahp9zhekAcAqJ7WN
	 3yNwzPrlDjcytOKWsiRVL+QjP9kzjYwU5yYfq3hM=
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
 andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com, weh@microsoft.com,
 kotaranov@microsoft.com, horms@kernel.org, ernis@linux.microsoft.com,
 gargaditya@linux.microsoft.com, linux-hyperv@vger.kernel.org,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-rdma@vger.kernel.org
X-In-Reply-To: <avbdPt1WSC9qEuYw@gmail.com>