Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-stmmac-drop-frames-causing-hlbs-error'

Rohan G Thomas says:

====================
net: stmmac: Drop frames causing HLBS error

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

v2: https://lore.kernel.org/r/20250915-hlbs_2-v2-1-27266b2afdd9@altera.com
====================

Link: https://patch.msgid.link/20250925-hlbs_2-v3-0-3b39472776c2@altera.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+13 -5
+1
drivers/net/ethernet/stmicro/stmmac/common.h
··· 228 228 unsigned long mtl_est_btrlm; 229 229 unsigned long max_sdu_txq_drop[MTL_MAX_TX_QUEUES]; 230 230 unsigned long mtl_est_txq_hlbf[MTL_MAX_TX_QUEUES]; 231 + unsigned long mtl_est_txq_hlbs[MTL_MAX_TX_QUEUES]; 231 232 /* per queue statistics */ 232 233 struct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES]; 233 234 struct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES];
+6 -3
drivers/net/ethernet/stmicro/stmmac/stmmac_est.c
··· 63 63 EST_GMAC5_PTOV_SHIFT; 64 64 } 65 65 if (cfg->enable) 66 - ctrl |= EST_EEST | EST_SSWL; 66 + ctrl |= EST_EEST | EST_SSWL | EST_DFBS; 67 67 else 68 68 ctrl &= ~EST_EEST; 69 69 ··· 109 109 110 110 x->mtl_est_hlbs++; 111 111 112 + for (i = 0; i < txqcnt; i++) 113 + if (value & BIT(i)) 114 + x->mtl_est_txq_hlbs[i]++; 115 + 112 116 /* Clear Interrupt */ 113 117 writel(value, est_addr + EST_SCH_ERR); 114 118 ··· 135 131 136 132 x->mtl_est_hlbf++; 137 133 138 - for (i = 0; i < txqcnt; i++) { 134 + for (i = 0; i < txqcnt; i++) 139 135 if (feqn & BIT(i)) 140 136 x->mtl_est_txq_hlbf[i]++; 141 - } 142 137 143 138 /* Clear Interrupt */ 144 139 writel(feqn, est_addr + EST_FRM_SZ_ERR);
+1
drivers/net/ethernet/stmicro/stmmac/stmmac_est.h
··· 16 16 #define EST_XGMAC_PTOV_MUL 9 17 17 #define EST_SSWL BIT(1) 18 18 #define EST_EEST BIT(0) 19 + #define EST_DFBS BIT(5) 19 20 20 21 #define EST_STATUS 0x00000008 21 22 #define EST_GMAC5_BTRL GENMASK(11, 8)
+5 -2
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
··· 1080 1080 for (i = 0; i < priv->plat->tx_queues_to_use; i++) { 1081 1081 priv->xstats.max_sdu_txq_drop[i] = 0; 1082 1082 priv->xstats.mtl_est_txq_hlbf[i] = 0; 1083 + priv->xstats.mtl_est_txq_hlbs[i] = 0; 1083 1084 } 1084 1085 mutex_unlock(&priv->est_lock); 1085 1086 } ··· 1098 1097 1099 1098 for (i = 0; i < priv->plat->tx_queues_to_use; i++) 1100 1099 window_drops += priv->xstats.max_sdu_txq_drop[i] + 1101 - priv->xstats.mtl_est_txq_hlbf[i]; 1100 + priv->xstats.mtl_est_txq_hlbf[i] + 1101 + priv->xstats.mtl_est_txq_hlbs[i]; 1102 1102 qopt->stats.window_drops = window_drops; 1103 1103 1104 1104 /* Transmission overrun doesn't happen for stmmac, hence always 0 */ ··· 1113 1111 int queue = qopt->queue_stats.queue; 1114 1112 1115 1113 q_stats->stats.window_drops = priv->xstats.max_sdu_txq_drop[queue] + 1116 - priv->xstats.mtl_est_txq_hlbf[queue]; 1114 + priv->xstats.mtl_est_txq_hlbf[queue] + 1115 + priv->xstats.mtl_est_txq_hlbs[queue]; 1117 1116 1118 1117 /* Transmission overrun doesn't happen for stmmac, hence always 0 */ 1119 1118 q_stats->stats.tx_overruns = 0;