| 4203 | #endif /* ALTQ */ |
| 4204 | |
| 4205 | static void |
| 4206 | iflib_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 | \ |
nothing calls this directly
no test coverage detected