aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2020-06-09 16:11:54 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2020-06-09 16:11:54 +0000
commit0d707bd5b6ee2c32b11affb0dbb74330109296f8 (patch)
treec13ba880a56a87e86d0dd3c837df80006779ab70
parentc8c559b872457509bef5e25533d4030c70a93e31 (diff)
downloadsrc-0d707bd5b6ee2c32b11affb0dbb74330109296f8.tar.gz
src-0d707bd5b6ee2c32b11affb0dbb74330109296f8.zip
Fix iflib watchdog timeout resetting idle queues.
Approved by: so Security: FreeBSD-EN-20:12.iflib
Notes
Notes: svn path=/releng/12.1/; revision=361971
-rw-r--r--sys/net/iflib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 1e248c00c80f..0d7df624082e 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2294,8 +2294,11 @@ iflib_timer(void *arg)
(sctx->isc_pause_frames == 0)))
goto hung;
- if (ifmp_ring_is_stalled(txq->ift_br))
+ if (txq->ift_qstatus != IFLIB_QUEUE_IDLE &&
+ ifmp_ring_is_stalled(txq->ift_br)) {
+ KASSERT(ctx->ifc_link_state == LINK_STATE_UP, ("queue can't be marked as hung if interface is down"));
txq->ift_qstatus = IFLIB_QUEUE_HUNG;
+ }
txq->ift_cleaned_prev = txq->ift_cleaned;
}
#ifdef DEV_NETMAP