Lines Matching defs:rx_ringp
971 vnet_pseudo_rx_ring_t *rx_ringp;
992 rx_ringp = kmem_zalloc(sizeof (vnet_pseudo_rx_ring_t) *
999 rx_ringp[0].state |= VNET_RXRING_INUSE|VNET_RXRING_LDC_SERVICE;
1000 rx_ringp[0].index = 0;
1001 rx_ringp[1].state |= VNET_RXRING_INUSE|VNET_RXRING_HYBRID;
1002 rx_ringp[1].index = 1;
1003 rx_ringp[2].state |= VNET_RXRING_INUSE|VNET_RXRING_HYBRID;
1004 rx_ringp[2].index = 2;
1007 rx_grp->rings = rx_ringp;
1011 rx_ringp = &rx_grp->rings[i];
1012 rx_ringp->state = VNET_RXRING_FREE;
1013 rx_ringp->index = i;
1058 vnet_pseudo_rx_ring_t *rx_ringp;
1072 rx_ringp = &rx_grp->rings[index];
1073 if (rx_ringp->state == VNET_RXRING_FREE) {
1074 rx_ringp->state |= VNET_RXRING_INUSE;
1081 return (rx_ringp);
1381 ringp = vresp->rx_ringp;
2224 vnet_pseudo_rx_ring_t *rx_ringp;
2235 rx_ringp = &rx_grp->rings[r_index];
2237 rx_ringp->handle = r_handle;
2243 rx_ringp->grp = rx_grp;
2244 rx_ringp->vnetp = vnetp;
2247 mintr->mi_handle = (mac_intr_handle_t)rx_ringp;
2251 infop->mri_driver = (mac_ring_driver_t)rx_ringp;
2379 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)arg;
2386 if ((rx_ringp->state &
2388 rx_ringp->gen_num = mr_gen_num;
2389 rx_ringp->state |= VNET_RXRING_STARTED;
2393 ASSERT((rx_ringp->state & VNET_RXRING_HYBRID) != 0);
2402 if (rx_ringp->hw_rh == NULL) {
2403 rx_ringp->gen_num = mr_gen_num;
2404 rx_ringp->state |= VNET_RXRING_STARTED;
2408 err = mac_hwring_start(rx_ringp->hw_rh);
2410 rx_ringp->gen_num = mr_gen_num;
2411 rx_ringp->state |= VNET_RXRING_STARTED;
2422 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)arg;
2428 if ((rx_ringp->state &
2430 rx_ringp->state &= ~VNET_RXRING_STARTED;
2434 ASSERT((rx_ringp->state & VNET_RXRING_HYBRID) != 0);
2441 if (rx_ringp->hw_rh == NULL) {
2442 rx_ringp->state &= ~VNET_RXRING_STARTED;
2446 mac_hwring_stop(rx_ringp->hw_rh);
2447 rx_ringp->state &= ~VNET_RXRING_STARTED;
2453 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)rdriver;
2454 vnet_t *vnetp = (vnet_t *)rx_ringp->vnetp;
2463 if ((rx_ringp->state & VNET_RXRING_HYBRID) != 0) {
2472 (void) mac_hwring_getstat(rx_ringp->hw_rh, stat, val);
2477 ASSERT((rx_ringp->state &
2479 vresp = (vnet_res_t *)rx_ringp->hw_rh;
2537 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)arg;
2540 if (rx_ringp->hw_rh == NULL) {
2547 ASSERT((rx_ringp->state & VNET_RXRING_HYBRID) != 0);
2555 if (rx_ringp->state & VNET_RXRING_HYBRID) {
2556 return (mac_hwring_enable_intr(rx_ringp->hw_rh));
2558 vresp = (vnet_res_t *)rx_ringp->hw_rh;
2569 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)arg;
2572 if (rx_ringp->hw_rh == NULL) {
2579 ASSERT((rx_ringp->state & VNET_RXRING_HYBRID) != 0);
2587 if (rx_ringp->state & VNET_RXRING_HYBRID) {
2588 return (mac_hwring_disable_intr(rx_ringp->hw_rh));
2590 vresp = (vnet_res_t *)rx_ringp->hw_rh;
2601 vnet_pseudo_rx_ring_t *rx_ringp = (vnet_pseudo_rx_ring_t *)arg;
2604 vnet_t *vnetp = rx_ringp->vnetp;
2606 if (rx_ringp->hw_rh == NULL) {
2610 if (rx_ringp->state & VNET_RXRING_HYBRID) {
2611 mp = mac_hwring_poll(rx_ringp->hw_rh, bytes_to_pickup);
2624 vresp = (vnet_res_t *)rx_ringp->hw_rh;
2796 vnet_pseudo_rx_ring_t *rx_ringp;
2838 rx_ringp = &rx_grp->rings[i + VNET_HYBRID_RXRING_INDEX];
2841 rx_ringp->hw_rh = hw_rh[i];
2844 mac_hwring_setup(rx_ringp->hw_rh,
2845 (mac_resource_handle_t)rx_ringp, NULL);
2848 if (rx_ringp->state & VNET_RXRING_STARTED) {
2849 rv = mac_hwring_start(rx_ringp->hw_rh);
2851 mac_hwring_teardown(rx_ringp->hw_rh);
2852 rx_ringp->hw_rh = NULL;
2899 vnet_pseudo_rx_ring_t *rx_ringp;
2920 rx_ringp = &rx_grp->rings[i + VNET_HYBRID_RXRING_INDEX];
2921 if (rx_ringp->hw_rh != NULL) {
2923 mac_hwring_stop(rx_ringp->hw_rh);
2926 mac_hwring_teardown(rx_ringp->hw_rh);
2927 rx_ringp->hw_rh = NULL;
2950 vnet_pseudo_rx_ring_t *rx_ringp;
2967 rx_ringp = &rx_grp->rings[0];
2968 rx_ringp->hw_rh = (mac_ring_handle_t)vresp;
2969 vresp->rx_ringp = (void *)rx_ringp;
2976 rx_ringp = vnet_alloc_pseudo_rx_ring(vnetp);
2977 if (rx_ringp == NULL) {
2984 rx_ringp->hw_rh = (mac_ring_handle_t)vresp;
2992 vresp->rx_ringp = (void *)rx_ringp;
2993 rx_ringp->state |= VNET_RXRING_LDC_GUEST;
2996 rv = mac_group_add_ring(rx_grp->handle, rx_ringp->index);
2998 rx_ringp->state &= ~VNET_RXRING_LDC_GUEST;
2999 rx_ringp->hw_rh = NULL;
3000 vnet_free_pseudo_rx_ring(vnetp, rx_ringp);
3017 vnet_pseudo_rx_ring_t *rx_ringp;
3025 if (vresp->rx_ringp == NULL) {
3037 rx_ringp = &rx_grp->rings[0];
3038 rx_ringp->hw_rh = NULL;
3039 vresp->rx_ringp = NULL;
3046 rx_ringp = (vnet_pseudo_rx_ring_t *)vresp->rx_ringp;
3047 vresp->rx_ringp = NULL;
3049 if (rx_ringp != NULL && (rx_ringp->state & VNET_RXRING_LDC_GUEST)) {
3051 mac_group_rem_ring(rx_grp->handle, rx_ringp->handle);
3053 rx_ringp->hw_rh = NULL;
3054 rx_ringp->state &= ~VNET_RXRING_LDC_GUEST;
3057 vnet_free_pseudo_rx_ring(vnetp, rx_ringp);