From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382127; b=QCIiDythdVANpNnEt4mmeULahtun2tcGKgR0cRIhfnvQ9ZzIo8cnIqFxiLLi0dVYh4FV A3LG7pkX4CrJpZJyUliDhIur9EfTQqlSxRO6sp6euarlvWJgjETxs+Aw1qLHxjSmI+LXM KtB7G3hYMMh1vk4Mtdl5v+HlpH+5joCMuK7f0vEU42fvBmXg8vBUVt3LY03YcSaZqVcHe gou8yVLPPCoKC4+EPkkEU6b2vgYfRtNhE8wvXm6LgJ3c8elFT2FG9SC6KQpC7LiXJG4IC KyxWsCBDzitRE6PcW/hngOPSgDSdQMrU9BwaRQzaLJGFLe5N7jmVItv9qKkCLqOSclw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382127; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=RKl7UVoK/tdVVmZjGc8VzZb8MBki5tvSMahcSiuricM=; b=A4FmDNvQhO2nEhEdk0Ygh4rZ214g72Lpf2ykERaOPTT13OTfMrsIyeLQH04q/0p8SUdK 3rzIRsW71nL56bh0D9UwbSzYaknRz2Y1pZyqiVREbUiWtF2Zhy8krVr98ZEGaKTE1I/GQ Qwxn+nVGloynau2c6BW8NdcySaH7eXuzsnls8Bo4sIBv3ctCCyFKaWKCIMZp3iY/qfwZO YKK7XC/Zi0le7mMU/V886U8tnR8dKDCdoy91MpnoVJvvSahat84/8xkwUlYPwooBk5Kvs HBlMh9hITWdTZHAawmHmXMJPsf0BR4c/XpnxfpmE0/mCzpFFG04qbYch2f6CROnntAA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=v7pMBD9j; arc=none smtp.remote-ip=100.103.45.18 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 32842606A32F; Fri, 4 Dec 2026 11:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=v7pMBD9j Received: by smtp.kernel.org (Postfix) with ESMTPSA id 997BE1F00897; Fri, 4 Dec 2026 11:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382127; bh=RKl7UVoK/tdVVmZjGc8VzZb8MBki5tvSMahcSiuricM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=v7pMBD9jSxlMb0EFymcJtekx9uyYP7asgyjApav1+ZEyUIdqbs88Y+OtxHDcTfHuH a2cDwyaplemTrCnVLfopJfI7U26nZptG5WWR4wfq9VJ25LS6mE8YPQCEo0ocZqYgL7 qBBBAVEhBJrsEUeRlwib0AlfkVskuhgq6pdQPCeo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jakub Kicinski , Pavan Chebbi , Willem de Bruijn , Sasha Levin Subject: [PATCH 6.18 279/703] eth: bnxt_en: restore Tx coalescing after re-allocating the completion ring Date: Fri, 4 Dec 2026 19:02:58 +0900 Message-ID: <20261204100635.211141458@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jakub Kicinski [ Upstream commit 32756b82fde8f6cc98b174fdcd02c2a61033e263 ] With TPH enabled, queue restart also frees and re-allocates the Tx completion rings which share the NAPI instance with the Rx queue. Same as on the Rx side, the new FW rings start with default interrupt coalescing parameters, and the configured settings are applied again only at the next open or ethtool change. On P5+ chips the Tx completion rings are separate from the Rx ones even in combined channels, and the Tx settings do take effect. On a BCM57508 the completion latency of sparse Tx traffic follows tx-usecs, it's ~20us with tx-usecs 1 and ~220us with tx-usecs 200. Re-program Tx coalescing of each completion ring after allocating it. DIM only manages Rx, the static settings always apply to Tx. Fixes: fe96d717d38e ("bnxt_en: Extend queue stop/start for TX rings") Signed-off-by: Jakub Kicinski Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20261120034645.364630-2-kuba@kernel.org Signed-off-by: Willem de Bruijn Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 449aea93d3a9a..6ea04df46b292 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8484,6 +8484,24 @@ static int bnxt_hwrm_set_rx_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi) return bnxt_hwrm_set_rx_coal(bp, bnapi, req); } +/* Program Tx coalescing of the completion ring of a single Tx ring, e.g. + * after it was re-allocated in the FW. + */ +static int bnxt_hwrm_set_tx_ring_coal(struct bnxt *bp, + struct bnxt_tx_ring_info *txr) +{ + struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req; + int rc; + + rc = hwrm_req_init(bp, req, HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS); + if (rc) + return rc; + + bnxt_hwrm_set_coal_params(bp, &bp->tx_coal, req); + req->ring_id = cpu_to_le16(bnxt_cp_ring_for_tx(bp, txr)); + return hwrm_req_send(bp, req); +} + static void bnxt_hwrm_stat_ctx_free(struct bnxt *bp) { struct hwrm_stat_ctx_clr_stats_input *req0 = NULL; @@ -11688,6 +11706,11 @@ static int bnxt_tx_queue_start(struct bnxt *bp, int idx) if (rc) return rc; + rc = bnxt_hwrm_set_tx_ring_coal(bp, txr); + if (rc) + netdev_warn(bp->dev, "HWRM set coalescing failure rc: %d\n", + rc); + rc = bnxt_hwrm_tx_ring_alloc(bp, txr, false); if (rc) return rc; -- 2.53.0