Lines Matching refs:ring

408 DECLARE_SYSCTLS(NETMAP_RING_POOL, ring);
1280 * On the other end, the pipe ring dimension may be different from
1281 * the parent port ring dimension. As a compromise, we allocate twice the
1290 D("req if %d*%d ring %d*%d buf %d*%d",
1422 struct netmap_ring *ring = kring->ring;
1424 if (ring == NULL)
1426 netmap_free_bufs(na->nm_mem, ring->slot, kring->nkr_num_slots);
1427 netmap_ring_free(na->nm_mem, ring);
1428 kring->ring = NULL;
1452 struct netmap_ring *ring = kring->ring;
1455 if (ring) {
1462 ring = netmap_ring_malloc(na->nm_mem, len);
1463 if (ring == NULL) {
1467 ND("txring at %p", ring);
1468 kring->ring = ring;
1469 *(uint32_t *)(uintptr_t)&ring->num_slots = ndesc;
1470 *(int64_t *)(uintptr_t)&ring->buf_ofs =
1473 netmap_ring_offset(na->nm_mem, ring);
1476 ring->head = kring->rhead;
1477 ring->cur = kring->rcur;
1478 ring->tail = kring->rtail;
1479 *(uint16_t *)(uintptr_t)&ring->nr_buf_size =
1482 ring->head, ring->cur, ring->tail);
1485 /* this is a real ring */
1486 if (netmap_new_bufs(na->nm_mem, ring->slot, ndesc)) {
1491 /* this is a fake ring, set all indices to 0 */
1492 netmap_mem_set_ring(na->nm_mem, ring->slot, ndesc, 0);
1494 /* ring info */
1495 *(uint16_t *)(uintptr_t)&ring->ringid = kring->ring_id;
1496 *(uint16_t *)(uintptr_t)&ring->dir = kring->tx;
1567 * between the ring and nifp, so the information is usable in
1568 * userspace to reach the ring from the nifp.
1573 netmap_ring_offset(na->nm_mem, na->tx_rings[i].ring) - base;
1577 netmap_ring_offset(na->nm_mem, na->rx_rings[i].ring) - base;