Article View: linux.kernel.netdev
Article #18734[PATCH net 2/4] net: bcmgenet: restart DIM from the default profile on ring init
From: Nicolai Buchwitz
Date: Wed, 18 Nov 2026 19:55
Date: Wed, 18 Nov 2026 19:55
33 lines
9646 bytes
9646 bytes
A close can cancel the pending profile work and leave DIM in
DIM_APPLY_NEW_PROFILE, where net_dim() does nothing. Adaptive coalescing
then stays stuck after the next open.
Reset the DIM state on ring init and start from the default profile,
which is what bcmgenet_init_rx_coalesce() programs.
Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing")
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 70c6a6465c81..96620d298677 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2702,8 +2702,11 @@ static void bcmgenet_init_dim(struct bcmgenet_rx_ring *ring,
{
struct bcmgenet_net_dim *dim = &ring->dim;
+ memset(&dim->dim, 0, sizeof(dim->dim));
INIT_WORK(&dim->dim.work, cb);
dim->dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
+ /* Match the profile bcmgenet_init_rx_coalesce() programs */
+ dim->dim.profile_ix = NET_DIM_DEF_PROFILE_EQE;
dim->event_ctr = 0;
dim->packets = 0;
dim->bytes = 0;
--
2.53.0
Technical Details
Message-ID:
<20261118-nb-genet-dim-stats-net-v1-2-13b275f1e088@tipi-net.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366408-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!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366408-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net 2/4] net: bcmgenet: restart DIM from the default profile on ring init Date: Wed, 18 Nov 2026 20:55:31 +0100 Organization: Usenet Network Message-ID: <20261118-nb-genet-dim-stats-net-v1-2-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="2686279"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:55Kc6+r5VjtR6lKeIpfgqnKS1N4= sha256:EfAKcxwlmg9U1WHTZiQny8Cw6MTHneYPJ8Q3YBYLXWc= sha1:irHYsfvJAex6Brh9pi3RFGbbXiY= sha256:yITimdFv/BCc8hG5BpXpcUX4EdUUkj7//YZ7wDCKSMs= 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 591C31153C0; Wed, 18 Nov 2026 22:56:44 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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] 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 EeENDDbhWdgQ; Wed, 18 Nov 2026 22:56:41 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366408-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 6EA4B1153C1; Wed, 18 Nov 2026 22:56:33 +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 6BE221428A4; Wed, 18 Nov 2026 19:56:22 +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=1795031775; b=leQpSzgQqkUDdCN1ZZhNFr3T0GOTJjpLO8iYsXzN+zxNoBuFLiUj6xCVT1JQ+v9Jgr5L wBue9Ubv87kqHGIp4zuNHUgQaLb480BgFZDWv91azEqKQuJkWz8I3q4wVhvJlC2cZeyXZ juGtBAxDGu9TYm7Sn27nvGSeTs4PnMmC4+Bn842KozS7A9WZV4HWrPogBFcke48ujC5xX 3t50+M7YkA+ceDhEdHeTtrQBxs0PFW9PyIp9P50+7lwqXHG6sGmdKJ/xMAwVWaH1yZa0w 1npNUaAf01Hk97VU1HNCv3OUthJO5BoyrDrP2F2BerGWGyjrIZHumW8BepN8fohxI+A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795031775; 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=sNpQOKsTWfR+eXJ65vVv6WscOAbh7o0/2Tsak6vgxuY=; b=RVQQoOA3WwRxOEil6n8E0b+W7OzJqpkh0BTsf6gvD0kvdIHBGd77UcewPx4OIqR86fCa m9N8xR8F0peyrKsKGsug18ygtHmkQaUNNY6FEmXEPi74e33/4I8lHBeBkpJ+eY8FQtWSH 24x4KXuD1c7lvCN5jyzngrsd0aH4w/L+c35M8mqir2MjhOIHDwomMZeexS0oYZR5jkyTl RAFwFExPt8Hfooe5SkwC4UUEvmTpzLY+IJ+tM1BpMvfSGUoD9er8kMDhHONKJijXGnnqS EDUpuaLg0KL7DjJiiT7YMuTSA/1NsesSDP7kppAmpJmObgQ3nffmDgWHQb+rkdPBdPg== 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="k1/OyE93"; 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 CAFB360A2613; Wed, 18 Nov 2026 19:56:15 +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=k1/OyE93 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=1795031770; b=pveR3sxrjmDl3KsUTRN/WXBT7zE2laH2aVabveabnpC2xCGVsbY4/KKTv2c11hPywJsa /mdMug6/ANyGeMcCoTzTGNDmEqX3G6kei/YMMOP/E9xr8RKWWLAgpCml9JWYfV63ooD7l Bbcv3uJm/fGE8UvQKwaEmRkklNyeXvmNo49vhWzZ+z/Fjy1F+yKsm49VrACGe3yYE/Lyt F0nGNagNKtGxei3pzB1mlSD5iMsRtzO75GM7r1U4T9HiITKVS5kn3TkorHrDJq0Nu8r/Y J+aWz+8G8Yq9U/8MwT6kQp+9PCGPaaRjiCMJqKBkHohC+0ami0a6yCtSPllemSQ7CPQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795031770; 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=sNpQOKsTWfR+eXJ65vVv6WscOAbh7o0/2Tsak6vgxuY=; b=jLcq781QdJ6hrMRXlTSk4ZeOuegRIgIpuZDHpLHM95DlKJ9YkeUl6v+OixdZYb0fHKai uOYjfd8r2dhC+5JNOMfNhKYyWCBqfyO0Q1tEJ/IEwtIiQGUeJ+EqYgS8f6iWyn8S+wt/v iyx8zq+WmwuQPFUwh7aRQ+pqKjNJ2F7Chob5O08Hnkatk1OrVNSBCj3dqF0Nzd/jGUWHG Upi8QADbQyhRLD1kMGA8NyWNhGx46RHLDzJ9r0zqUNrqc2do/yCLRlYd5v1sRHwbbC+Cf L0wga5h4xB/xkDVxyqAqv7Hs8MogzSImPlr/gdv3mf2fTRQogvLeIRJskgh7cvIroxQ== 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="k1/OyE93"; 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 688A0606A32F; Wed, 18 Nov 2026 19:56:09 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 688A0606A32F 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 2BBDDA230D; Wed, 18 Nov 2026 20:56:07 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795031767; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=sNpQOKsTWfR+eXJ65vVv6WscOAbh7o0/2Tsak6vgxuY=; b=k1/OyE93DfAHuumlWQWXfRlcAoHbGEB1cgvrcdlSy7H010bxjMrkVEdEG/6NUt0CodG1GX e5mueOCVZMJ81cwWhlV+CQDH1tn2bEy4DSS18o2shFpWOEy/UTLTZ6M7HcoyFkYGlGJH5E /sMDupclADccqOJ0pwCW9jIqRYVoCPDeHo75UIVRtS6G/Ihyuf0G5SXCVP4ic4Y9/v7y7V f0DsKUEeNJlo8K0rXe+hSuB7ihBssWQURWYfqV8PBwp+KtmsU8wjUQxp0Z1NKSCPCp1oUS YQoEc8uQd/MwsqUrfdfDvCMRw5syZEChCbBagiUPLF5j3vNqHu2uQxRMz3Xe+g== 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