Date: Tue, 04 Aug 2026 17:15:26 +0000 From: Alexander Leidinger <netchild@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 65349af4422f - main - iflib: clear the deferred TX descriptor state when a queue is stopped Message-ID: <6a721e2e.2286f.16affed0@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=65349af4422ffffe40850168c5feb808d43ad06d commit 65349af4422ffffe40850168c5feb808d43ad06d Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2026-08-04 16:44:54 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2026-08-04 17:14:58 +0000 iflib: clear the deferred TX descriptor state when a queue is stopped Stopping an interface frees the queued mbufs and zeroes a transmit queue's descriptor accounting, but the three counters that track descriptors deferred to a later doorbell write or report-status request are not cleared there: they only reach zero when the code that acts on them runs. After a reset they therefore describe descriptors that no longer exist, until enough new traffic flushes them. The consequences are small - one doorbell written from a stale count, and a report-status request on the first packet after the reset - but the state is simply wrong, and the transmit-hang check in iflib_timer() reads one of them. MFC after: 1 week Assisted-by: Claude Code (Opus 5) --- sys/net/iflib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index f865f2414281..63455fb46d70 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2701,6 +2701,8 @@ iflib_stop(if_ctx_t ctx) txq->ift_outstanding_prev = 0; txq->ift_wdog_armed = 0; txq->ift_in_use = txq->ift_gen = txq->ift_no_desc_avail = 0; + txq->ift_npending = txq->ift_db_pending = 0; + txq->ift_rs_pending = 0; if (sctx->isc_flags & IFLIB_PRESERVE_TX_INDICES) txq->ift_cidx = txq->ift_pidx; elsehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a721e2e.2286f.16affed0>
