Lines Matching defs:stbp

160 	sfxge_tx_buffer_t *stbp = buf;
178 if ((rc = sfxge_dma_buffer_create(&(stbp->stb_esm), &dma_attr)) != 0)
186 SFXGE_OBJ_CHECK(stbp, sfxge_tx_buffer_t);
194 sfxge_tx_buffer_t *stbp = buf;
198 sfxge_dma_buffer_destroy(&(stbp->stb_esm));
200 SFXGE_OBJ_CHECK(stbp, sfxge_tx_buffer_t);
520 sfxge_tx_qfbp_put(sfxge_txq_t *stp, sfxge_tx_buffer_t *stbp)
524 ASSERT3P(stbp->stb_next, ==, NULL);
525 ASSERT3U(stbp->stb_off, ==, 0);
526 ASSERT3U(stbp->stb_esm.esm_used, ==, 0);
528 stbp->stb_next = stfp->stf_stbp;
529 stfp->stf_stbp = stbp;
537 sfxge_tx_buffer_t *stbp;
540 stbp = stfp->stf_stbp;
541 if (stbp == NULL) {
546 stfp->stf_stbp = stbp->stb_next;
547 stbp->stb_next = NULL;
557 return (stbp);
565 sfxge_tx_buffer_t *stbp;
569 stbp = stfp->stf_stbp;
572 while (stbp != NULL) {
575 next = stbp->stb_next;
576 stbp->stb_next = NULL;
581 kmem_cache_free(sp->s_tbc, stbp);
583 stbp = next;
767 sfxge_tx_buffer_t *stbp;
789 if ((stbp = stp->st_stbp[id]) != NULL) {
796 next = stbp->stb_next;
797 stbp->stb_next = NULL;
799 stbp->stb_esm.esm_used = 0;
800 stbp->stb_off = 0;
802 sfxge_tx_qfbp_put(stp, stbp);
804 stbp = next;
805 } while (stbp != NULL);
816 sfxge_tx_buffer_t *stbp;
842 stbp = stp->st_stbp[id];
846 while (stbp != NULL) {
849 next = stbp->stb_next;
850 stbp->stb_next = NULL;
852 stbp->stb_off = 0;
853 stbp->stb_esm.esm_used = 0;
855 sfxge_tx_qfbp_put(stp, stbp);
857 stbp = next;
908 sfxge_tx_buffer_t *stbp;
914 stbp = stp->st_stbp[id];
926 stp->st_stbp[id] = stbp;
1319 sfxge_tx_qbuffer_add(sfxge_txq_t *stp, sfxge_tx_buffer_t *stbp, boolean_t eop)
1332 ebp->eb_addr = stbp->stb_esm.esm_addr + stbp->stb_off;
1333 ebp->eb_size = stbp->stb_esm.esm_used - stbp->stb_off;
1336 (void) ddi_dma_sync(stbp->stb_esm.esm_dma_handle,
1337 stbp->stb_off, ebp->eb_size,
1340 stbp->stb_off = stbp->stb_esm.esm_used;
1357 sfxge_tx_msgb_copy(mblk_t *mp, sfxge_tx_buffer_t *stbp, size_t *offp,
1372 copy_off = stbp->stb_esm.esm_used;
1379 stbp->stb_esm.esm_base + copy_off, copy_size);
1381 stbp->stb_esm.esm_used += copy_size;
1382 ASSERT3U(stbp->stb_esm.esm_used, <=,
1406 sfxge_tx_buffer_t *stbp;
1410 stbp = stp->st_stbp[id];
1411 ASSERT(stbp == NULL || (stbp->stb_esm.esm_used == stbp->stb_off));
1474 if (stbp != NULL && (stbp->stb_esm.esm_used > stbp->stb_off)) {
1475 rc = sfxge_tx_qbuffer_add(stp, stbp, B_FALSE);
1499 if (stbp == NULL ||
1500 stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE) {
1502 stbp = sfxge_tx_qfbp_get(stp);
1503 if (stbp == NULL) {
1508 if ((stbp = kmem_cache_alloc(sp->s_tbc,
1516 stbp->stb_next = stp->st_stbp[id];
1517 stp->st_stbp[id] = stbp;
1521 eop = sfxge_tx_msgb_copy(mp, stbp, &off, &size);
1524 stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE);
1530 if (stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE || eop) {
1531 rc = sfxge_tx_qbuffer_add(stp, stbp, eop);
1585 sfxge_tx_buffer_t *stbp;
1663 stbp = NULL;
1682 if (stbp == NULL ||
1683 stbp->stb_esm.esm_used + hs > SFXGE_TX_BUFFER_SIZE) {
1685 stbp = sfxge_tx_qfbp_get(stp);
1686 if (stbp == NULL) {
1691 if ((stbp = kmem_cache_alloc(sp->s_tbc,
1699 stbp->stb_next = stp->st_stbp[id];
1700 stp->st_stbp[id] = stbp;
1704 ASSERT3U(stbp->stb_off, ==, stbp->stb_esm.esm_used);
1705 bcopy(hp, stbp->stb_esm.esm_base + stbp->stb_off, hs);
1706 stbp->stb_esm.esm_used += hs;
1709 rc = sfxge_tx_qbuffer_add(stp, stbp, B_FALSE);
1787 sfxge_tx_buffer_t *stbp;
1802 stbp = NULL;
1858 if (stbp != NULL && (stbp->stb_esm.esm_used > stbp->stb_off)) {
1859 rc = sfxge_tx_qbuffer_add(stp, stbp, B_FALSE);
1877 if (stbp == NULL ||
1878 stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE) {
1880 stbp = sfxge_tx_qfbp_get(stp);
1881 if (stbp == NULL) {
1886 if ((stbp = kmem_cache_alloc(sp->s_tbc,
1894 stbp->stb_next = stp->st_stbp[id];
1895 stp->st_stbp[id] = stbp;
1899 eop = sfxge_tx_msgb_copy(mp, stbp, &off, &size);
1902 stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE);
1908 if (stbp->stb_esm.esm_used == SFXGE_TX_BUFFER_SIZE || eop) {
1909 rc = sfxge_tx_qbuffer_add(stp, stbp, eop);