Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 2,273 Lines • ▼ Show 20 Lines | if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) | ||||
callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); | callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); | ||||
return; | return; | ||||
hung: | hung: | ||||
device_printf(ctx->ifc_dev, "TX(%d) desc avail = %d, pidx = %d\n", | device_printf(ctx->ifc_dev, "TX(%d) desc avail = %d, pidx = %d\n", | ||||
txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); | txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); | ||||
STATE_LOCK(ctx); | STATE_LOCK(ctx); | ||||
if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); | if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); | ||||
ctx->ifc_flags |= (IFC_DO_WATCHDOG|IFC_DO_RESET); | ctx->ifc_flags |= (IFC_DO_WATCHDOG|IFC_DO_RESET); | ||||
iflib_admin_intr_deferred(ctx); | |||||
shurd: Called with STATE_LOCK() | |||||
STATE_UNLOCK(ctx); | STATE_UNLOCK(ctx); | ||||
iflib_admin_intr_deferred(ctx); | |||||
} | } | ||||
static void | static void | ||||
iflib_init_locked(if_ctx_t ctx) | iflib_init_locked(if_ctx_t ctx) | ||||
{ | { | ||||
if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; | if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; | ||||
if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; | if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; | ||||
if_t ifp = ctx->ifc_ifp; | if_t ifp = ctx->ifc_ifp; | ||||
▲ Show 20 Lines • Show All 505 Lines • ▼ Show 20 Lines | #if defined(INET6) || defined(INET) | ||||
tcp_lro_flush_all(&rxq->ifr_lc); | tcp_lro_flush_all(&rxq->ifr_lc); | ||||
#endif | #endif | ||||
if (avail) | if (avail) | ||||
return true; | return true; | ||||
return (iflib_rxd_avail(ctx, rxq, *cidxp, 1)); | return (iflib_rxd_avail(ctx, rxq, *cidxp, 1)); | ||||
err: | err: | ||||
STATE_LOCK(ctx); | STATE_LOCK(ctx); | ||||
ctx->ifc_flags |= IFC_DO_RESET; | ctx->ifc_flags |= IFC_DO_RESET; | ||||
iflib_admin_intr_deferred(ctx); | |||||
Not Done Inline ActionsCalled with STATE_LOCK() shurd: Called with STATE_LOCK() | |||||
STATE_UNLOCK(ctx); | STATE_UNLOCK(ctx); | ||||
iflib_admin_intr_deferred(ctx); | |||||
return (false); | return (false); | ||||
} | } | ||||
#define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) | #define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) | ||||
static inline qidx_t | static inline qidx_t | ||||
txq_max_db_deferred(iflib_txq_t txq, qidx_t in_use) | txq_max_db_deferred(iflib_txq_t txq, qidx_t in_use) | ||||
{ | { | ||||
qidx_t notify_count = TXD_NOTIFY_COUNT(txq); | qidx_t notify_count = TXD_NOTIFY_COUNT(txq); | ||||
▲ Show 20 Lines • Show All 3,153 Lines • ▼ Show 20 Lines | iflib_rx_intr_deferred(if_ctx_t ctx, int rxqid) | ||||
GROUPTASK_ENQUEUE(&ctx->ifc_rxqs[rxqid].ifr_task); | GROUPTASK_ENQUEUE(&ctx->ifc_rxqs[rxqid].ifr_task); | ||||
} | } | ||||
void | void | ||||
iflib_admin_intr_deferred(if_ctx_t ctx) | iflib_admin_intr_deferred(if_ctx_t ctx) | ||||
{ | { | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
struct grouptask *gtask; | struct grouptask *gtask; | ||||
#endif | |||||
if (iflib_in_detach(ctx)) | |||||
return; | |||||
#ifdef INVARIANTS | |||||
gtask = &ctx->ifc_admin_task; | gtask = &ctx->ifc_admin_task; | ||||
MPASS(gtask != NULL && gtask->gt_taskqueue != NULL); | MPASS(gtask != NULL && gtask->gt_taskqueue != NULL); | ||||
#endif | #endif | ||||
GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); | GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); | ||||
} | } | ||||
void | void | ||||
iflib_iov_intr_deferred(if_ctx_t ctx) | iflib_iov_intr_deferred(if_ctx_t ctx) | ||||
{ | { | ||||
if (iflib_in_detach(ctx)) | |||||
return; | |||||
Not Done Inline ActionsWeren't we going to add the iflib_in_detach() check here as well? Did we decide it wasn't needed? shurd: Weren't we going to add the iflib_in_detach() check here as well? Did we decide it wasn't… | |||||
GROUPTASK_ENQUEUE(&ctx->ifc_vflr_task); | GROUPTASK_ENQUEUE(&ctx->ifc_vflr_task); | ||||
} | } | ||||
void | void | ||||
iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name) | iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name) | ||||
{ | { | ||||
taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, -1, name); | taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, -1, name); | ||||
▲ Show 20 Lines • Show All 629 Lines • Show Last 20 Lines |
Called with STATE_LOCK()