From 3cde856b4b68b5d6bbb9d6bb2d1b995f0babe109 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 20 May 2026 09:23:07 +0200 Subject: lib: Set a timeout on FRCT control packets Time out frct_tx for control packets at 250us so a full tx ring cannot stall the timer wheel (and with it KA, TLP, RXM fires). DATA frames (fresh, RXM, TLP, FIN) keep blocking - dropping them would lose recovery progress. Add inact_drop, drf_rebase, rq_released, tlp_snd, sdu_snd_alloc, sdu_snd_tx, sdu_sole, rxm_tx_dead, and per-type tx_drop counters. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/dev.c') diff --git a/src/lib/dev.c b/src/lib/dev.c index 6177e50b..13c7544b 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -1640,15 +1640,21 @@ static ssize_t flow_write_frag(struct flow * flow, &spb, dl); else idx = ssm_pool_alloc(proc.pool, clen, &ptr, &spb); - if (idx < 0) + if (idx < 0) { + if (off > 0) + STAT_BUMP(flow->frcti, sdu_snd_alloc); return off > 0 ? (ssize_t) off : idx; + } memcpy(ptr, src + off, clen); ret = flow_tx_spb(flow, spb, flow_frag_role(i, n), block, dl); - if (ret < 0) + if (ret < 0) { + if (off > 0) + STAT_BUMP(flow->frcti, sdu_snd_tx); return off > 0 ? (ssize_t) off : (ssize_t) ret; + } off += clen; } -- cgit v1.2.3