Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 2,066 Lines • ▼ Show 20 Lines | #endif | ||||
if (fl->ifl_pidx == 0) | if (fl->ifl_pidx == 0) | ||||
pidx = fl->ifl_size - 1; | pidx = fl->ifl_size - 1; | ||||
else | else | ||||
pidx = fl->ifl_pidx - 1; | pidx = fl->ifl_pidx - 1; | ||||
bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, | bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, | ||||
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); | BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); | ||||
ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); | ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); | ||||
fl->ifl_fragidx = frag_idx; | fl->ifl_fragidx = frag_idx + 1; | ||||
if (fl->ifl_fragidx == fl->ifl_size) | |||||
fl->ifl_fragidx = 0; | |||||
return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); | return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); | ||||
} | } | ||||
static __inline uint8_t | static __inline uint8_t | ||||
__iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int max) | __iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int max) | ||||
{ | { | ||||
/* we avoid allowing pidx to catch up with cidx as it confuses ixl */ | /* we avoid allowing pidx to catch up with cidx as it confuses ixl */ | ||||
▲ Show 20 Lines • Show All 4,782 Lines • Show Last 20 Lines |