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=1796382124; b=WwoPvzMVD2nfSaDYD5Gfp2R2qtJ4NNXRApjylOEBBEstBIx8+YyQTtMbrwX1yKOUZK/n EOF/KPIubELQyxtzKTbnr18FhgECmI9U6VeoSG6uddzjEsDO5Y95ZHSSgHw4ccsvw+1p9 hMuW88k9ZYGmjURJdhVRjNbwoAjzJp5AIHQ49+Q6j7NBgF9Jd9G+JxnatuVeh4P8wBUQs d3XzctP7raED6gqZn5A8dDgXI0ys+riCoU6jnhqezYGf02A00ynIIMBwQLzj2QlSVOXMu VOrE/sewVc2LmZL9LZ4uVFnX5Jx5q2gjzTl54L7PRB8qywhSATmguMYuQjqr77U1YSQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382124; 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=UGPpB/kQBfd6H18/wAW1id/KYnw049o7ebnPqo3U6ig=; b=cBthfLAz0x/x3Wi/YfNOy7KkWrvhX5oHd2RS2EXjsF4bDhmeRYZGd5yIDC0W/Y4/OPEr vcsBAc2TZF+Eh8iwt3AFrrdewyBRzkop2b0eggb26O1gJr/e2pmNftZ6+GedykD4GBZDU t7x1Z7SxSci3aqmBzW+sGroRnNJdK1w/BOPntcC6/wFbdqYdiu7gsMgtVSicLkGwlCLuS oGeHcYWhLUWjnfMfzdYpeCyRcu9l3wJ9uRPxV1AbjqfxQSM+9rBXGy36G+2cnYVp1DtPB LaQfS9IQskRcdNF0/zSR5bIjRK5+3iFqcS7QASxeX8W2xgyVDjZ9u85cmuzif4Q5APw== 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=T62i+kZG; 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 CDF5C606A322; Fri, 4 Dec 2026 11:02:04 +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=T62i+kZG Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B62D1F000C2; Fri, 4 Dec 2026 11:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382124; bh=UGPpB/kQBfd6H18/wAW1id/KYnw049o7ebnPqo3U6ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=T62i+kZGKPPwr2Wo7eWcNYplHeIknUBmCkhKucqQTFX0mW9tcaxSqj9DDdHsN5E9P N3UeDpk4NcTTgNsS3COZpwxcd15aly057k7hFhEN5IfnocwAMBLGjA7rmqhpaeFIgD yji9llaby1zADVQZ93KWl18oKnemhWqGe6UBGEYE= 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 278/703] eth: bnxt_en: restore Rx coalescing after re-allocating the completion ring Date: Fri, 4 Dec 2026 19:02:57 +0900 Message-ID: <20261204100635.185842568@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 a6ea69915a230d24e9d9cd8dc0ff0551dab36106 ] With TPH enabled, queue restart frees and re-allocates the Rx completion ring in the FW, to apply the new Steering Tag. The new FW ring starts with default interrupt coalescing parameters. The driver programs coalescing only at open, from ethtool and from DIM, so after a restart the ring ignores the configured settings, while ethtool keeps reporting them. Re-program Rx coalescing of the ring after allocating it. Use DIM's current profile if adaptive coalescing is enabled, the static settings otherwise. The per-ring DIM values may be stale when DIM is off, ethtool changes to static coalescing don't update them. With rx-usecs 1000, re-allocating the ring on a BCM57508 lowers the latency of a 1 byte ping-pong on that queue by ~250us. Latency goes back up once ethtool re-programs coalescing. Fixes: 6b6bf60fc95f ("bnxt_en: Reallocate RX completion ring for TPH support") Signed-off-by: Jakub Kicinski Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20261120034645.364630-1-kuba@kernel.org Signed-off-by: Willem de Bruijn Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 2b1567616f51b..449aea93d3a9a 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8465,6 +8465,25 @@ int bnxt_hwrm_set_coal(struct bnxt *bp) return rc; } +/* Program Rx coalescing of a single ring, e.g. after its completion ring + * was re-allocated in the FW, which resets the coalescing parameters. + */ +static int bnxt_hwrm_set_rx_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi) +{ + struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req; + int rc; + + if (bp->flags & BNXT_FLAG_DIM) + return bnxt_hwrm_set_ring_coal(bp, bnapi); + + rc = hwrm_req_init(bp, req, HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS); + if (rc) + return rc; + + bnxt_hwrm_set_coal_params(bp, &bp->rx_coal, req); + return bnxt_hwrm_set_rx_coal(bp, bnapi, req); +} + static void bnxt_hwrm_stat_ctx_free(struct bnxt *bp) { struct hwrm_stat_ctx_clr_stats_input *req0 = NULL; @@ -16393,6 +16412,11 @@ static int bnxt_queue_start(struct net_device *dev, rc = bnxt_hwrm_cp_ring_alloc_p5(bp, rxr->rx_cpr); if (rc) goto err_reset; + + rc = bnxt_hwrm_set_rx_ring_coal(bp, bnapi); + if (rc) + netdev_warn(bp->dev, "HWRM set coalescing failure rc: %d\n", + rc); } rc = bnxt_hwrm_rx_agg_ring_alloc(bp, rxr); -- 2.53.0