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