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

Function calc_next_txd

freebsd/net/iflib.c:3325–3342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3323}
3324
3325static inline caddr_t
3326calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid)
3327{
3328 qidx_t size;
3329 int ntxd;
3330 caddr_t start, end, cur, next;
3331
3332 ntxd = txq->ift_size;
3333 size = txq->ift_txd_size[qid];
3334 start = txq->ift_ifdi[qid].idi_vaddr;
3335
3336 if (__predict_false(size == 0))
3337 return (start);
3338 cur = start + size*cidx;
3339 end = start + size*ntxd;
3340 next = CACHE_PTR_NEXT(cur);
3341 return (next < end ? next : start);
3342}
3343
3344/*
3345 * Pad an mbuf to ensure a minimum ethernet frame size.

Callers 1

iflib_encapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected