From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796425141; b=e/L3rdX4+LLZXsjdroRRyYtJG24/6+FGVFME67WcYDvB7NAECVYhh+ihoFR9zSngPIYn BX2E4Dj4C6pr5YqnWCkqv/ruYAQDHD42/o+OI8OKcx6EwlbVvSDJGTcjV1aSf+0p5J6mL WMFSsMef37ngQfqZN5SnRM9gJzy+P9OzsxzX3N4zq28T0fRp2oydfuoDf1WWxwn7MkILu xDzNklbXrjvyPAVQhaSgBOcxYjGYdK+0XypVkqMggWy1eQhzWYt8NH0am8WUJ0zob2Fn+ 9021qd7nAh4lU1YRoFvx2sRLyIJaJzImw+aN+omVrpfelXG+sL5eINwBZCwg0K+r5QA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796425141; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Date:From:To:Cc: Subject:Message-ID:Mail-Followup-To:References:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To; bh=amg4aX5L9Kv7thRdHJIYsz40BJboVSAtGP6U9UZnV8k=; b=Zka7Lar2DJIN8tJXlg25xFo+mOQtITG2G8EmgirsS+XjRBjmB5G5GoVOpuCGLM6plKyo Xv064UiVWVaYXeSbeHHsiONSQtXRNh4jx4nHMMnCfiHgljrnmrIpc/7lvofNSgzEccPLN nPTnP/AZGeJcf+w9LZ7PIRTol9VL/Pqi3GJD2YhXB0nmNQKAQOUL9QbeLT+gO1seNSdRJ ocSuXHTAyxZyLQ2MKhQ7Daz+8w1il9eDhyMMFSrxG/CeW0mewUCsBVn5Ixe/snrXG6Cwo oBZu73BsFoVMmNW597gaw25+gbYwhcHd5RqDAhBu85R82idQD2nfYIP/ulm6bDRuRqQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=dama.to; spf=none smtp.mailfrom=dama.to; dkim=pass header.d=dama-to.20260707.gappssmtp.com header.i=@dama-to.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=kP+nRq2y; arc=none smtp.remote-ip=209.85.214.170 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54FA1606A322 for ; Fri, 4 Dec 2026 22:59:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 54FA1606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=dama-to.20260707.gappssmtp.com header.i=@dama-to.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=kP+nRq2y Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2f04ad2c46dso8607075ad.2 for ; Fri, 04 Dec 2026 14:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dama-to.20260707.gappssmtp.com; s=20260707; t=1796425139; x=1797029939; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:mail-followup-to:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=amg4aX5L9Kv7thRdHJIYsz40BJboVSAtGP6U9UZnV8k=; b=kP+nRq2y9WrSdchCp7lxSF3mvBliSRP98y+KVYu6z/Intc6SSrhsogF7ZY7H0NUudK JfKSwHTTKE3cFSg9Kke4GhGzqbsYsDLCMsnfJoDwS/r6w7xKKpgAyWTPEsQYccALav2X m/nWOhxn7VR9SuHo2ax0WtfU7AGZHGYqBVBsj14EX4pm+biXlvoTrphh7lEmxSJ7jKkV gHLHe3jCfocjBbixl56dmf2EdsK3xqol/by+pjxvBFtmgdML3jsGuNx34k0mMyp/+Uzu ymKkGMq/rGCVjBb9v7Ba1ItwQvpOYhrM/8FDvyWkhGFrBD4rskz3MvDOCVhn7OuxaGi4 pKLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796425139; x=1797029939; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:mail-followup-to:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=amg4aX5L9Kv7thRdHJIYsz40BJboVSAtGP6U9UZnV8k=; b=WtiafK/7JeMFSExPadxxZiZdp2XhIipG6LbgB/8swNduTw6bIau4JeJ8t7Qp2p0vlN WJID/in90ODLHMZZ5KX3GnPg012ka8uqI/Yk3n0KEV+P4b9L9ADXta92bMBgn+mGHFnf GiOXAyHNfrAVEyY1Ju4xzDZtJC9mBH5/Y9ajcHaHpTRt1TEaQLedyGJD/jSXF8I14e3w xYPeLxIOoDix4Pn1YCqoMc2+tIAfljYhVrl3Jk9auoR0ysZZ3TimPsAXArBeEaZ2b/RW DOU86cE0UPHp333AZPIsTQiZMuEiWDgZIzee3N5soXsURRvYhZn7f+JiT6pvts/fOnbN 8AUA== X-Gm-Message-State: AB4q+uEqO9Cy5o52Qt/DYF4rbf7U8icOZ5TpsxSNN+oGxUvPscNy6z/4 cLE/+3lxzjwNccTb9igW6b9Crz9vEy1FAsfxGN4Mspu52hTfxVYjLmFH6kgxs+F1D5M= X-Gm-Gg: AZFdTZdLcvfgAedMPEoHvCutekevxOywrssZU6mgM31N+ILwWJcguGFkSwm4ArM+4Iz ++dyd7eXxXHvx34QRG4fDTrEyqjEsQqPXehTLeRTy5+LRP4Y8kCAqOcBmGP5zsPjuPTsKyF+0B/ 6ix9QsqHbsWTemU0UueOc4JrsvfZCsNH0eokzOSDBS83OFiRnb7jk+e8D/uE15f1VLyny96kA75 VzROGfYIUy66ARrSGGRwFmzMPWYr7M0G1r1MLx9Qd9NDqGn+xGEp9beLe4eBQHXjtuOhCU7AYPz fAgJovO6C9qnJlOaSY3d/RGAKHpmPgaYQQ0TxzVsfuAZSowtxzVO8VScEoAngb18etAm17Ek+TD AVjZJjfFE805MlUQu1EUuVnaq7pCo7V0rkBCT3COk1yMsygWfEy7vKTv6kz6F9zkPcNPZtnWTCE MXEem8GdHi9sL2PDSgbu16xHf9Eahs4ym45K636kQa/T7T+5HudOc5uOpKT/waLVInyy6OuHvU/ ZWiI6z05Jwd3lqn1kYHErbm1UCcqLCSsxmhAJZ2eINVlKFV1uRDRa5CUxOnQpWwwUMcBNhrEat/ Z/HeAqN+duKqSfrVFlrJX5OaLOrHJ59Dth8ylM4qI9VkYH2ZbVtnHsfjhHmPAl8= X-Received: by 2002:a17:90b:4c50:b0:3ad:eb38:9778 with SMTP id 98e67ed59e1d1-3b5e06d58c2mr3031976a91.48.1796425139485; Fri, 04 Dec 2026 14:58:59 -0800 (PST) Received: from localhost ([2a03:2880:2ff:72::]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b6166c6149sm553113a91.2.2026.12.04.14.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 14:58:58 -0800 (PST) Date: Fri, 4 Dec 2026 14:58:58 -0800 From: Joe Damato To: Michael Chan Cc: netdev@vger.kernel.org, Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: Re: [PATCH net] bnxt_en: Fix NIC lockup caused by stale NQ consumer index Message-ID: Mail-Followup-To: Joe Damato , Michael Chan , netdev@vger.kernel.org, Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni References: <20261204200334.2294555-1-joe@dama.to> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Dec 04, 2026 at 02:22:49PM -0800, Michael Chan wrote: > On Fri, Dec 4, 2026 at 12:03 PM Joe Damato wrote: > > > @@ -3419,10 +3420,18 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget) > > > > __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL, > > budget); > > + nq_moved = raw_cons != cpr->cp_raw_cons; > > cpr->cp_raw_cons = raw_cons; > > - if (napi_complete_done(napi, work_done)) > > + if (napi_complete_done(napi, work_done)) { > > BNXT_DB_NQ_ARM_P5(&cpr->cp_db, > > cpr->cp_raw_cons); > > + } else if (nq_moved) { > > + /* NAPI stays scheduled (IRQ deferral or busy > > + * poll) and the NQ is not re-armed, but the > > + * HW must still learn how far it was consumed. > > + */ > > + BNXT_DB_NQ_P5(&cpr->cp_db, cpr->cp_raw_cons); > > I will check with the HW/FW teams to understand why this is needed. > If we finish polling within budget, the completion rings should be > armed and our NQ should be big enough for any new entries without > updating the NQ doorbell. I'll get back to you in a few days. > Thanks. Thanks for taking a look and following up internally. I agree that a single poll can't overflow the NQ. The problem is that many polls in a row can skip the NQ doorbell write. With defer_hard_irqs, any poll with work_done > 0 resets the defer count, so napi_complete_done() keeps returning false under steady traffic. Busy poll always returns false. Each of those polls re-arms the CQs and consumes the new NQEs, but the consumer index the HW sees never moves. The end-of-loop write doesn't help a TX-heavy NAPI. TX completions don't count toward the budget, so a TCP sender, whose only RX is ACKs, stays under budget and never reaches it. FWIW, FW 225 didn't seem to reproduce this issue so it is possible that something changed between FW 225 and the more recent FWs or that maybe my test on FW 225 wasn't right for some reason. Not sure. In any case, I'd encourage the folks on your side to test the reproducer on different FW versions and see if you can repro. I tested it a few times on FW 238 and it repro'd every time within seconds.