* [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error
@ 2025-09-25 14:06 Rohan G Thomas via B4 Relay
2025-09-25 14:06 ` [PATCH net-next v3 1/2] net: stmmac: est: " Rohan G Thomas via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Rohan G Thomas via B4 Relay @ 2025-09-25 14:06 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Rohan G Thomas, Matthew Gerlach
This patchset consists of following patchset to avoid netdev watchdog
reset due to Head-of-Line Blocking due to EST scheduling error.
1. Drop those frames causing HLBS error
2. Add HLBS frame drops to taprio stats
Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
---
Changes in v3:
- Split commit into 2 and add this cover letter
- Updated the commit messages with expansion for HLBS and DFBS
- Link to v2: https://lore.kernel.org/r/20250915-hlbs_2-v2-1-27266b2afdd9@altera.com
Changes in v2:
- Removed unnecessary parantheses
- Link to v1: https://lore.kernel.org/r/20250911-hlbs_2-v1-1-cb655e8995b7@altera.com
---
Rohan G Thomas (2):
net: stmmac: est: Drop frames causing HLBS error
net: stmmac: tc: Add HLBS drop count to taprio stats
drivers/net/ethernet/stmicro/stmmac/common.h | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_est.c | 9 ++++++---
drivers/net/ethernet/stmicro/stmmac/stmmac_est.h | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 7 +++++--
4 files changed, 13 insertions(+), 5 deletions(-)
---
base-commit: 12de5f0f6c2d7aad7e60aada650fcfb374c28a5e
change-id: 20250911-hlbs_2-5fdd5e483f02
Best regards,
--
Rohan G Thomas <rohan.g.thomas@altera.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v3 1/2] net: stmmac: est: Drop frames causing HLBS error
2025-09-25 14:06 [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error Rohan G Thomas via B4 Relay
@ 2025-09-25 14:06 ` Rohan G Thomas via B4 Relay
2025-09-26 13:25 ` Furong Xu
2025-09-25 14:06 ` [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats Rohan G Thomas via B4 Relay
2025-09-30 1:20 ` [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Rohan G Thomas via B4 Relay @ 2025-09-25 14:06 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Rohan G Thomas, Matthew Gerlach
From: Rohan G Thomas <rohan.g.thomas@altera.com>
Drop those frames causing Head-of-Line Blocking due to Scheduling
(HLBS) error to avoid HLBS interrupt flooding and netdev watchdog
timeouts due to blocked packets. Tx queues can be configured to drop
those blocked packets by setting Drop Frames causing Scheduling Error
(DFBS) bit of EST_CONTROL register.
Also, add per queue HLBS drop count.
Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_est.c | 9 ++++++---
drivers/net/ethernet/stmicro/stmmac/stmmac_est.h | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index eaa1f2e1c5a53b297b014a8218bf8f3db5beb4de..8f34c9ad457f07553206841223fd38e55208d5ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -228,6 +228,7 @@ struct stmmac_extra_stats {
unsigned long mtl_est_btrlm;
unsigned long max_sdu_txq_drop[MTL_MAX_TX_QUEUES];
unsigned long mtl_est_txq_hlbf[MTL_MAX_TX_QUEUES];
+ unsigned long mtl_est_txq_hlbs[MTL_MAX_TX_QUEUES];
/* per queue statistics */
struct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES];
struct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES];
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c
index ac6f2e3a3fcd2f9ae21913845282ff015cd2f7ec..4b513d27a9889046e8b5e404adfd917f469c3f05 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c
@@ -63,7 +63,7 @@ static int est_configure(struct stmmac_priv *priv, struct stmmac_est *cfg,
EST_GMAC5_PTOV_SHIFT;
}
if (cfg->enable)
- ctrl |= EST_EEST | EST_SSWL;
+ ctrl |= EST_EEST | EST_SSWL | EST_DFBS;
else
ctrl &= ~EST_EEST;
@@ -109,6 +109,10 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev,
x->mtl_est_hlbs++;
+ for (i = 0; i < txqcnt; i++)
+ if (value & BIT(i))
+ x->mtl_est_txq_hlbs[i]++;
+
/* Clear Interrupt */
writel(value, est_addr + EST_SCH_ERR);
@@ -131,10 +135,9 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev,
x->mtl_est_hlbf++;
- for (i = 0; i < txqcnt; i++) {
+ for (i = 0; i < txqcnt; i++)
if (feqn & BIT(i))
x->mtl_est_txq_hlbf[i]++;
- }
/* Clear Interrupt */
writel(feqn, est_addr + EST_FRM_SZ_ERR);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.h
index d247fa383a6e44a5a8371dd491eab5b1c99cd1f2..f70221c9c84afe6bce62782c7847a8005e469dd7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.h
@@ -16,6 +16,7 @@
#define EST_XGMAC_PTOV_MUL 9
#define EST_SSWL BIT(1)
#define EST_EEST BIT(0)
+#define EST_DFBS BIT(5)
#define EST_STATUS 0x00000008
#define EST_GMAC5_BTRL GENMASK(11, 8)
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats
2025-09-25 14:06 [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error Rohan G Thomas via B4 Relay
2025-09-25 14:06 ` [PATCH net-next v3 1/2] net: stmmac: est: " Rohan G Thomas via B4 Relay
@ 2025-09-25 14:06 ` Rohan G Thomas via B4 Relay
2025-09-26 13:20 ` Furong Xu
2025-09-30 1:20 ` [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Rohan G Thomas via B4 Relay @ 2025-09-25 14:06 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Rohan G Thomas, Matthew Gerlach
From: Rohan G Thomas <rohan.g.thomas@altera.com>
Add the count of the frames dropped by Head-Of-Line Blocking due to
Scheduling(HLBS) error to taprio window drop count stats.
Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 694d6ee1438197bd4434af6e9b78f022e94ff98f..97e89a604abd7a01bb8e904c38f10716e0a911c1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -1080,6 +1080,7 @@ static int tc_taprio_configure(struct stmmac_priv *priv,
for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
priv->xstats.max_sdu_txq_drop[i] = 0;
priv->xstats.mtl_est_txq_hlbf[i] = 0;
+ priv->xstats.mtl_est_txq_hlbs[i] = 0;
}
mutex_unlock(&priv->est_lock);
}
@@ -1097,7 +1098,8 @@ static void tc_taprio_stats(struct stmmac_priv *priv,
for (i = 0; i < priv->plat->tx_queues_to_use; i++)
window_drops += priv->xstats.max_sdu_txq_drop[i] +
- priv->xstats.mtl_est_txq_hlbf[i];
+ priv->xstats.mtl_est_txq_hlbf[i] +
+ priv->xstats.mtl_est_txq_hlbs[i];
qopt->stats.window_drops = window_drops;
/* Transmission overrun doesn't happen for stmmac, hence always 0 */
@@ -1111,7 +1113,8 @@ static void tc_taprio_queue_stats(struct stmmac_priv *priv,
int queue = qopt->queue_stats.queue;
q_stats->stats.window_drops = priv->xstats.max_sdu_txq_drop[queue] +
- priv->xstats.mtl_est_txq_hlbf[queue];
+ priv->xstats.mtl_est_txq_hlbf[queue] +
+ priv->xstats.mtl_est_txq_hlbs[queue];
/* Transmission overrun doesn't happen for stmmac, hence always 0 */
q_stats->stats.tx_overruns = 0;
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats
2025-09-25 14:06 ` [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats Rohan G Thomas via B4 Relay
@ 2025-09-26 13:20 ` Furong Xu
0 siblings, 0 replies; 6+ messages in thread
From: Furong Xu @ 2025-09-26 13:20 UTC (permalink / raw)
To: Rohan G Thomas
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, netdev,
linux-stm32, linux-arm-kernel, linux-kernel, Matthew Gerlach
On Thu, 25 Sep 2025 22:06:14 +0800
Rohan G Thomas <rohan.g.thomas@altera.com> wrote:
> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>
> Add the count of the frames dropped by Head-Of-Line Blocking due to
> Scheduling(HLBS) error to taprio window drop count stats.
>
> Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
> Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
Reviewed-by: Furong Xu <0x1207@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 1/2] net: stmmac: est: Drop frames causing HLBS error
2025-09-25 14:06 ` [PATCH net-next v3 1/2] net: stmmac: est: " Rohan G Thomas via B4 Relay
@ 2025-09-26 13:25 ` Furong Xu
0 siblings, 0 replies; 6+ messages in thread
From: Furong Xu @ 2025-09-26 13:25 UTC (permalink / raw)
To: Rohan G Thomas
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, netdev,
linux-stm32, linux-arm-kernel, linux-kernel, Matthew Gerlach
On Thu, 25 Sep 2025 22:06:13 +0800
Rohan G Thomas <rohan.g.thomas@altera.com> wrote:
> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>
> Drop those frames causing Head-of-Line Blocking due to Scheduling
> (HLBS) error to avoid HLBS interrupt flooding and netdev watchdog
> timeouts due to blocked packets. Tx queues can be configured to drop
> those blocked packets by setting Drop Frames causing Scheduling Error
> (DFBS) bit of EST_CONTROL register.
>
> Also, add per queue HLBS drop count.
>
> Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
> Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
Reviewed-by: Furong Xu <0x1207@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error
2025-09-25 14:06 [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error Rohan G Thomas via B4 Relay
2025-09-25 14:06 ` [PATCH net-next v3 1/2] net: stmmac: est: " Rohan G Thomas via B4 Relay
2025-09-25 14:06 ` [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats Rohan G Thomas via B4 Relay
@ 2025-09-30 1:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-30 1:20 UTC (permalink / raw)
To: G, Thomas, Rohan
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
alexandre.torgue, netdev, linux-stm32, linux-arm-kernel,
linux-kernel, matthew.gerlach
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 25 Sep 2025 22:06:12 +0800 you wrote:
> This patchset consists of following patchset to avoid netdev watchdog
> reset due to Head-of-Line Blocking due to EST scheduling error.
> 1. Drop those frames causing HLBS error
> 2. Add HLBS frame drops to taprio stats
>
> Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
>
> [...]
Here is the summary with links:
- [net-next,v3,1/2] net: stmmac: est: Drop frames causing HLBS error
https://git.kernel.org/netdev/net-next/c/7ce48d497475
- [net-next,v3,2/2] net: stmmac: tc: Add HLBS drop count to taprio stats
https://git.kernel.org/netdev/net-next/c/de17376cad97
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-30 1:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25 14:06 [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error Rohan G Thomas via B4 Relay
2025-09-25 14:06 ` [PATCH net-next v3 1/2] net: stmmac: est: " Rohan G Thomas via B4 Relay
2025-09-26 13:25 ` Furong Xu
2025-09-25 14:06 ` [PATCH net-next v3 2/2] net: stmmac: tc: Add HLBS drop count to taprio stats Rohan G Thomas via B4 Relay
2025-09-26 13:20 ` Furong Xu
2025-09-30 1:20 ` [PATCH net-next v3 0/2] net: stmmac: Drop frames causing HLBS error patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).