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

Function calc_next_rxd

freebsd/net/iflib.c:2587–2604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2585}
2586
2587static inline caddr_t
2588calc_next_rxd(iflib_fl_t fl, int cidx)
2589{
2590 qidx_t size;
2591 int nrxd;
2592 caddr_t start, end, cur, next;
2593
2594 nrxd = fl->ifl_size;
2595 size = fl->ifl_rxd_size;
2596 start = fl->ifl_ifdi->idi_vaddr;
2597
2598 if (__predict_false(size == 0))
2599 return (start);
2600 cur = start + size*cidx;
2601 end = start + size*nrxd;
2602 next = CACHE_PTR_NEXT(cur);
2603 return (next < end ? next : start);
2604}
2605
2606static inline void
2607prefetch_pkts(iflib_fl_t fl, int cidx)

Callers 1

prefetch_pktsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected