From nobody Thu Oct 29 23:37:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jG0y13Yqqz6xqvQ for ; Thu, 29 Oct 2026 23:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jG0y06RKKz4sjd for ; Thu, 29 Oct 2026 23:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793317033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJtfdCa2AAoVHDNMH5IBF3XFjPPbTrXsUT9sPJH7QNw=; b=apgqSEsNfQDQ8MmExrZSrz6ghL9muLOBes1pDG/kLzSjL+FkLUKeYxecRaqzA1/24nAk8I 5da6IUXWRNJodp1BZE3lwV1FZoUzf6GekTQrZNAUI4DvUYuPll2RK+UCKvQCGB0LqWw+qA G/un1NaSAvVHY1Xx9sfDs/Ncqhsk0tVhIRJG4C6uH7rB8IHHBXYeA1+mD+YFUG714XyODc GZ+d1pn69Pl5xODhmHiJopPJXhb91aTQtFArDkgs0WW05IEyFLbrIJN2eEbtKkB/3A16oT zypVdaGx3tpO/UcCiZZBakUm0EwFDoDQ1BRugyhTnH7cKSgKwJZLtVyBXBkktQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793317033; b=lqN5dMRA/eshgZGRB77Ud+kHEQux7ZWHEXSKeISm5QMzzIqR3lyz2wDDitrPt+BeN/9PzN ei58dlfR8DuA7O+BP5qJkYPZ/8gfZV4Oh0GEHepFvw6aJAg2QfHRHuW+Sy2JsB5YuHGY4D R0Ih3rYkpvdaIRrcXRohaFgZAIvTq1s7sySjRiH1+KeF9W7A8ZxiW/E9Q9nr2l3Ehj5305 OJH8n4Tk4ig6t8/AESs2hDtJnQuryZINLXVgVd9efmu2FFHcQlUHquEKzfiFeZS/bI6tOY 4Z/NTRpvxi3I+/5D7+U4o+OyIBHBc4pwvpaG81KOsGpwvoV7Wx3f4qeD0ahxnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793317033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJtfdCa2AAoVHDNMH5IBF3XFjPPbTrXsUT9sPJH7QNw=; b=JcvHdx3Uv+obspqRCQcRpCJl992tSyGrpQ1GDcBhKUOjyy+D4inru7jY1Te79LOSmun5Ef 7W0pnA/CPvUCYZGT9gf2o+0CqHX1/OSzbwTbL8wEPtVzB+fXWCGPf7SNKHFTJD5He/Rg6A pIwuKn7SCvIxYXUOzoAK5ON2gKBy3SOD4JaDMRlA9N7K/U7QTFqhMybCrTN13LTFstOYPV dB9ZgsCWPcShcsqX9vZaYB7EqjWNky/bpxjar9fT/plHJkHcAkISYhcT4M52wWDyzXThml cUwP1dhbIgncdgR6CFxoDecsL2qKn5bcAJqNzPnnFR2iWe9QBr2FbN1CagBVnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jG0y05zTJz12Cc for ; Thu, 29 Oct 2026 23:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c007 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 23:37:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sumit Saxena From: Kevin Bowling Subject: git: f50c8a0865e8 - stable/15 - if_bnxt: Restore Rx CQ doorbell skip-when-idle optimization on P5 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f50c8a0865e86485051643fef0cdc554886691d1 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 23:37:12 +0000 Message-Id: <6ae3d8a8.3c007.a9b337e@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f50c8a0865e86485051643fef0cdc554886691d1 commit f50c8a0865e86485051643fef0cdc554886691d1 Author: Sumit Saxena AuthorDate: 2026-07-31 15:55:56 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 23:15:19 +0000 if_bnxt: Restore Rx CQ doorbell skip-when-idle optimization on P5 The unconditional-doorbell fix for Whp/older NICs (always ring the Rx CQ doorbell after processing Rx interrupts) had also been applied to P5+ chips, discarding process_nq()'s work-done signal entirely and losing the doorbell-skip optimization on P5+ when process_nq() finds no CQ notification to act on. Make process_nq() return whether it saw a CQ notification, and only skip the Rx CQ doorbell on P5+ when it didn't; non-P5+ chips continue to always ring it, since process_nq() isn't used on that path. Reviewed by: gallatin Sponsored by: Broadcom Inc. Differential Revision: https://reviews.freebsd.org/D58613 (cherry picked from commit a8622eac118a31187be02f4dd1a53f58fc6ec35a) --- sys/dev/bnxt/bnxt_en/bnxt_sysctl.c | 2 +- sys/dev/bnxt/bnxt_en/if_bnxt.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c index 3cf8a5d7dcda..ef0550b1bae9 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c @@ -38,7 +38,7 @@ DEFINE_MUTEX(tmp_mutex); /* mutex lock for driver */ extern void bnxt_fw_reset(struct bnxt_softc *bp); extern void bnxt_queue_sp_work(struct bnxt_softc *bp); -extern void +extern bool process_nq(struct bnxt_softc *softc, uint16_t nqid); /* * We want to create: diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 9cab563b1c71..b55af66b4aef 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -198,7 +198,7 @@ static const pci_vendor_info_t bnxt_vendor_info_array[] = SLIST_HEAD(softc_list, bnxt_softc_list) pf_list; int bnxt_num_pfs = 0; -void +bool process_nq(struct bnxt_softc *softc, uint16_t nqid); static void *bnxt_register(device_t dev); @@ -4131,7 +4131,7 @@ bnxt_process_async_msg(struct bnxt_cp_ring *cpr, tx_cmpl_t *cmpl) } } -void +bool process_nq(struct bnxt_softc *softc, uint16_t nqid) { struct bnxt_cp_ring *cpr = &softc->nq_rings[nqid]; @@ -4142,6 +4142,7 @@ process_nq(struct bnxt_softc *softc, uint16_t nqid) uint32_t cons = cpr->cons; uint32_t raw_cons = cpr->raw_cons; uint16_t nq_type, nqe_cnt = 0; + bool rx_cqe = false; while (1) { if (!NQ_VALID(&cmp[cons], v_bit)) { @@ -4155,6 +4156,7 @@ process_nq(struct bnxt_softc *softc, uint16_t nqid) } else { tx_cpr->toggle = NQE_CN_TOGGLE(cmp[cons].type); rx_cpr->toggle = NQE_CN_TOGGLE(cmp[cons].type); + rx_cqe = true; } NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); @@ -4167,6 +4169,8 @@ done: cpr->raw_cons = raw_cons; cpr->v_bit = v_bit; } + + return rx_cqe; } static int @@ -4175,10 +4179,14 @@ bnxt_rx_queue_intr_enable(if_ctx_t ctx, uint16_t qid) struct bnxt_softc *softc = iflib_get_softc(ctx); if (BNXT_CHIP_P5_PLUS(softc)) { - process_nq(softc, qid); + bool ret = false; + ret = process_nq(softc, qid); softc->db_ops.bnxt_db_nq(&softc->nq_rings[qid], 1); - } - softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1); + if (ret) + softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1); + } else + softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1); + return 0; }