Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/iflib.c
Show First 20 Lines • Show All 3,784 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
_task_fn_rx(void *context) | _task_fn_rx(void *context) | ||||
{ | { | ||||
iflib_rxq_t rxq = context; | iflib_rxq_t rxq = context; | ||||
if_ctx_t ctx = rxq->ifr_ctx; | if_ctx_t ctx = rxq->ifr_ctx; | ||||
uint8_t more; | uint8_t more; | ||||
uint16_t budget; | uint16_t budget; | ||||
#ifdef DEV_NETMAP | |||||
u_int work = 0; | |||||
int nmirq; | |||||
#endif | |||||
#ifdef IFLIB_DIAGNOSTICS | #ifdef IFLIB_DIAGNOSTICS | ||||
rxq->ifr_cpu_exec_count[curcpu]++; | rxq->ifr_cpu_exec_count[curcpu]++; | ||||
#endif | #endif | ||||
DBG_COUNTER_INC(task_fn_rxs); | DBG_COUNTER_INC(task_fn_rxs); | ||||
if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) | if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) | ||||
return; | return; | ||||
#ifdef DEV_NETMAP | #ifdef DEV_NETMAP | ||||
if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) { | nmirq = netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work); | ||||
u_int work = 0; | if (nmirq != NM_IRQ_PASS) { | ||||
if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) { | more = (nmirq == NM_IRQ_RESCHED) ? IFLIB_RXEOF_MORE : 0; | ||||
more = 0; | |||||
goto skip_rxeof; | goto skip_rxeof; | ||||
} | |||||
} | } | ||||
#endif | #endif | ||||
budget = ctx->ifc_sysctl_rx_budget; | budget = ctx->ifc_sysctl_rx_budget; | ||||
if (budget == 0) | if (budget == 0) | ||||
budget = 16; /* XXX */ | budget = 16; /* XXX */ | ||||
more = iflib_rxeof(rxq, budget); | more = iflib_rxeof(rxq, budget); | ||||
#ifdef DEV_NETMAP | #ifdef DEV_NETMAP | ||||
skip_rxeof: | skip_rxeof: | ||||
▲ Show 20 Lines • Show All 3,034 Lines • Show Last 20 Lines |