git: 75538a0f3275 - main - igbv: Do not replay VLANs while stopped

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Sun, 09 Aug 2026 03:04:18 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=75538a0f3275887d75f3585038d3de23baad9005

commit 75538a0f3275887d75f3585038d3de23baad9005
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-08 16:34:05 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-09 03:03:52 +0000

    igbv: Do not replay VLANs while stopped
    
    iflib clears IFF_DRV_RUNNING before the driver stop callback but leaves
    IFF_DRV_OACTIVE set.  Consequently, an already queued admin task can
    run after the VF reset.  If that task consumes a pending timer sample,
    it can retry failed VLAN mailbox operations and restore PF filters for
    the stopped VF.
    
    Continue sampling statistics, but only run the VLAN retry worker while
    the interface is running.
---
 sys/dev/e1000/if_igbv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/e1000/if_igbv.c b/sys/dev/e1000/if_igbv.c
index c8ecd334d862..566c184fb133 100644
--- a/sys/dev/e1000/if_igbv.c
+++ b/sys/dev/e1000/if_igbv.c
@@ -365,7 +365,10 @@ igbv_if_update_admin_status(if_ctx_t ctx)
 	    atomic_readandclear_32(&sc->stats_pending) != 0;
 	if (timer_tick) {
 		em_update_stats_counters(sc);
-		igbv_vlan_retry_tick(sc);
+		/* iflib clears RUNNING before stop; do not replay after reset. */
+		if ((if_getdrvflags(iflib_get_ifp(ctx)) &
+		    IFF_DRV_RUNNING) != 0)
+			igbv_vlan_retry_tick(sc);
 	}
 }