• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/xen/netback/

Lines Matching defs:ring

164 			      netif_tx_back_ring_t *ring, int error);
183 netif_rx_back_ring_t *ring);
202 * stored in the Xen tx ring. Applicable to both RX and TX packets
215 * through the last will be sequential modulo the ring size
313 * \brief Configuration data for a shared memory request ring
319 * Runtime structures for ring access. Unfortunately, TX and RX rings
330 * mapping the ring and required to unmap it when a connection
335 /** The pseudo-physical address where ring memory is mapped.*/
338 /** KVA address where ring memory is mapped. */
342 * Grant table handles, one per-ring page, returned by the
343 * hyperpervisor upon mapping of the ring and required to
348 /** The number of ring pages mapped for the current connection. */
352 * The grant references, one per-ring page, supplied by the
353 * front-end, allowing us to reference the ring pages in the
368 * Front-end requests exist in the ring and are waiting for
381 * Types of rings. Used for array indices and to identify a ring's control
431 /** The interrupt driven even channel used to signal ring events. */
437 /** Handle to the communication ring event channel. */
487 * Global pool of kva used for mapping remote domain ring
682 * Zero the ring config structs because the pointers, handles, and
697 * Map a single shared memory ring into domain local address space and
701 * \param ring_type Array index of this ring in the xnb's array of rings
708 struct xnb_ring_config *ring = &xnb->ring_configs[ring_type];
711 /* TX ring type = 0, RX =1 */
712 ring->va = xnb->kva + ring_type * PAGE_SIZE;
713 ring->gnt_addr = xnb->gnt_base_addr + ring_type * PAGE_SIZE;
715 gnt.host_addr = ring->gnt_addr;
717 gnt.ref = ring->ring_ref;
725 ring->va = 0;
731 ring->handle = gnt.handle;
732 ring->bus_addr = gnt.dev_bus_addr;
735 BACK_RING_INIT(&ring->back_ring.tx_ring,
736 (netif_tx_sring_t*)ring->va,
737 ring->ring_pages * PAGE_SIZE);
739 BACK_RING_INIT(&ring->back_ring.rx_ring,
740 (netif_rx_sring_t*)ring->va,
741 ring->ring_pages * PAGE_SIZE);
744 "Unknown ring type %d", ring_type);
753 * used to notify us of ring changes.
799 * communication ring.
859 "tx-ring-ref", "%l" PRIu32,
861 "rx-ring-ref", "%l" PRIu32,
867 "Unable to retrieve ring information from "
1422 * Interrupt handler bound to the shared ring's event channel.
1424 * Transfers packets from the Xen ring to the host's generic networking stack
1474 * Build a struct xnb_pkt based on netif_tx_request's from a netif tx ring.
1475 * Will read exactly 0 or 1 packets from the ring; never a partial packet.
1479 * \param[in] start The ring index of the first potential request
1582 /* The ring ran out of requests before finishing the packet */
1599 * writes them to the ring, but doesn't push them to the shared ring.
1603 * \param[out] ring Responses go here
1606 xnb_txpkt2rsp(const struct xnb_pkt *pkt, netif_tx_back_ring_t *ring,
1624 KASSERT((pkt->list_len == 0) || (ring->rsp_prod_pvt == pkt->car),
1625 ("Cannot respond to ring requests out of order"));
1629 tx = RING_GET_REQUEST(ring, ring->rsp_prod_pvt);
1631 rsp = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt);
1634 ring->rsp_prod_pvt++;
1637 rsp = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt);
1639 ring->rsp_prod_pvt++;
1645 tx = RING_GET_REQUEST(ring, ring->rsp_prod_pvt);
1647 rsp = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt);
1650 ring->rsp_prod_pvt++;
1702 * \param[in] txb Pointer to the backend ring structure
1714 RING_IDX r_idx = pkt->car; /* index into tx ring buffer */
1800 * Dequeue at most one packet from the shared ring
1801 * \param[in,out] txb Netif tx ring. A packet will be removed from it, and
1803 * will not be pushed to the shared ring.
1805 * \param[in] otherend Domain ID of the other end of the ring
1877 * \param[in] start The ring index of the first available slot in the rx
1878 * ring
1879 * \param[in] space The number of free slots in the rx ring
1882 * \retval EAGAIN There was not enough space in the ring to queue the
1924 * Each ring response can have up to PAGE_SIZE of data.
1954 * \param[in] rxb Pointer to the backend ring structure
1966 RING_IDX r_idx = pkt->car; /* index into rx ring buffer */
2022 * responses and writes them to the ring, but doesn't push the shared ring
2029 * \param[out] ring Responses go here
2035 int n_entries, netif_rx_back_ring_t *ring)
2080 id = RING_GET_REQUEST(ring, ring->rsp_prod_pvt)->id;
2081 rsp = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt);
2095 r_idx = ring->rsp_prod_pvt + i;
2100 rxq = *(RING_GET_REQUEST(ring, r_idx));
2101 rsp = RING_GET_RESPONSE(ring, r_idx);
2134 ring->req_cons += n_responses;
2135 ring->rsp_prod_pvt += n_responses;
2347 * Insufficient space in the ring.
2385 * Sends one packet to the ring. Blocks until the packet is on the ring
2387 * \param[in,out] rxb The packet will be pushed onto this ring, but the
2390 * \retval EAGAIN The ring did not have enough space for the packet.
2391 * The ring has not been modified
2398 xnb_send(netif_rx_back_ring_t *ring, domid_t otherend, const struct mbuf *mbufc,
2405 space = ring->sring->req_prod - ring->req_cons;
2406 error = xnb_mbufc2pkt(mbufc, &pkt, ring->rsp_prod_pvt, space);
2409 n_entries = xnb_rxpkt2gnttab(&pkt, mbufc, gnttab, ring, otherend);
2417 n_reqs = xnb_rxpkt2rsp(&pkt, gnttab, n_entries, ring);