mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
net: stmmac: est: Drop frames causing HLBS error
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> Link: https://patch.msgid.link/20250925-hlbs_2-v3-1-3b39472776c2@altera.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
96ccc93744
commit
7ce48d4974
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user