| 3879 | } |
| 3880 | |
| 3881 | static void |
| 3882 | _task_fn_tx(void *context) |
| 3883 | { |
| 3884 | iflib_txq_t txq = context; |
| 3885 | if_ctx_t ctx = txq->ift_ctx; |
| 3886 | if_t ifp = ctx->ifc_ifp; |
| 3887 | int abdicate = ctx->ifc_sysctl_tx_abdicate; |
| 3888 | |
| 3889 | #ifdef IFLIB_DIAGNOSTICS |
| 3890 | txq->ift_cpu_exec_count[curcpu]++; |
| 3891 | #endif |
| 3892 | if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) |
| 3893 | return; |
| 3894 | #ifdef DEV_NETMAP |
| 3895 | if ((if_getcapenable(ifp) & IFCAP_NETMAP) && |
| 3896 | netmap_tx_irq(ifp, txq->ift_id)) |
| 3897 | goto skip_ifmp; |
| 3898 | #endif |
| 3899 | #ifdef ALTQ |
| 3900 | if (ALTQ_IS_ENABLED(&ifp->if_snd)) |
| 3901 | iflib_altq_if_start(ifp); |
| 3902 | #endif |
| 3903 | if (txq->ift_db_pending) |
| 3904 | ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE, abdicate); |
| 3905 | else if (!abdicate) |
| 3906 | ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); |
| 3907 | /* |
| 3908 | * When abdicating, we always need to check drainage, not just when we don't enqueue |
| 3909 | */ |
| 3910 | if (abdicate) |
| 3911 | ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); |
| 3912 | #ifdef DEV_NETMAP |
| 3913 | skip_ifmp: |
| 3914 | #endif |
| 3915 | if (ctx->ifc_flags & IFC_LEGACY) |
| 3916 | IFDI_INTR_ENABLE(ctx); |
| 3917 | else |
| 3918 | IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); |
| 3919 | } |
| 3920 | |
| 3921 | static void |
| 3922 | _task_fn_rx(void *context) |
nothing calls this directly
no test coverage detected