Lines Matching refs:kring
211 static int ptnet_nm_txsync(struct netmap_kring *kring, int flags);
212 static int ptnet_nm_rxsync(struct netmap_kring *kring, int flags);
218 static unsigned ptnet_rx_discard(struct netmap_kring *kring,
1124 struct netmap_kring *kring;
1127 kring = na->tx_rings[i];
1129 kring = na->rx_rings[i - na->num_tx_rings];
1131 kring->rhead = kring->ring->head = atok->head;
1132 kring->rcur = kring->ring->cur = atok->cur;
1133 kring->nr_hwcur = ktoa->hwcur;
1134 kring->nr_hwtail = kring->rtail =
1135 kring->ring->tail = ktoa->hwtail;
1140 nm_prdis("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u t %u}",
1141 t, i, kring->nr_hwcur, kring->rhead, kring->rcur,
1142 kring->ring->head, kring->ring->cur, kring->nr_hwtail,
1143 kring->rtail, kring->ring->tail);
1238 ptnet_nm_txsync(struct netmap_kring *kring, int flags)
1240 struct ptnet_softc *sc = if_getsoftc(kring->na->ifp);
1241 struct ptnet_queue *pq = sc->queues + kring->ring_id;
1244 notify = netmap_pt_guest_txsync(pq->atok, pq->ktoa, kring, flags);
1253 ptnet_nm_rxsync(struct netmap_kring *kring, int flags)
1255 struct ptnet_softc *sc = if_getsoftc(kring->na->ifp);
1256 struct ptnet_queue *pq = sc->rxqueues + kring->ring_id;
1259 notify = netmap_pt_guest_rxsync(pq->atok, pq->ktoa, kring, flags);
1339 ptnet_ring_update(struct ptnet_queue *pq, struct netmap_kring *kring,
1342 struct netmap_ring *ring = kring->ring;
1352 kring->rcur = kring->rhead = head;
1354 nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead);
1380 struct netmap_kring *kring;
1410 kring = na->tx_rings[pq->kring_id];
1411 ring = kring->ring;
1412 lim = kring->nkr_num_slots - 1;
1417 if (PTNET_TX_NOSPACE(head, kring, minspace)) {
1421 ptnet_sync_tail(ktoa, kring);
1423 if (PTNET_TX_NOSPACE(head, kring, minspace)) {
1436 ptnet_sync_tail(ktoa, kring);
1437 if (likely(PTNET_TX_NOSPACE(head, kring,
1546 ptnet_ring_update(pq, kring, head, NAF_FORCE_RECLAIM);
1552 ptnet_ring_update(pq, kring, head, NAF_FORCE_RECLAIM);
1616 ptnet_rx_discard(struct netmap_kring *kring, unsigned int head)
1618 struct netmap_ring *ring = kring->ring;
1622 head = nm_next(head, kring->nkr_num_slots - 1);
1678 struct netmap_kring *kring = na->rx_rings[pq->kring_id];
1679 struct netmap_ring *ring = kring->ring;
1680 unsigned int const lim = kring->nkr_num_slots - 1;
1692 kring->nr_kflags &= ~NKR_PENDINTR;
1708 ptnet_sync_tail(ktoa, kring);
1723 ptnet_sync_tail(ktoa, kring);
1744 head = ptnet_rx_discard(kring, head);
1860 ptnet_ring_update(pq, kring, head, NAF_FORCE_READ);
1887 ptnet_ring_update(pq, kring, head, NAF_FORCE_READ);