Lines Matching refs:txp
523 xnf_txbuf_t *txp; in xnf_setup_rings() local
527 txp = tidp->txbuf; in xnf_setup_rings()
528 if (txp == NULL) { in xnf_setup_rings()
534 ASSERT(txp->tx_txreq.gref != INVALID_GRANT_REF); in xnf_setup_rings()
535 ASSERT(txp->tx_mp != NULL); in xnf_setup_rings()
537 switch (txp->tx_type) { in xnf_setup_rings()
539 VERIFY(gnttab_query_foreign_access(txp->tx_txreq.gref) in xnf_setup_rings()
542 if (txp->tx_bdesc == NULL) { in xnf_setup_rings()
544 txp->tx_txreq.gref, 1); in xnf_setup_rings()
545 gref_put(xnfp, txp->tx_txreq.gref); in xnf_setup_rings()
547 txp->tx_dma_handle); in xnf_setup_rings()
549 xnf_buf_put(xnfp, txp->tx_bdesc, B_TRUE); in xnf_setup_rings()
552 freemsg(txp->tx_mp); in xnf_setup_rings()
554 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_setup_rings()
559 txp->tx_type = TX_MCAST_RSP; in xnf_setup_rings()
560 txp->tx_status = NETIF_RSP_DROPPED; in xnf_setup_rings()
1118 xnf_txbuf_t *txp; in xnf_set_multicast() local
1133 txp = kmem_cache_alloc(xnfp->xnf_tx_buf_cache, KM_SLEEP); in xnf_set_multicast()
1166 txp->tx_type = TX_MCAST_REQ; in xnf_set_multicast()
1167 txp->tx_slot = slot; in xnf_set_multicast()
1177 txrp->id = txp->tx_txreq.id = tidp->id; in xnf_set_multicast()
1184 tidp->txbuf = txp; in xnf_set_multicast()
1198 while (txp->tx_type == TX_MCAST_REQ) in xnf_set_multicast()
1202 ASSERT(txp->tx_type == TX_MCAST_RSP); in xnf_set_multicast()
1208 result = (txp->tx_status == NETIF_RSP_OKAY); in xnf_set_multicast()
1214 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_set_multicast()
1261 xnf_txbuf_t *txp; in xnf_tx_clean_ring() local
1270 txp = tidp->txbuf; in xnf_tx_clean_ring()
1271 ASSERT(txp != NULL); in xnf_tx_clean_ring()
1272 ASSERT(txp->tx_txreq.id == trp->id); in xnf_tx_clean_ring()
1274 switch (txp->tx_type) { in xnf_tx_clean_ring()
1277 txp->tx_txreq.gref) != 0) in xnf_tx_clean_ring()
1281 txp->tx_txreq.gref); in xnf_tx_clean_ring()
1283 if (txp->tx_bdesc == NULL) { in xnf_tx_clean_ring()
1285 txp->tx_txreq.gref, 1); in xnf_tx_clean_ring()
1286 gref_put(xnfp, txp->tx_txreq.gref); in xnf_tx_clean_ring()
1288 txp->tx_dma_handle); in xnf_tx_clean_ring()
1290 xnf_buf_put(xnfp, txp->tx_bdesc, in xnf_tx_clean_ring()
1294 freemsg(txp->tx_mp); in xnf_tx_clean_ring()
1296 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_tx_clean_ring()
1301 txp->tx_type = TX_MCAST_RSP; in xnf_tx_clean_ring()
1302 txp->tx_status = trp->status; in xnf_tx_clean_ring()
1313 txp->tx_type); in xnf_tx_clean_ring()
1441 tx_push_packets(xnf_t *xnfp, xnf_txbuf_t *txp) in tx_push_packets() argument
1462 while ((txp != NULL) && (slots_free > 0)) { in tx_push_packets()
1471 txp->tx_slot = slot; in tx_push_packets()
1472 txp->tx_txreq.id = tidp->id; in tx_push_packets()
1473 *txrp = txp->tx_txreq; in tx_push_packets()
1475 tidp->txbuf = txp; in tx_push_packets()
1478 xnfp->xnf_stat_obytes += txp->tx_txreq.size; in tx_push_packets()
1480 txp = txp->tx_next; in tx_push_packets()
1499 return (txp); in tx_push_packets()
1522 xnf_txbuf_t *txp; in xnf_send() local
1558 txp = kmem_cache_alloc(xnfp->xnf_tx_buf_cache, KM_SLEEP); in xnf_send()
1560 txp->tx_type = TX_DATA; in xnf_send()
1567 txp->tx_bdesc = xnf_tx_pullup(xnfp, mp); in xnf_send()
1568 if (txp->tx_bdesc == NULL) { in xnf_send()
1569 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_send()
1573 txp->tx_bufp = txp->tx_bdesc->buf; in xnf_send()
1574 txp->tx_mfn = txp->tx_bdesc->buf_mfn; in xnf_send()
1575 txp->tx_txreq.gref = txp->tx_bdesc->grant_ref; in xnf_send()
1582 rc = ddi_dma_addr_bind_handle(txp->tx_dma_handle, in xnf_send()
1598 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_send()
1603 txp->tx_bdesc = NULL; in xnf_send()
1604 txp->tx_bufp = (caddr_t)mp->b_rptr; in xnf_send()
1605 txp->tx_mfn = in xnf_send()
1607 txp->tx_txreq.gref = gref_get(xnfp); in xnf_send()
1608 if (txp->tx_txreq.gref == INVALID_GRANT_REF) { in xnf_send()
1610 txp->tx_dma_handle); in xnf_send()
1611 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_send()
1614 gnttab_grant_foreign_access_ref(txp->tx_txreq.gref, in xnf_send()
1615 oeid, txp->tx_mfn, 1); in xnf_send()
1618 txp->tx_next = NULL; in xnf_send()
1619 txp->tx_mp = mp; in xnf_send()
1620 txp->tx_txreq.size = length; in xnf_send()
1621 txp->tx_txreq.offset = (uintptr_t)txp->tx_bufp & PAGEOFFSET; in xnf_send()
1622 txp->tx_txreq.flags = 0; in xnf_send()
1634 xnf_pseudo_cksum(txp->tx_bufp, length); in xnf_send()
1635 txp->tx_txreq.flags |= NETTXF_csum_blank; in xnf_send()
1643 head = txp; in xnf_send()
1647 tail->tx_next = txp; in xnf_send()
1649 tail = txp; in xnf_send()
2303 xnf_txbuf_t *txp = tidp->txbuf; in xnf_release_mblks() local
2305 if (txp != NULL) { in xnf_release_mblks()
2306 ASSERT(txp->tx_mp != NULL); in xnf_release_mblks()
2307 freemsg(txp->tx_mp); in xnf_release_mblks()
2310 kmem_cache_free(xnfp->xnf_tx_buf_cache, txp); in xnf_release_mblks()
2461 xnf_txbuf_t *txp = buf; in xnf_tx_buf_constructor() local
2468 ddiflags, 0, &txp->tx_dma_handle) != DDI_SUCCESS) { in xnf_tx_buf_constructor()
2480 xnf_txbuf_t *txp = buf; in xnf_tx_buf_destructor() local
2482 ddi_dma_free_handle(&txp->tx_dma_handle); in xnf_tx_buf_destructor()