Article View: linux.kernel.netdev
Article #18733[PATCH net 4/4] net: systemport: accumulate the DIM packet and byte counters
From: Nicolai Buchwitz
Date: Wed, 18 Nov 2026 19:55
Date: Wed, 18 Nov 2026 19:55
31 lines
9482 bytes
9482 bytes
net_dim() computes rates from the difference between two samples and
needs running totals, but bcm_sysport_desc_rx() passes the counts of the
last poll. Adaptive coalescing then picks profiles from wrong rates.
Accumulate the counters instead.
Fixes: b6e0e875421e ("net: systemport: Implement adaptive interrupt coalescing")
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index bc88a27da16b..d3041ad60698 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -844,8 +844,8 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
priv->rx_read_ptr = 0;
}
- priv->dim.packets = processed;
- priv->dim.bytes = processed_bytes;
+ priv->dim.packets += processed;
+ priv->dim.bytes += processed_bytes;
return processed;
}
--
2.53.0
Technical Details
Message-ID:
<20261118-nb-genet-dim-stats-net-v1-4-13b275f1e088@tipi-net.de>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-366411-linux-kernel-netdev=dewy.ruReferences:
<20261118-nb-genet-dim-stats-net-v1-0-13b275f1e088@tipi-net.de>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-366411-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net 4/4] net: systemport: accumulate the DIM packet and byte counters Date: Wed, 18 Nov 2026 20:55:33 +0100 Organization: Usenet Network Message-ID: <20261118-nb-genet-dim-stats-net-v1-4-13b275f1e088@tipi-net.de> References: <20261118-nb-genet-dim-stats-net-v1-0-13b275f1e088@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2686227"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:kPRtVmDAluAYz44Il+ZyrBN3Opo= sha256:u4deF5Y8nRSW7HnnJnRiH2Pk6j8fTwKRu7kdSHNrnrU= sha1:Ky1eHP+MUsMR0Tv1Q3AjWRaLF5I= sha256:LNPELVtj3WLjUhoTEErITwnccQ4+j5vN4cUmSQkfFx0= 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 765941153C0; Wed, 18 Nov 2026 22:56:41 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de 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 FoRjNexQbtva; Wed, 18 Nov 2026 22:56:36 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366411-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id DE72C1153BF; Wed, 18 Nov 2026 22:56:27 +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 BFE69144EE6; Wed, 18 Nov 2026 19:56:18 +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=1795031772; b=v0tu98OQBv7SAYZyXPcqMfMPmb8Z7SQtE2XntUuKrBgRBZnuI60SyaR+rDuB1VZoBgah OEwPk7LMD06VV5Qq/60bn0xyYAaQLzTgPTd2Ea+KhhVEhnevLPtXlvwPClm2KL43MYT+4 GCmin8krKLqjOuCEcxNBEBDz41N6/DYoAKAk/3sJkzeWOzFwknZjm9cwDFIgpAei1eHlr CgGDvNUpbX5YrShycqdPyxfkmrsKUudYfotT1TMXYl+c7gehPVDRNj0iCW3Vi//qps1A7 c48SGHNu2xhZEG9TmhQBxo8hxOy7XJ2qMplqzWlGKOQ6z5BKFESGrIjZEVZZy0MElpg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795031772; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From: Date:Subject:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=yOpjJnayY+MXiVhxxuaYASYK0OcqJoRCEArFDMmhwrQ=; b=WsHv4lfERnY4JfkY1wtGE36wKvz9JJ3TzK/glO4t5d7ZHH23wXghcFgmvvBOYru9pdqc HbUGaCslJgWomDTir3xSroc4q9+ncXfiIIW0G3DwxcD5CqQbBShIxmHEJxvWVaHEKulX5 93WS109wOszrZDawSA738jOstWNGZwrJm2Nuly4lAccdxuHewNGNnkVYQGDB8D4kwpgnV F+GMsj7Q1S7lgeIVe5ezt8FtMeJ9N8xKyP6UccmW8Heue486SlIqKSHTJ/Yj+cwN8aBQV JobEwXVOpUOb3GX7BnazAebRqUb45QmlEsPHTem4rFRm/YZZmPPSNcLSX67MFz3qSqw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=OC7g98i4; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; 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 536BB60A2634; Wed, 18 Nov 2026 19:56:12 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=OC7g98i4 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795031771; b=w7eyMmJkJQ+DXOG7JCnJho230ND1hyPn6WXqteICuGacwKYYAU4Y5xcfil8Nu/LUQDna duDLpPE3OiLb/hSK+57h0jbNp7yNaWysOn8yoUO8lQv2qK+72ShBda/baE81bjTlVCV2m wQ0r9FG84X6K43D3EI9EwGY8NihsqhyWajGPtZj7VEFGRiSE1PHYQl0xXSZrCAEsYzZXu v3BHu5SAP/AXAWK4bK492JJ8deJcezH2Tnz4QIqb+oppaCoTxIj5bl1c4JCH/b1eXIPw4 vO2ZDbJK7NpvrxdipM+FINNaANR5cCiad1ClMyMIPiLnPtmsjjztlsrnwK5iDyA+4EA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795031771; h=DMARC-Filter:Received:DKIM-Signature:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=yOpjJnayY+MXiVhxxuaYASYK0OcqJoRCEArFDMmhwrQ=; b=sIusjvmDbMbVY0KHni7xkvst8ECxB/JV8ognDbsO6c/cT8GmjiFZd94+1SpGPgC+jnTV wBcN/AU5CoYOFA9JODNtcfx9QYTutLKs41QRCRav+deg/bKDdJJtQPJzqLFYv22jsD9ga SYmfyOsbbXhgwbTWtiKc45xxlkYk3YmuxqnyfVMPy/v6ATMzSmzVAzHpPqFkuwp7drLW8 uJrt6sv8PQ4uOdtOhSTEJjD1pHw8LsAgp8wBPXnwWOhOJ52a5bMKzdHTUPJ/dJbDawNwQ ul6W57FaDJR5swuCveZ14Iv9ksifa1BlXwgEZmlZj8TBLcDuSNqSFTftaok4EfKVCWg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=OC7g98i4; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 EEDF560A261D; Wed, 18 Nov 2026 19:56:10 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EEDF560A261D X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8D7F0A24BD; Wed, 18 Nov 2026 20:56:08 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795031769; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=yOpjJnayY+MXiVhxxuaYASYK0OcqJoRCEArFDMmhwrQ=; b=OC7g98i4lTGNmrn2zLWqkNOBEbitWvx/fKf8bpShaMBLMkNMiY388Gd/uQnbpL/ZS4diKi C7vTJ44e5MIhxyT8qK5AcKxdUo0aDwVvskxxqkwDvDwJcClAY66+gA4W4nIrNY5G7Tt1Oq HX0ieaCTj0mpQo18c4uJzvBSs1Hqn8MQzsBNzypBvnxmnGawkCWnQueKL27FA82gYPnrk1 XH4LAxpBm0X0bs92qAkfLKEZZ3RPqchRsqhThuKCEUOLfJ9+YpDh4xR8PIPQokwKiQKhbK nM0WMpozhGjLFf034UZ7rKfU3PWOXOURjiBh9IKrYXvOh4jF/3orYt42K7udFQ== 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 X-In-Reply-To: <20261118-nb-genet-dim-stats-net-v1-0-13b275f1e088@tipi-net.de> X-Cc: Justin Chen <justin.chen@broadcom.com>, Petri Gynther <pgynther@google.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com> X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3