Lines Matching refs:pidx

2153 	MPASS(eq->pidx == eq->dbidx);  in drain_wrq_wr_list()
2158 if (eq->pidx == eq->cidx) in drain_wrq_wr_list()
2161 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; in drain_wrq_wr_list()
2168 dst = (void *)&eq->desc[eq->pidx]; in drain_wrq_wr_list()
2169 if (__predict_true(eq->sidx - eq->pidx > n)) { in drain_wrq_wr_list()
2172 eq->pidx += n; in drain_wrq_wr_list()
2174 int first_portion = (eq->sidx - eq->pidx) * EQ_ESIZE; in drain_wrq_wr_list()
2181 eq->pidx = n - (eq->sidx - eq->pidx); in drain_wrq_wr_list()
2239 MPASS(eq->pidx == eq->dbidx); in t4_wrq_tx_locked()
2926 cookie->pidx = -1; in start_wrq_wr()
2932 if (eq->pidx == eq->cidx) in start_wrq_wr()
2935 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; in start_wrq_wr()
2939 cookie->pidx = eq->pidx; in start_wrq_wr()
2943 w = &eq->desc[eq->pidx]; in start_wrq_wr()
2944 IDXINCR(eq->pidx, ndesc, eq->sidx); in start_wrq_wr()
2945 if (__predict_false(cookie->pidx + ndesc > eq->sidx)) { in start_wrq_wr()
2947 wrq->ss_pidx = cookie->pidx; in start_wrq_wr()
2961 int ndesc, pidx; in commit_wrq_wr() local
2964 if (cookie->pidx == -1) { in commit_wrq_wr()
2983 pidx = cookie->pidx; in commit_wrq_wr()
2984 MPASS(pidx >= 0 && pidx < eq->sidx); in commit_wrq_wr()
2988 MPASS(pidx == eq->dbidx); in commit_wrq_wr()
2998 dst = (void *)&eq->desc[pidx]; in commit_wrq_wr()
2999 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; in commit_wrq_wr()
3013 MPASS(IDXDIFF(next->pidx, pidx, eq->sidx) == ndesc); in commit_wrq_wr()
3014 next->pidx = pidx; in commit_wrq_wr()
3018 MPASS(IDXDIFF(pidx, prev->pidx, eq->sidx) == prev->ndesc); in commit_wrq_wr()
3029 MPASS(wrq->eq.pidx == wrq->eq.dbidx); in commit_wrq_wr()
3086 eq->equeqidx = eq->pidx; in set_txupdate_flags()
3087 } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { in set_txupdate_flags()
3089 eq->equeqidx = eq->pidx; in set_txupdate_flags()
3118 eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) in eth_tx() argument
3136 remaining = IDXDIFF(pidx, cidx, r->size); in eth_tx()
3141 while (cidx != pidx) { in eth_tx()
3153 if (eq->pidx == eq->cidx) in eth_tx()
3156 avail = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; in eth_tx()
3218 wr = &eq->desc[eq->pidx]; in eth_tx()
3219 IDXINCR(eq->pidx, n, eq->sidx); in eth_tx()
3247 wr = &eq->desc[eq->pidx]; in eth_tx()
3268 IDXINCR(eq->pidx, n, eq->sidx); in eth_tx()
3288 } else if (eq->pidx == eq->cidx && txp->npkt > 0 && in eth_tx()
3314 wr = &eq->desc[eq->pidx]; in eth_tx()
3315 IDXINCR(eq->pidx, n, eq->sidx); in eth_tx()
3620 fl->pidx = fl->cidx = fl->hw_cidx = fl->dbidx = 0; in alloc_iq_fl_hwq()
3740 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "pidx", CTLFLAG_RD, &fl->pidx, in add_fl_sysctls()
4398 MPASS(eq->pidx == eq->cidx); in free_eq()
4422 SYSCTL_ADD_U16(ctx, children, OID_AUTO, "pidx", CTLFLAG_RD, &eq->pidx, in add_eq_sysctls()
4436 eq->pidx = eq->cidx = eq->dbidx = 0; in alloc_eq_hwq()
4937 n = IDXDIFF(fl->pidx >> 3, fl->dbidx, fl->sidx); in ring_fl_db()
4976 if (fl->pidx == max_pidx * 8) in refill_fl()
4979 d = &fl->desc[fl->pidx]; in refill_fl()
4980 sd = &fl->sdesc[fl->pidx]; in refill_fl()
5043 if (__predict_false((++fl->pidx & 7) == 0)) { in refill_fl()
5044 uint16_t pidx = fl->pidx >> 3; in refill_fl() local
5046 if (__predict_false(pidx == fl->sidx)) { in refill_fl()
5047 fl->pidx = 0; in refill_fl()
5048 pidx = 0; in refill_fl()
5052 if (n < 8 || pidx == max_pidx) in refill_fl()
5055 if (IDXDIFF(pidx, fl->dbidx, fl->sidx) >= 4) in refill_fl()
5060 if ((fl->pidx >> 3) != fl->dbidx) in refill_fl()
5447 wr = (void *)&eq->desc[eq->pidx]; in write_txpkt_vm_wr()
5503 write_gl_to_txd(txq, m0, &dst, eq->sidx - ndesc < eq->pidx); in write_txpkt_vm_wr()
5507 txsd = &txq->sdesc[eq->pidx]; in write_txpkt_vm_wr()
5540 txsd = &txq->sdesc[eq->pidx]; in write_raw_wr()
5592 wr = (void *)&eq->desc[eq->pidx]; in write_txpkt_wr()
5640 write_gl_to_txd(txq, m0, &dst, eq->sidx - ndesc < eq->pidx); in write_txpkt_wr()
5659 txsd = &txq->sdesc[eq->pidx]; in write_txpkt_wr()
5836 wr = (void *)&eq->desc[eq->pidx]; in write_txpkts_wr()
5852 checkwrap = eq->sidx - ndesc < eq->pidx; in write_txpkts_wr()
5923 txsd = &txq->sdesc[eq->pidx]; in write_txpkts_wr()
5949 wr = (void *)&eq->desc[eq->pidx]; in write_txpkts_vm_wr()
6003 txsd = &txq->sdesc[eq->pidx]; in write_txpkts_vm_wr()
6175 uint16_t hw_cidx, pidx; in total_available_tx_desc() local
6178 pidx = eq->pidx; in total_available_tx_desc()
6180 if (pidx == hw_cidx) in total_available_tx_desc()
6183 return (IDXDIFF(hw_cidx, pidx, eq->sidx) - 1); in total_available_tx_desc()
6248 if (eq->cidx == eq->pidx) in tx_reclaim()
6249 eq->equeqidx = eq->pidx; in tx_reclaim()