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

Function _task_fn_tx

freebsd/net/iflib.c:3881–3919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3879}
3880
3881static 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
3913skip_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
3921static void
3922_task_fn_rx(void *context)

Callers

nothing calls this directly

Calls 5

if_getdrvflagsFunction · 0.85
if_getcapenableFunction · 0.85
iflib_altq_if_startFunction · 0.85
ifmp_ring_enqueueFunction · 0.85
ifmp_ring_check_drainageFunction · 0.85

Tested by

no test coverage detected