Lines Matching defs:tbufp

133 	vgen_private_desc_t	*tbufp;
147 tbufp = kmem_zalloc(ldcp->num_txds * tbufsize, KM_NOSLEEP);
148 if (tbufp == NULL) {
151 ldcp->tbufp = tbufp;
152 ldcp->tbufendp = &((ldcp->tbufp)[ldcp->num_txds]);
208 tbufp = &(ldcp->tbufp[i]);
210 &(tbufp->memhandle));
212 tbufp->memhandle = 0;
220 rv = ldc_mem_bind_handle(tbufp->memhandle,
222 LDC_MEM_R, &(tbufp->memcookie[ci]), &ncookies);
231 tbufp->datap = datap;
239 rv = ldc_mem_nextcookie(tbufp->memhandle,
240 &(tbufp->memcookie[ci]));
246 tbufp->ncookies = ncookies;
249 tbufp->flags = VGEN_PRIV_DESC_FREE;
254 tbufp->descp = txdp;
274 ldcp->next_tbufp = ldcp->tbufp;
275 ldcp->cur_tbufp = ldcp->tbufp;
299 vgen_private_desc_t *tbufp = ldcp->tbufp;
308 if (ldcp->tbufp != NULL) {
312 tbufp = &(ldcp->tbufp[i]);
314 if (tbufp->datap) { /* if bound to a ldc memhandle */
315 (void) ldc_mem_unbind_handle(tbufp->memhandle);
316 tbufp->datap = NULL;
318 if (tbufp->memhandle) {
319 (void) ldc_mem_free_handle(tbufp->memhandle);
320 tbufp->memhandle = 0;
340 if (ldcp->tbufp != NULL) {
341 kmem_free(ldcp->tbufp, ldcp->num_txds * tbufsize);
342 ldcp->tbufp = ldcp->tbufendp = NULL;
590 vgen_private_desc_t *tbufp;
641 tbufp = ldcp->next_tbufp;
642 ntbufp = NEXTTBUF(ldcp, tbufp);
668 tbufp->flags = VGEN_PRIV_DESC_BUSY;
672 dst = tbufp->datap + VNET_IPALIGN;
679 tbufp->datalen = size;
682 txdp = tbufp->descp;
685 txdp->ncookies = tbufp->ncookies;
686 bcopy((tbufp->memcookie), (txdp->memcookie),
687 tbufp->ncookies * sizeof (ldc_mem_cookie_t));
695 if (tbufp->flags != VGEN_PRIV_DESC_BUSY) {
713 rtbufp = &ldcp->tbufp[ldcp->resched_peer_txi];
1287 vgen_private_desc_t *tbufp;
1353 tbufp = &ldcp->tbufp[txi];
1354 txdp = tbufp->descp;
1366 txi = ldcp->cur_tbufp - ldcp->tbufp;
1367 tbufp = &ldcp->tbufp[txi];
1369 txdp = tbufp->descp;
1399 ldcp->resched_peer_txi = ldcp->cur_tbufp - ldcp->tbufp;
1552 vgen_private_desc_t *tbufp;
1555 tbufp = ldcp->cur_tbufp;
1556 txdp = tbufp->descp;
1560 (tbufp != ldcp->next_tbufp)) {
1561 tbufp->flags = VGEN_PRIV_DESC_FREE;
1565 tbufp = NEXTTBUF(ldcp, tbufp);
1566 txdp = tbufp->descp;
1571 ldcp->cur_tbufp = tbufp;