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=1796380379; b=xj6BxJ+7PXdNoMnsTKfcOzCI7LfeJRSdQEJ3ZrRMsGqtl2Zw3pE9P2IW06+KTMF3Ytrh gNnpnHY/kkEAxinR9BL+rMckI6rUox/z2geieicxBsTwqnKA6WPmgj/XE0MxaTAbkqa9R GfNhH89V0DFvQkD3lq3tiufi+UbEU5ensLn87qmVq2vchOA/kIilvZ5NEKwarb9nWekjd zo7HN770lcbm/CvT8+GO++01heHaG4EKoVE1K/8eykjajuqxhkEAkxQl6Q1lZHTPt937C QESgFjSlOEsIvEhFtTU9NfixYGKVlsWIx3wjV2vO96HOvXl2R8hW6BIx1klVWJn1BPQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380379; 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=nSB61t4RbcD+Po5r3qqAs0T7jAe4qdTYrhK1kley8iA=; b=0YE0p07c3B8+ttIIzeXwRVkHhoTNBtKY8wRTxEXw/GrznN4mvJH/t6fAzRYBbFcYfoKE pW5cfAid3qIl1zI7QQaaaOiamvfMYCT/7mLsf9RCmnOovK9zUvZnjc7n2nxYJWnicS+2T /69vHsFiSrJZcV6FKZm7ErNjQRVeW8DtXxmHi0DDfn1APhdMXtKXqnQ35lhq3pVADPJae b6t/CUUQqzguEhUfIMBC2l2CL6ACh2if0iyjSa86lyqjELYcL/e8ZuFZ6/lkIvMFPJOZE fzfT9HSe7gnwMHV/5xGPPsHnpde6gPJOo9tYZtX06F1moQVSyjZTrUVxk9pe3+KCRtg== 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=0HBiKgCT; 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 A2828606A322; Fri, 4 Dec 2026 10:32:59 +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=0HBiKgCT Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F891F000C2; Fri, 4 Dec 2026 10:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380378; bh=nSB61t4RbcD+Po5r3qqAs0T7jAe4qdTYrhK1kley8iA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0HBiKgCTzuHNLWt61uEm7uY2fstwn2cRqx1JaQlSzQiWIboUhQ81Z0kwE2Cq08C3n bi1WaRj18ailpaAUF6w2vb0QJMqtYmbL/JTHt0Ys9aRWWMDCpHsqfETrPhcWCurW3J EOlOZteL6nhsrKxIJKpJEAyzM7gmxJzTO/+Yd4qU= 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 247/742] eth: bnxt_en: restore Tx coalescing after re-allocating the completion ring Date: Fri, 4 Dec 2026 19:01:51 +0900 Message-ID: <20261204100641.625702794@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 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 a2a8087bc4287..85563a90ecdfe 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8638,6 +8638,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; @@ -11858,6 +11876,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