Skip to content

Commit fd5a6a7

Browse files
rohangt07davem330
authored andcommitted
net: stmmac: est: Per Tx-queue error count for HLBF
Keep per Tx-queue error count on Head-Of-Line Blocking due to frame size(HLBF) error. The MAC raises HLBF error on one or more queues when none of the time Intervals of open-gates in the GCL is greater than or equal to the duration needed for frame transmission and by default drops those packets that causes HLBF error. EST_FRM_SZ_ERR register provides the One Hot encoded Queue numbers that have the Frame Size related error. Signed-off-by: Rohan G Thomas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c5c3e1b commit fd5a6a7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ struct stmmac_extra_stats {
203203
unsigned long mtl_est_btre;
204204
unsigned long mtl_est_btrlm;
205205
unsigned long max_sdu_txq_drop[MTL_MAX_TX_QUEUES];
206+
unsigned long mtl_est_txq_hlbf[MTL_MAX_TX_QUEUES];
206207
/* per queue statistics */
207208
struct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES];
208209
struct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES];

drivers/net/ethernet/stmicro/stmmac/stmmac_est.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev,
8181
u32 status, value, feqn, hbfq, hbfs, btrl, btrl_max;
8282
void __iomem *est_addr = priv->estaddr;
8383
u32 txqcnt_mask = BIT(txqcnt) - 1;
84+
int i;
8485

8586
status = readl(est_addr + EST_STATUS);
8687

@@ -125,6 +126,11 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev,
125126

126127
x->mtl_est_hlbf++;
127128

129+
for (i = 0; i < txqcnt; i++) {
130+
if (feqn & BIT(i))
131+
x->mtl_est_txq_hlbf[i]++;
132+
}
133+
128134
/* Clear Interrupt */
129135
writel(feqn, est_addr + EST_FRM_SZ_ERR);
130136

0 commit comments

Comments
 (0)