Home
last modified time | relevance | path

Searched refs:cidx (Results 1 – 25 of 39) sorted by relevance

12

/freebsd/sys/net/
H A Dmp_ring.c42 uint16_t cidx; member
61 if (s.cidx == s.pidx_head) in space_available()
63 else if (s.cidx > s.pidx_head) in space_available()
64 return (s.cidx - s.pidx_head - 1); in space_available()
66 return (x - s.pidx_head + s.cidx); in space_available()
83 if (s.cidx == s.pidx_tail) in state_to_flags()
97 uint16_t cidx = os.cidx; in drain_ring_locked() local
101 MPASS(cidx != pidx); in drain_ring_locked()
108 while (cidx != pidx) { in drain_ring_locked()
110 n = r->drain(r, cidx, pidx); in drain_ring_locked()
[all …]
H A Diflib.c452 get_inuse(int size, qidx_t cidx, qidx_t pidx, uint8_t gen) in get_inuse() argument
456 if (pidx > cidx) in get_inuse()
457 used = pidx - cidx; in get_inuse()
458 else if (pidx < cidx) in get_inuse()
459 used = size - cidx + pidx; in get_inuse()
460 else if (gen == 0 && pidx == cidx) in get_inuse()
462 else if (gen == 1 && pidx == cidx) in get_inuse()
679 static int iflib_rxd_avail(if_ctx_t ctx, iflib_rxq_t rxq, qidx_t cidx, qidx_t budget);
1572 int i, cidx, result; in iflib_fast_intr_rxtx() local
1603 cidx = rxq->ifr_cq_cidx; in iflib_fast_intr_rxtx()
[all …]
/freebsd/sys/dev/cxgbe/
H A Dt4_mp_ring.c66 uint16_t cidx; member
93 if (s.cidx == s.pidx_head) in space_available()
95 else if (s.cidx > s.pidx_head) in space_available()
96 return (s.cidx - s.pidx_head - 1); in space_available()
98 return (x - s.pidx_head + s.cidx); in space_available()
119 uint16_t cidx; in drain_ring() local
128 cidx = os.cidx; in drain_ring()
130 MPASS(cidx != pidx); in drain_ring()
135 while (cidx ! in drain_ring()
230 uint16_t cidx = os.cidx; drain_txpkts() local
[all...]
H A Dt4_netmap.c230 nm_txq->pidx = nm_txq->cidx = 0; in alloc_nm_txq()
251 &nm_txq->cidx, 0, "consumer index"); in alloc_nm_txq()
462 nm_txq->pidx = nm_txq->cidx = 0; in alloc_nm_txq_hwq()
1066 if (nm_txq->cidx > nm_txq->pidx) in contiguous_ndesc_available()
1067 return (nm_txq->cidx - nm_txq->pidx - 1); in contiguous_ndesc_available()
1068 else if (nm_txq->cidx > 0) in contiguous_ndesc_available()
1078 uint16_t hw_cidx = spg->cidx; /* snapshot */ in reclaim_nm_tx_desc()
1084 while (nm_txq->cidx != hw_cidx) { in reclaim_nm_tx_desc()
1085 wr = (void *)&nm_txq->desc[nm_txq->cidx]; in reclaim_nm_tx_desc()
1093 nm_txq->cidx += npkt_to_ndesc(wr->npkt); in reclaim_nm_tx_desc()
[all …]
H A Dt4_sge.c1430 struct iq_desc *d = &iq->desc[iq->cidx]; in service_iq()
1508 if (__predict_false(++iq->cidx == iq->sidx)) { in service_iq()
1509 iq->cidx = 0; in service_iq()
1597 if (__predict_false((++fl->cidx & 7) == 0)) { in move_to_next_rxbuf()
1598 uint16_t cidx = fl->cidx >> 3; in move_to_next_rxbuf() local
1600 if (__predict_false(cidx == fl->sidx)) in move_to_next_rxbuf()
1601 fl->cidx = cidx = 0; in move_to_next_rxbuf()
1602 fl->hw_cidx = cidx; in move_to_next_rxbuf()
1615 struct iq_desc *d = &iq->desc[iq->cidx]; in service_iq_fl()
1715 if (__predict_false(++iq->cidx == iq->sidx)) { in service_iq_fl()
[all …]
H A Dadapter.h464 uint16_t cidx; /* consumer index */ member
513 uint16_t cidx; /* consumer idx (desc idx) */ member
569 (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) <= fl->lowat)
571 (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) >= 2 * fl->lowat)
589 uint32_t cidx; /* consumer index */ member
880 uint16_t cidx; member
/freebsd/contrib/ofed/libcxgb4/
H A Ddev.c249 "CQ: %p id %u queue %p cidx 0x%08x sw_queue %p sw_cidx %d sw_pidx %d sw_in_use %d depth %u error %u gen %d " in dump_cq()
251 chp->cq.cqid, chp->cq.queue, chp->cq.cidx, in dump_cq()
260 if (i == chp->cq.cidx) in dump_cq()
261 fprintf(stderr, " <-- cidx\n"); in dump_cq()
280 u16 cidx, pidx; in dump_qp()
285 " SQ: id %u queue %p sw_queue %p cidx %u pidx %u in_use %u wq_pidx %u depth %u flags 0x%x flush_cidx %d\n" in dump_qp()
286 " RQ: id %u queue %p sw_queue %p cidx %u pidx %u in_use %u depth %u\n", in dump_qp()
295 qhp->wq.sq.cidx, in dump_qp()
305 qhp->wq.rq.cidx, in dump_qp()
309 cidx in dump_qp()
278 u16 cidx, pidx; dump_qp() local
[all...]
H A Dcq.c105 wq->sq.flush_cidx = wq->sq.cidx; in c4iw_flush_sq()
129 unsigned short cidx; in flush_completed_wrs() local
132 wq->sq.flush_cidx = wq->sq.cidx; in flush_completed_wrs()
133 cidx = wq->sq.flush_cidx; in flush_completed_wrs()
134 BUG_ON(cidx >= wq->sq.size); in flush_completed_wrs()
136 while (cidx != wq->sq.pidx) { in flush_completed_wrs()
137 swsqe = &wq->sq.sw_sq[cidx]; in flush_completed_wrs()
139 if (++cidx == wq->sq.size) in flush_completed_wrs()
140 cidx = 0; in flush_completed_wrs()
149 __func__, cidx, cq->sw_pidx); in flush_completed_wrs()
[all …]
H A Dt4.h98 __be16 cidx; member
208 u16 cidx; member
267 #define CQE_WRID_SQ_IDX(x) (x)->u.scqe.cidx
323 u16 cidx; member
347 u16 cidx; member
399 if (++wq->rq.cidx == wq->rq.size) in t4_rq_consume()
400 wq->rq.cidx = 0; in t4_rq_consume()
401 assert((wq->rq.cidx != wq->rq.pidx) || wq->rq.in_use == 0); in t4_rq_consume()
403 wq->rq.queue[wq->rq.size].status.host_cidx = wq->rq.cidx; in t4_rq_consume()
444 if (wq->sq.cidx == wq->sq.flush_cidx) in t4_sq_consume()
[all …]
/freebsd/sys/dev/cxgbe/iw_cxgbe/
H A Dt4.h74 __be16 cidx;
196 u16 cidx;
256 #define CQE_WRID_SQ_IDX(x) ((x)->u.scqe.cidx)
325 u16 cidx;
353 u16 cidx;
400 if (++wq->rq.cidx == wq->rq.size) in t4_rq_consume()
401 wq->rq.cidx = 0; in t4_rq_consume()
447 if (wq->sq.cidx == wq->sq.flush_cidx) in t4_sq_consume()
450 if (++wq->sq.cidx == wq->sq.size) in t4_sq_consume()
451 wq->sq.cidx in t4_sq_consume()
75 __be16 cidx; global() member
197 u16 cidx; global() member
326 u16 cidx; global() member
354 u16 cidx; global() member
559 u16 cidx; global() member
[all...]
H A Dcq.c267 wq->sq.flush_cidx = wq->sq.cidx; in c4iw_flush_sq()
292 int cidx; in flush_completed_wrs() local
295 wq->sq.flush_cidx = wq->sq.cidx; in flush_completed_wrs()
296 cidx = wq->sq.flush_cidx; in flush_completed_wrs()
297 BUG_ON(cidx > wq->sq.size); in flush_completed_wrs()
299 while (cidx != wq->sq.pidx) { in flush_completed_wrs()
300 swsqe = &wq->sq.sw_sq[cidx]; in flush_completed_wrs()
302 if (++cidx == wq->sq.size) in flush_completed_wrs()
303 cidx = 0; in flush_completed_wrs()
313 __func__, cidx, cq->sw_pidx); in flush_completed_wrs()
[all …]
/freebsd/sys/dev/e1000/
H A Digb_txrx.c443 int i, cidx; in igb_isc_rxd_pkt_get() local
447 cidx = ri->iri_cidx; in igb_isc_rxd_pkt_get()
450 rxd = (union e1000_adv_rx_desc *)&rxr->rx_base[cidx]; in igb_isc_rxd_pkt_get()
474 ri->iri_frags[i].irf_idx = cidx; in igb_isc_rxd_pkt_get()
477 if (++cidx == scctx->isc_nrxd[0]) in igb_isc_rxd_pkt_get()
478 cidx = 0; in igb_isc_rxd_pkt_get()
482 ri->iri_frags[i].irf_idx = cidx; in igb_isc_rxd_pkt_get()
483 if (++cidx == scctx->isc_nrxd[0]) in igb_isc_rxd_pkt_get()
484 cidx = 0; in igb_isc_rxd_pkt_get()
H A Dem_txrx.c667 int i, cidx; in lem_isc_rxd_pkt_get() local
670 cidx = ri->iri_cidx; in lem_isc_rxd_pkt_get()
673 rxd = (struct e1000_rx_desc *)&rxr->rx_base[cidx]; in lem_isc_rxd_pkt_get()
694 ri->iri_frags[i].irf_idx = cidx; in lem_isc_rxd_pkt_get()
699 if (++cidx == scctx->isc_nrxd[0]) in lem_isc_rxd_pkt_get()
700 cidx = 0; in lem_isc_rxd_pkt_get()
733 int i, cidx; in em_isc_rxd_pkt_get() local
736 cidx = ri->iri_cidx; in em_isc_rxd_pkt_get()
739 rxd = &rxr->rx_base[cidx]; in em_isc_rxd_pkt_get()
759 ri->iri_frags[i].irf_idx = cidx; in em_isc_rxd_pkt_get()
[all …]
/freebsd/sys/dev/igc/
H A Digc_txrx.c471 int i, cidx; in igc_isc_rxd_pkt_get() local
475 cidx = ri->iri_cidx; in igc_isc_rxd_pkt_get()
478 rxd = (union igc_adv_rx_desc *)&rxr->rx_base[cidx]; in igc_isc_rxd_pkt_get()
501 ri->iri_frags[i].irf_idx = cidx; in igc_isc_rxd_pkt_get()
504 if (++cidx == scctx->isc_nrxd[0]) in igc_isc_rxd_pkt_get()
505 cidx = 0; in igc_isc_rxd_pkt_get()
509 ri->iri_frags[i].irf_idx = cidx; in igc_isc_rxd_pkt_get()
510 if (++cidx == scctx->isc_nrxd[0]) in igc_isc_rxd_pkt_get()
511 cidx = 0; in igc_isc_rxd_pkt_get()
/freebsd/sys/dev/ice/
H A Dice_iflib_txrx.c397 size_t cidx;
400 cidx = ri->iri_cidx; in ice_ift_rxd_flush()
406 cur = &rxq->rx_base[cidx]; in ice_ift_rxd_flush()
420 ri->iri_frags[i].irf_idx = cidx; in ice_ift_queue_select()
422 if (++cidx == rxq->desc_count) in ice_ift_queue_select()
423 cidx = 0; in ice_ift_queue_select()
291 size_t cidx; ice_ift_rxd_pkt_get() local
/freebsd/sys/dev/enetc/
H A Dif_enetc.c501 queue->cidx = 0; in enetc_tx_queues_alloc()
959 qidx_t cidx, pidx; in enetc_disable_txq() local
964 cidx = ENETC_TXQ_RD4(sc, qid, ENETC_TBCIR); in enetc_disable_txq()
966 while (pidx != cidx && timeout--) { in enetc_disable_txq()
968 cidx = ENETC_TXQ_RD4(sc, qid, ENETC_TBCIR); in enetc_disable_txq()
1162 int cidx, hw_cidx, count; in enetc_isc_txd_credits_update() local
1166 cidx = queue->cidx; in enetc_isc_txd_credits_update()
1178 if (cidx == hw_cidx) in enetc_isc_txd_credits_update()
1184 count = hw_cidx - cidx; in enetc_isc_txd_credits_update()
1188 queue->cidx = hw_cidx; in enetc_isc_txd_credits_update()
[all …]
H A Denetc.h52 qidx_t cidx; member
/freebsd/sys/dev/cxgb/
H A Dcxgb_sge.c791 u_int cidx = q->cidx; in free_rx_bufs() local
794 struct rx_sw_desc *d = &q->sdesc[cidx]; in free_rx_bufs()
811 if (++cidx == q->size) in free_rx_bufs()
812 cidx = 0; in free_rx_bufs()
1142 if (((txqs->pidx > txq->cidx) && in txq_prod()
1144 (txq->pidx >= txq->cidx)) || in txq_prod()
1145 ((txqs->pidx < txq->cidx) && in txq_prod()
1146 (txq->pidx >= txq-> cidx)) || in txq_prod()
1147 ((txqs->pidx < txq->cidx) && in txq_prod()
1148 (txq->cidx < txqs->pidx))) in txq_prod()
[all …]
H A Dcxgb_adapter.h173 uint32_t cidx; member
206 uint32_t cidx; member
234 uint32_t cidx; member
/freebsd/sys/dev/ixgbe/
H A Dix_txrx.c405 uint16_t pkt_info, len, cidx, i; in ixgbe_isc_rxd_pkt_get() local
411 cidx = ri->iri_cidx; in ixgbe_isc_rxd_pkt_get()
413 rxd = &rxr->rx_base[cidx]; in ixgbe_isc_rxd_pkt_get()
440 ri->iri_frags[i].irf_idx = cidx; in ixgbe_isc_rxd_pkt_get()
442 if (++cidx == sc->shared->isc_nrxd[0]) in ixgbe_isc_rxd_pkt_get()
443 cidx = 0; in ixgbe_isc_rxd_pkt_get()
/freebsd/sys/dev/aq/
H A Daq_ring.c350 int cidx, rc = 0, i; in aq_isc_rxd_pkt_get() local
354 cidx = ri->iri_cidx; in aq_isc_rxd_pkt_get()
359 rx_desc = (aq_rx_desc_t *) &ring->rx_descs[cidx]; in aq_isc_rxd_pkt_get()
361 trace_aq_rx_descr(ring->index, cidx, in aq_isc_rxd_pkt_get()
377 ri->iri_frags[i].irf_idx = cidx; in aq_isc_rxd_pkt_get()
386 cidx = aq_next(cidx, ring->rx_size - 1); in aq_isc_rxd_pkt_get()
/freebsd/sys/dev/iavf/
H A Diavf_txrx_iflib.c676 int i, cidx; in iavf_isc_rxd_pkt_get() local
678 cidx = ri->iri_cidx; in iavf_isc_rxd_pkt_get()
684 cur = &rxr->rx_base[cidx]; in iavf_isc_rxd_pkt_get()
714 ri->iri_frags[i].irf_idx = cidx; in iavf_isc_rxd_pkt_get()
716 if (++cidx == vsi->shared->isc_nrxd[0]) in iavf_isc_rxd_pkt_get()
717 cidx = 0; in iavf_isc_rxd_pkt_get()
/freebsd/sys/dev/ixl/
H A Dixl_txrx.c669 int i, cidx; in ixl_isc_rxd_pkt_get() local
671 cidx = ri->iri_cidx; in ixl_isc_rxd_pkt_get()
677 cur = &rxr->rx_base[cidx]; in ixl_isc_rxd_pkt_get()
707 ri->iri_frags[i].irf_idx = cidx; in ixl_isc_rxd_pkt_get()
709 if (++cidx == vsi->shared->isc_nrxd[0]) in ixl_isc_rxd_pkt_get()
710 cidx = 0; in ixl_isc_rxd_pkt_get()
/freebsd/contrib/ntp/ntpd/
H A Drefclock_nmea.c283 int cidx; /* current field index */ member
1266 data->cidx = 0; in field_init()
1341 if (fn < data->cidx) { in field_parse()
1342 data->cidx = 0; in field_parse()
1345 while ((fn > data->cidx) && (tmp = *data->cptr) != '\0') { in field_parse()
1346 data->cidx += (tmp == ','); in field_parse()
/freebsd/sys/dev/oce/
H A Doce_if.h294 ring->cidx = GET_Q_NEXT(ring->cidx, n, ring->num_items)
299 (void*)((type *)DBUF_VA(&ring->dma) + ring->cidx)
301 (uint64_t)(((type *)DBUF_PA(ring->dbuf)) + ring->cidx)
324 uint16_t cidx; /* Get ptr */ member

12