Re: [PATCH] net: stmmac: recalibrate CBS idle slope when EST is enabled
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-01 14:54:25
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-01 14:54:25
On Tue, Jun 30, 2026 at 10:32:44PM -0700, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
From: Nazim Amirul <redacted>
Hi Nazim Please take a read of https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html It would be good to get the Subject line correct, and there are maybe a few other things in there you currently don't know.
+ /* If EST is not enabled, no need to recalibrate idle slope */ + if (!priv->est) + goto config_cbs; + if (!priv->est->enable) + goto config_cbs; + + cycle_time_ns = (priv->est->ctr[1] * NSEC_PER_SEC) + + priv->est->ctr[0]; + if (!cycle_time_ns) + goto config_cbs;
The use of goto like this suggests it is time to refactor this code
into some helpers, so making the structure clearer. Otherwise this is
going to turning into spaghetti.
Andrew
---
pw-bot: cr