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=1796380376; b=jkOMR+GHptESGLSXJyWEqt/VN/MeI+uI3+3u7JgcgZZ+Rbe7ol3kUCprUQkju4xREj2s yE/2LNrzHraxa98HeuREARAR8Etkl4BpjEWNuvpf72xyjJkPY4Hj026uChQqJmzA4uX2N 1Q58QKq+nZfZ/0ueXrjTI750YMWlPQLFL7DldrOljr+5F3lsn3qiOaTaS+K1NM3pDuDcn OEmAEEuf0lBpwHmgAxemu5xSXgQi6sIap4ivg6JR/DgJz3QPzlqaWXtETfvF4mT34SO1E RkSYQyxm/hdlFC/qa+XkkvKNRYr1f0evV+U7/bs/TQRaz6PUvPmp2IvojmVm1sRojAw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380376; 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=Qs69z/bhQyJB52mBSzcrgJxiM4XJa5WRNB9aVzR3e5Q=; b=YNmPwtlRia/xsDFo72bfjld5uSwEPKDrH5u2eMwbXrOvq62BSD6LX7Jvi8VHR+0ciAd7 8RXbtl06fQ9/cYKmJzLb4wAmWWTEqVKrkJnwjFkd6xuShPWTFUP3eJ2OKuAtJm+V1HGOt AicF5cjqrIRXRaSYO4hOiYbOf5NbviuuH00e2F90gbOTTVTfCEUrjCJsD5h7unwIOTjIZ zc0LtlDDtrlDDZyZsG22XIYfwVKHXwwMDZL702+oftW8LmExZieKFxTAarwUp9Q4dfrBD MP3aUpjYrPHteMJbkojzR1TpDmGqZyfdlAtL7dDxdkyGmucyb8LJLHpv3lk4QCLSgwQ== 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=w1h5TuMZ; 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 C698D606A32C; Fri, 4 Dec 2026 10:32:56 +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=w1h5TuMZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 461721F000C2; Fri, 4 Dec 2026 10:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380376; bh=Qs69z/bhQyJB52mBSzcrgJxiM4XJa5WRNB9aVzR3e5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=w1h5TuMZSl79qVUugeqnPIUovK1w60oFA/YCRVsY5a+jIcKi/GQw9DGR1RTU+lWB/ GSwh+KD3mXdVCfUFBicNU1dLY+4/PpRWrlq9wDQaCOZANgybMOKBaV6tBBL/Uqkcqx VL8Jgepe6mBeRhCvj4WoeuxciW7gqpz3Suq/SgmE= 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 7.3 246/742] eth: bnxt_en: restore Rx coalescing after re-allocating the completion ring Date: Fri, 4 Dec 2026 19:01:50 +0900 Message-ID: <20261204100641.601131388@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@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 7.3-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 ab932f7d0d76a..a2a8087bc4287 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8619,6 +8619,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; @@ -16632,6 +16651,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