Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 2,917 Lines • ▼ Show 20 Lines | for (budget_left = budget; budget_left > 0 && avail > 0;) { | ||||
ri.iri_qsidx = rxq->ifr_id; | ri.iri_qsidx = rxq->ifr_id; | ||||
ri.iri_cidx = *cidxp; | ri.iri_cidx = *cidxp; | ||||
ri.iri_ifp = ifp; | ri.iri_ifp = ifp; | ||||
ri.iri_frags = rxq->ifr_frags; | ri.iri_frags = rxq->ifr_frags; | ||||
err = ctx->isc_rxd_pkt_get(ctx->ifc_softc, &ri); | err = ctx->isc_rxd_pkt_get(ctx->ifc_softc, &ri); | ||||
if (err) | if (err) | ||||
goto err; | goto err; | ||||
rx_pkts += 1; | rx_pkts += 1; | ||||
rx_bytes += ri.iri_len; | rx_bytes += ri.iri_len; | ||||
erj: So then, this is the one place that the stats should be incremented | |||||
Done Inline ActionsCorrect. The deleted lines run after pfil hooks run, and so won't count dropped (recycled) packets. markj: Correct. The deleted lines run after pfil hooks run, and so won't count dropped (recycled)… | |||||
if (sctx->isc_flags & IFLIB_HAS_RXCQ) { | if (sctx->isc_flags & IFLIB_HAS_RXCQ) { | ||||
*cidxp = ri.iri_cidx; | *cidxp = ri.iri_cidx; | ||||
/* Update our consumer index */ | /* Update our consumer index */ | ||||
/* XXX NB: shurd - check if this is still safe */ | /* XXX NB: shurd - check if this is still safe */ | ||||
while (rxq->ifr_cq_cidx >= scctx->isc_nrxd[0]) | while (rxq->ifr_cq_cidx >= scctx->isc_nrxd[0]) | ||||
rxq->ifr_cq_cidx -= scctx->isc_nrxd[0]; | rxq->ifr_cq_cidx -= scctx->isc_nrxd[0]; | ||||
/* was this only a completion queue message? */ | /* was this only a completion queue message? */ | ||||
if (__predict_false(ri.iri_nfrags == 0)) | if (__predict_false(ri.iri_nfrags == 0)) | ||||
Show All 32 Lines | iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) | ||||
while (mh != NULL) { | while (mh != NULL) { | ||||
m = mh; | m = mh; | ||||
mh = mh->m_nextpkt; | mh = mh->m_nextpkt; | ||||
m->m_nextpkt = NULL; | m->m_nextpkt = NULL; | ||||
#ifndef __NO_STRICT_ALIGNMENT | #ifndef __NO_STRICT_ALIGNMENT | ||||
if (!IP_ALIGNED(m) && (m = iflib_fixup_rx(m)) == NULL) | if (!IP_ALIGNED(m) && (m = iflib_fixup_rx(m)) == NULL) | ||||
continue; | continue; | ||||
#endif | #endif | ||||
rx_bytes += m->m_pkthdr.len; | |||||
rx_pkts++; | |||||
#if defined(INET6) || defined(INET) | #if defined(INET6) || defined(INET) | ||||
if (lro_enabled) { | if (lro_enabled) { | ||||
if (!lro_possible) { | if (!lro_possible) { | ||||
lro_possible = iflib_check_lro_possible(m, v4_forwarding, v6_forwarding); | lro_possible = iflib_check_lro_possible(m, v4_forwarding, v6_forwarding); | ||||
if (lro_possible && mf != NULL) { | if (lro_possible && mf != NULL) { | ||||
ifp->if_input(ifp, mf); | ifp->if_input(ifp, mf); | ||||
DBG_COUNTER_INC(rx_if_input); | DBG_COUNTER_INC(rx_if_input); | ||||
mt = mf = NULL; | mt = mf = NULL; | ||||
▲ Show 20 Lines • Show All 4,008 Lines • Show Last 20 Lines |
So then, this is the one place that the stats should be incremented