Article View: linux.kernel.netdev
Article #26298[PATCH net] bnxt_en: Acknowledge the NQ before completing NAPI
From: Björn Töpel
Date: Thu, 03 Dec 2026 11:23
Date: Thu, 03 Dec 2026 11:23
49 lines
9612 bytes
9612 bytes
On P5 and newer chips, NAPI tells the device how far it read the NQ
with a doorbell. Currently, a poll that finds the NQ empty does so
only with the IRQ re-arm, after napi_complete_done() returns true. It
returns false while busy polling or deferring IRQs, so a NAPI that
completes without re-arming never frees the notifications it reads.
Once the NQ is full, the device stops notifying of RX and TX
completions. TX times out, the reset fails to free and allocate rings,
and the device stays down.
Acknowledge what was read before completing NAPI, while the poll still
owns it. In IRQ mode the re-arm follows with the same index.
Found from the console logs of a BCM57504 in real use. Normal traffic
with deferred IRQs, e.g napi_defer_hard_irqs 100, gro_flush_timeout
200000, lost the device in 19 seconds at 0.1 Mpps of 1500B UDP to one
queue. Also seen on the WIP AF_XDP series running preferred busy
polling. Both pass with this patch.
Fixes: 0fcec9854ab4 ("bnxt_en: Add new NAPI poll function for 57500 chips.")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 85ce4b2e297e..9f8ceca047f7 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3419,7 +3419,14 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget)
__bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL,
budget);
- cpr->cp_raw_cons = raw_cons;
+ /* Busy polling and deferred IRQs keep the NQ disarmed.
+ * Free what was read while the NAPI is still ours, or
+ * the NQ fills up and the device stops notifying.
+ */
+ if (raw_cons != cpr->cp_raw_cons) {
+ cpr->cp_raw_cons = raw_cons;
+ BNXT_DB_NQ_P5(&cpr->cp_db, raw_cons);
+ }
if (napi_complete_done(napi, work_done))
BNXT_DB_NQ_ARM_P5(&cpr->cp_db,
cpr->cp_raw_cons);
base-commit: 7c13d5d5afb4ba2e8634fe5aa0a9f2bca235cb4b
--
2.53.1
Technical Details
Message-ID:
<20261203112343.3524699-1-bjorn@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376517-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376517-linux-kernel-netdev=dewy.ru From: bjorn@kernel.org (Björn Töpel) Newsgroups: linux.kernel.netdev Subject: [PATCH net] bnxt_en: Acknowledge the NQ before completing NAPI Date: Thu, 3 Dec 2026 12:23:39 +0100 Organization: Usenet Network Message-ID: <20261203112343.3524699-1-bjorn@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2471795"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ESceY43hPjM0w+f+mNrRmU7/oPk= sha256:TIZ3ud7Li5WT9G5WE2WnjIVqqieGitJUIB6Usws7r5w= sha1:vC4ooisxCr27oOXfKZpVSBMTALw= sha256:eyVJ3EFLKO6RvVuKl4xBiXh7QGOMkkKrGHEgGf1yH04= 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 E3FE41178EA; Thu, 3 Dec 2026 14:24:04 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 (2048-bit key) header.d=kernel.org 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 af5KJ5wtSh6N; Thu, 3 Dec 2026 14:24:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376517-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 0446B1178D0; Thu, 3 Dec 2026 14:23:53 +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 32C852A560; Thu, 3 Dec 2026 11:23:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796297032; b=YyOChe3saXEoOKVUVwZ/JAdCQPl5mgWw1bJRipiXPkOnRKV/41qiFU4kzR+Jf9VM2igU 5kIT/neltEfWxIaZ712Htcyr61QOabZ1YTsM7V5q0ZLhLPNLYTo5WSLTdQkuG1u0R91Dg t146Q3URszzimJjUJ8bZCkujdBrgBWa05X+bNTRJBcc8yxAxrLZDjbKMG1sKexoYXcRzO wJPU1R1MR+GYSKEC5TjUVxa4LJdaTqIOkrJQnBunwhXLsYFsxGenozBPKH5gSsyvLN08w FL3pir7b0qx4R2Hj8mLoV1UEMrTnnT2sMDIVBXKq8J6sDTQkFpRuY/GY1jafcPpY4QQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796297032; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=+kEUTmNVOjIXQh29NSNB/CsgvWztiHSdTE5Daa3vqzU=; b=HyLlVMXLIEqIu916u0tNaxqzAnaAdgP9OnNM5BrHPVapuZxIf3MSdyHhDJ7IoTi6RDxX 22RhxUSP/3pdcSWr25b1b/NCfomkc1RuQDqd4RGlMtzDKKrejFya2VchcS0qLaA9mXqWH 0qV0aENZW7Tx++6SwjhNLW24mMVDhbXqthbLZYEWllwkj9Y5BZbaqeISkPmeZecKjX2qz oLjqJEUbJrl/j0TtgyT0se7oERPrGKKVhNcIEIVHHVsRoorwGlrLY/xHCZW5Jwa9+JY+e bnW0Bsc1+mKCnfAEEinAJHDhOhYdmw1TVcMsMVSP3cIEd+hAXsrcHhephXb4/PwK46w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZiK6BGsH; arc=pass header.oldest-pass=0 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 0B8C5606A333; Thu, 3 Dec 2026 11:23:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZiK6BGsH X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796297031; b=IrSxMU/KiUFb6wllny9xRzKF9rF5OpiGV56JaQwuUzdnrc7q+HrVF31PGXoNTOLa47Kd cuxYA+kkr0Z/VriFK01Q5T5A0qRTBJHP7+f8D7q4Us787x94Qnr/Z2NwsExykPdPT/4jx 68h5XD1M0rSfOBO7sbn6A2AFZ7DJQ9XlUVNYwJrqHO8DpQMorT3TJk123yrxBTogyEBH5 ClNKEaanWfJAsHMmuKWH7Yirl1teCCgQ7j1m59LNo0Xe1GLYToWbwHXfXpstmmSTMZkga czPEccbCeR5CWO473+NWyaQt1+Fh5D6OdI7R0MWIQsSCDWWjLo01nxlkHEe/r8nbUcQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796297031; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=+kEUTmNVOjIXQh29NSNB/CsgvWztiHSdTE5Daa3vqzU=; b=JDZx86zbKuaMWJOvhdKlnF3+gcw0bl5A6UBqq0KU0naz0hibCRzGzbvUevgmVt9aKzZO CJbQQWm7hHXVmMsDVpSSfGiPvR64kZqO1RRRNVmDReEowHNN56FDHIE42xWnRJ1geeQQs kAMnVfGUg5C0uJ+MeGBbvKlsDo7T+zv6/zQadcz6XSzV1Fr58Bb37HzrJr/gtF4V/VhEz lHGQZuHb60kIJmTnlQ7Uj+mJfCuFc6sJw7OSpJ8JWVzNki5RtNhpqZWLF8iu/c8oCZlJn zucknbqLlMx5dl/EOGlI98V5Rjiq2jhgqYIL+uUQNJ4L2b/9mpZEtq1NSYGwoMGz2Lw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZiK6BGsH; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2887B606A322 for <netdev@vger.kernel.org>; Thu, 3 Dec 2026 11:23:50 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4EEE1F00893; Thu, 3 Dec 2026 11:23:48 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796297030; bh=+kEUTmNVOjIXQh29NSNB/CsgvWztiHSdTE5Daa3vqzU=; h=From:To:Cc:Subject:Date; b=ZiK6BGsH6YR1rI0X2aIr7BMa+usxK0ohan++o5dhN1NTrtgH0ru7W1F3TW13rT5S9 5e631NiTfv8+vcuDZKawuegrAkjDB+wdARFo4xP2tIUyKoiGL0jt8lPKXm1mFfF9hD nrk0Ao102F20T90ZzWELlPl6Kz0ycDZFMnyoWfBeuCW0K6hUyjGJpgdED2LEB349Va 5oemgPK15cmWgxKfFM5OlLGGLA7zGk8mpoE+qNWofiNDai+V4SHw1jQIDTpoeG1RcH lgBzZlcgJ0DDJZjNVesw6yB8grheKlDzZHyAFXffIzCZAna8ZNX/cZC7diHtJxVEoU 0hqylSAIKvfXQ== X-Cc: Björn Töpel <bjorn@kernel.org> X-Mailer: git-send-email 2.56.1 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