Lines Matching defs:pidx

2028 	MPASS(eq->pidx == eq->dbidx);
2033 if (eq->pidx == eq->cidx)
2036 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1;
2043 dst = (void *)&eq->desc[eq->pidx];
2044 if (__predict_true(eq->sidx - eq->pidx > n)) {
2047 eq->pidx += n;
2049 int first_portion = (eq->sidx - eq->pidx) * EQ_ESIZE;
2056 eq->pidx = n - (eq->sidx - eq->pidx);
2113 /* Doorbell must have caught up to the pidx. */
2114 MPASS(eq->pidx == eq->dbidx);
2419 cookie->pidx = -1;
2425 if (eq->pidx == eq->cidx)
2428 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1;
2432 cookie->pidx = eq->pidx;
2436 w = &eq->desc[eq->pidx];
2437 IDXINCR(eq->pidx, ndesc, eq->sidx);
2438 if (__predict_false(cookie->pidx + ndesc > eq->sidx)) {
2440 wrq->ss_pidx = cookie->pidx;
2454 int ndesc, pidx;
2457 if (cookie->pidx == -1) {
2476 pidx = cookie->pidx;
2477 MPASS(pidx >= 0 && pidx < eq->sidx);
2481 MPASS(pidx == eq->dbidx);
2488 * is at pidx and not eq->pidx, which has moved on
2491 dst = (void *)&eq->desc[pidx];
2492 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1;
2506 MPASS(IDXDIFF(next->pidx, pidx, eq->sidx) == ndesc);
2507 next->pidx = pidx;
2511 MPASS(IDXDIFF(pidx, prev->pidx, eq->sidx) == prev->ndesc);
2521 /* Doorbell must have caught up to the pidx. */
2522 MPASS(wrq->eq.pidx == wrq->eq.dbidx);
2552 * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to
2556 eth_tx(struct mp_ring *r, u_int cidx, u_int pidx)
2571 remaining = IDXDIFF(pidx, cidx, r->size);
2577 while (cidx != pidx) {
2589 if (eq->pidx == eq->cidx)
2592 available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1;
2593 dbdiff = IDXDIFF(eq->pidx, eq->dbidx, eq->sidx);
2611 wr = (void *)&eq->desc[eq->pidx];
2632 while (next_cidx != pidx) {
2656 IDXINCR(eq->pidx, n, eq->sidx);
2662 eq->equeqidx = eq->pidx;
2663 } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) {
2665 eq->equeqidx = eq->pidx;
2922 fl->pidx = fl->cidx = 0;
3080 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "pidx", CTLFLAG_RD, &fl->pidx,
3348 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "pidx", CTLFLAG_RD,
3386 nm_txq->pidx = nm_txq->cidx = 0;
3404 SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "pidx",
3405 CTLTYPE_INT | CTLFLAG_RD, &nm_txq->pidx, 0, sysctl_uint16, "I",
3593 eq->pidx = eq->cidx = eq->dbidx = 0;
3720 SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pidx",
3721 CTLTYPE_INT | CTLFLAG_RD, &wrq->eq.pidx, 0, sysctl_uint16, "I",
3814 SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "pidx",
3815 CTLTYPE_INT | CTLFLAG_RD, &eq->pidx, 0, sysctl_uint16, "I",
3907 n = IDXDIFF(fl->pidx / 8, fl->dbidx, fl->sidx);
3943 * before the one with the hw cidx. This is to avoid hw pidx = hw cidx,
3947 if (fl->pidx == max_pidx * 8)
3950 d = &fl->desc[fl->pidx];
3951 sd = &fl->sdesc[fl->pidx];
4024 if (__predict_false(++fl->pidx % 8 == 0)) {
4025 uint16_t pidx = fl->pidx / 8;
4027 if (__predict_false(pidx == fl->sidx)) {
4028 fl->pidx = 0;
4029 pidx = 0;
4033 if (pidx == max_pidx)
4036 if (IDXDIFF(pidx, fl->dbidx, fl->sidx) >= 4)
4041 if (fl->pidx / 8 != fl->dbidx)
4218 * software descriptor, and advance the pidx. It is guaranteed that enough
4249 MPASS(wr == (void *)&eq->desc[eq->pidx]);
4383 write_gl_to_txd(txq, m0, &dst, eq->sidx - ndesc < eq->pidx);
4388 txsd = &txq->sdesc[eq->pidx];
4397 * software descriptor, and advance the pidx. It is guaranteed that enough
4435 MPASS(wr == (void *)&eq->desc[eq->pidx]);
4497 write_gl_to_txd(txq, m0, &dst, eq->sidx - ndesc < eq->pidx);
4516 txsd = &txq->sdesc[eq->pidx];
4590 * the software descriptor, and advance the pidx. It is guaranteed that enough
4619 MPASS(wr == (void *)&eq->desc[eq->pidx]);
4634 checkwrap = eq->sidx - ndesc < eq->pidx;
4700 txsd = &txq->sdesc[eq->pidx];
4872 uint16_t hw_cidx, pidx;
4875 pidx = eq->pidx;
4877 if (pidx == hw_cidx)
4880 return (IDXDIFF(hw_cidx, pidx, eq->sidx) - 1);
4945 if (eq->cidx == eq->pidx)
4946 eq->equeqidx = eq->pidx;