MCPcopy Create free account
hub / github.com/F-Stack/f-stack / iflib_if_qflush

Function iflib_if_qflush

freebsd/net/iflib.c:4205–4227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4203#endif /* ALTQ */
4204
4205static void
4206iflib_if_qflush(if_t ifp)
4207{
4208 if_ctx_t ctx = if_getsoftc(ifp);
4209 iflib_txq_t txq = ctx->ifc_txqs;
4210 int i;
4211
4212 STATE_LOCK(ctx);
4213 ctx->ifc_flags |= IFC_QFLUSH;
4214 STATE_UNLOCK(ctx);
4215 for (i = 0; i < NTXQSETS(ctx); i++, txq++)
4216 while (!(ifmp_ring_is_idle(txq->ift_br) || ifmp_ring_is_stalled(txq->ift_br)))
4217 iflib_txq_check_drain(txq, 0);
4218 STATE_LOCK(ctx);
4219 ctx->ifc_flags &= ~IFC_QFLUSH;
4220 STATE_UNLOCK(ctx);
4221
4222 /*
4223 * When ALTQ is enabled, this will also take care of purging the
4224 * ALTQ queue(s).
4225 */
4226 if_qflush(ifp);
4227}
4228
4229#define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \
4230 IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \

Callers

nothing calls this directly

Calls 5

if_getsoftcFunction · 0.85
ifmp_ring_is_idleFunction · 0.85
ifmp_ring_is_stalledFunction · 0.85
iflib_txq_check_drainFunction · 0.85
if_qflushFunction · 0.85

Tested by

no test coverage detected