Article View: linux.kernel.netdev
Article #19595[PATCH net 2/2] eth: bnxt_en: restore Tx coalescing after re-allocating the completion ring
From: Jakub Kicinski
Date: Fri, 20 Nov 2026 03:46
Date: Fri, 20 Nov 2026 03:46
64 lines
10127 bytes
10127 bytes
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 <kuba@kernel.org>
---
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 25d7c4cc3377..52606db3f7b4 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -8637,6 +8637,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;
@@ -11857,6 +11875,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.56.1
Technical Details
Message-ID:
<20261120034645.364630-2-kuba@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367613-linux-kernel-netdev=dewy.ruReferences:
<20261120034645.364630-1-kuba@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367613-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: [PATCH net 2/2] eth: bnxt_en: restore Tx coalescing after re-allocating the completion ring Date: Thu, 19 Nov 2026 19:46:45 -0800 Organization: Usenet Network Message-ID: <20261120034645.364630-2-kuba@kernel.org> References: <20261120034645.364630-1-kuba@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3053004"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:qqLxMhiYH79HQHJju7Z5J8Gfd10= sha256:c/LKCNk7raVL6fk2NjjdMzQUy3DocjSe3c3cL5r5o5U= sha1:l4/qNqCrG0xDmY5jGVwVPoncIpU= sha256:XO7GVCZ/dU8VRWTCqAOn942TLm7w6GoO2X4ZFQ2oM4o= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 75B87115895; Fri, 20 Nov 2026 06:47:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IAa8SDzNlr_Z; Fri, 20 Nov 2026 06:47:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367613-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 2DDDD115892; Fri, 20 Nov 2026 06:46:53 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 10999244271; Fri, 20 Nov 2026 03:46:50 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795146409; b=T5t2kfQLtNbob3MnMvlwVevsl1JmM4OyC7YDWZj1Z3cN9r86N2/oWkqaP9Bw579TmihD +l28iRnIGwzXTwOYVVgyhLZ4Px0A2+/DIcl5Di2WZOJv+xQtR5i1y1gFmBHP5yGKFk0Vw rrG7DE44QayksasbWljfOR8Q7xJLRRn39nVh084yprjlhsTZ3vRVbRnRThrn0mwrpG/tF pr2qwdzM2/NMu0CLpWQRxFetTTH+28MXPajYZJPIMnKRpg9yZtU4JFMlGMKG9i+PFqTLL 52qckq3Q9dYYiVryyI5Hrh/23iYuBK4NyV5XM+ZUHhNKedPhEUEP5xlKNMCrD+sO36Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795146409; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding; bh=yBQPzg9edxnMpJSLZh/uydY0GUKz1UORhRy3AN4M/bI=; b=4rNUxR3Fp09Yt2C5hS7cUltvQEWP4qBwHU7PCFs/fx6mY7RW/q1G7qt09DPJqT/ZXSEP gGPhOa6rDHoY7TxtdrC2iymLy+ULW3ea93RKpxqfJKSDEJICPNNxd8AN4BlUcCGLzJyUp 1Z7Je8RclIHDCO5eeOfdw7JBpO18kLp4S6A7xPxWD7PzzGz9L4F+XtcMHqrYwC9zRkykr SWTxye+MoP3Uh6Oo3uab1ofcwUX3cJPXsBqiRVAXJMYtx2EB8nnUESqPrF4HEdgWAkXlp ejCf6FUX+ousddx7KJfaIeHxiigv2iwQ8HqohDZQ1kwCh8Y55L/XdAx3KIsbQ5cmSRQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d2rDShms; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D05BD606A331; Fri, 20 Nov 2026 03:46:49 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d2rDShms X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795146409; b=PLYuByJAunAkqpT8mh2akMXDDYcxPJpJMA41YYoIKHFEiOcn8AlzLb5P2Y2DWLdJoy67 YOCZZ4ZhTjOszvv51dpaqHhYKXfNJOY3OMZZXnCK0hEOJo3WNjC5Q8AgoGV6esQRiidAx JERf9+llTOCwOYceEFBydMwdFLD5wKQw29j4SzIDW43ZRp5iqCrPlJWO2xyPETAkU0pQr pWM6SGqC8cKLPPKtA4g9y4tApFbKSEnc1DXpygtiAy0/kZFrjgEUZnXMza8YCOzIG6AJx zWQ6PhF+4Yjs2MGHCKvbqEq99JW1/vCLDYk92i/V5pgy8rfXqxaHEZxj4x8p7G+dJ6A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795146409; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=yBQPzg9edxnMpJSLZh/uydY0GUKz1UORhRy3AN4M/bI=; b=JA7ROpTZqHbHwpm9+31/i0W7KndXcIq2Z9A8UyXoDqxmCNZYnbReIGDR31piUvQCBSr0 Kt2ASO/pIB7WGmpo/qim0Z8jwC4+kKk/t2s6DnHfRaGDT0QBtW3oCNgn1ZcdT4gYHerGZ oTy3PElOQxsVMK2qHgb0gZRTyVMzI4qXDTShq4Tod8xow49Lt1i56vVJgywkg1JRTQlVn duqFdvcgQl+VeSiVeKO8AeHRbaRmZOSzVWkiAyrs5CbTIhNrX175KEdG1h9yiW2+oVWy6 VlEWYe31Iy0pBCGAbK10ijXmli4VWUFqn5jprayoIXpYlwSe/RLEyVRSDbwm6sJc5tA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d2rDShms; arc=none smtp.remote-ip=100.103.45.18 X-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 F041D606A332 for <netdev@vger.kernel.org>; Fri, 20 Nov 2026 03:46:48 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 241471F000C6; Fri, 20 Nov 2026 03:46:48 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795146408; bh=yBQPzg9edxnMpJSLZh/uydY0GUKz1UORhRy3AN4M/bI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d2rDShmsznJ7CUYJjks5gYyusNongRpYBXVDFEWfXkTfRbfHZoUpBbwecCyu8fOSa SpSUVfW/UYCnXO9eHdt+IyLeK/Fndo4HAJrG0aS0d4MLeV+WN9UeUBvRdnLvy/+pC0 TvlUsh+hYyN/nl4k6YcRcp5brsznuai8BTfX7teu2gV2GC7St4nbKRZ4KBD7+izNOH Cr5EuvlcDb/f3rJ4pjWuX9jtkbo9KiwI9419EhjNcbKzckljJ9hf6OKWkuBq1IT1cc YWwcac7A7tle9RQ6EzIYinqGrYbJJR0YledTaguEPHOUEfJSgZMj07WJWUYPx4jorn aEEywYRWwy14A== X-Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, michael.chan@broadcom.com, pavan.chebbi@broadcom.com, somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com, michal.swiatkowski@linux.intel.com, Jakub Kicinski <kuba@kernel.org> X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <20261120034645.364630-1-kuba@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list