Home
last modified time | relevance | path

Searched refs:ring (Results 1 – 25 of 157) sorted by relevance

1234567

/titanic_50/usr/src/cmd/cmd-inet/usr.bin/telnet/
H A Dring.c104 ring_init(ring, buffer, count) in ring_init() argument
105 Ring *ring; in ring_init()
109 (void) memset(ring, 0, sizeof (*ring));
111 ring->size = count;
113 ring->supply = ring->consume = ring->bottom = buffer;
115 ring->top = ring->bottom+ring->size;
117 ring->clearto = 0;
129 ring_mark(ring) in ring_mark() argument
130 Ring *ring; in ring_mark()
132 ring->mark = ring_decrement(ring, ring->supply, 1);
[all …]
H A Dring.h76 extern int ring_init(Ring *ring, unsigned char *buffer, int count);
79 extern void ring_supply_data(Ring *ring, unsigned char *buffer, int count);
81 extern void ring_consume_data(Ring *ring, unsigned char *buffer, int count);
85 extern void ring_supplied(Ring *ring, int count);
86 extern void ring_consumed(Ring *ring, int count);
89 extern int ring_at_mark(Ring *ring);
90 extern int ring_empty_count(Ring *ring);
91 extern int ring_empty_consecutive(Ring *ring);
92 extern int ring_full_count(Ring *ring);
93 extern int ring_full_consecutive(Ring *ring);
[all …]
/titanic_50/usr/src/uts/common/xen/io/
H A Dblk_common.c142 static int blk_check_state_transition(blk_ring_t ring, XenbusState oestate);
143 static int blk_start_connect(blk_ring_t ring);
144 static void blk_start_disconnect(blk_ring_t ring);
145 static void blk_ring_close(blk_ring_t ring);
146 static int blk_bindto_frontend(blk_ring_t ring);
147 static void blk_unbindfrom_frontend(blk_ring_t ring);
150 static int blk_kstat_init(blk_ring_t ring);
151 static void blk_kstat_fini(blk_ring_t ring);
171 blk_ring_t ring; in blk_ring_init() local
175 ring = kmem_zalloc(sizeof (struct blk_ring_s), KM_SLEEP); in blk_ring_init()
[all …]
H A Dblk_common.h56 int blk_ring_init(blk_ringinit_args_t *args, blk_ring_t *ring);
57 void blk_ring_fini(blk_ring_t *ring);
59 boolean_t blk_ring_request_get(blk_ring_t ring, blkif_request_t *req);
60 void blk_ring_request_requeue(blk_ring_t ring);
63 void blk_ring_response_put(blk_ring_t ring, blkif_response_t *resp);
/titanic_50/usr/src/uts/common/io/ib/clients/rdsv3/
H A Dib_ring.c74 rdsv3_ib_ring_init(struct rdsv3_ib_work_ring *ring, uint32_t nr) in rdsv3_ib_ring_init() argument
76 (void) memset(ring, 0, sizeof (*ring)); in rdsv3_ib_ring_init()
77 ring->w_nr = nr; in rdsv3_ib_ring_init()
78 RDSV3_DPRINTF5("rdsv3_ib_ring_init", "ring %p nr %u", ring, ring->w_nr); in rdsv3_ib_ring_init()
82 __rdsv3_ib_ring_used(struct rdsv3_ib_work_ring *ring) in __rdsv3_ib_ring_used() argument
87 diff = ring->w_alloc_ctr - (uint32_t)atomic_get(&ring->w_free_ctr); in __rdsv3_ib_ring_used()
88 ASSERT(diff <= ring->w_nr); in __rdsv3_ib_ring_used()
94 rdsv3_ib_ring_resize(struct rdsv3_ib_work_ring *ring, uint32_t nr) in rdsv3_ib_ring_resize() argument
100 ASSERT(!__rdsv3_ib_ring_used(ring)); in rdsv3_ib_ring_resize()
101 ring->w_nr = nr; in rdsv3_ib_ring_resize()
[all …]
/titanic_50/usr/src/uts/common/io/xge/hal/xgehal/
H A Dxgehal-ring.c76 xge_hal_ring_t *ring, int from, int to) in __hal_ring_rxdblock_link() argument
105 xge_os_dma_sync(ring->channel.pdev, in __hal_ring_rxdblock_link()
130 xge_hal_ring_t *ring = (xge_hal_ring_t *)userdata; in __hal_ring_mempool_item_alloc() local
133 xge_assert(ring); in __hal_ring_mempool_item_alloc()
137 for (i=ring->rxds_per_block-1; i>=0; i--) { in __hal_ring_mempool_item_alloc()
141 int reserve_index = index * ring->rxds_per_block + i; in __hal_ring_mempool_item_alloc()
144 ring->reserved_rxds_arr[reserve_index] = (char *)item + in __hal_ring_mempool_item_alloc()
145 (ring->rxds_per_block - 1 - i) * ring->rxd_size; in __hal_ring_mempool_item_alloc()
155 ring->reserved_rxds_arr[reserve_index]; in __hal_ring_mempool_item_alloc()
157 ((char*)rxdblock_priv + ring->rxd_priv_size * i); in __hal_ring_mempool_item_alloc()
[all …]
H A Dxgehal-ring-fp.c29 __hal_ring_rxd_priv(xge_hal_ring_t *ring, xge_hal_dtr_h dtrh) in __hal_ring_rxd_priv() argument
38 xge_assert(ring); in __hal_ring_rxd_priv()
39 if (ring->buffer_mode == XGE_HAL_RING_QUEUE_BUFFER_MODE_5) { in __hal_ring_rxd_priv()
45 ((char*)ring->mempool->memblocks_priv_arr[memblock_idx] + ring->rxd_priv_size * i); in __hal_ring_rxd_priv()
477 xge_hal_ring_t *ring = (xge_hal_ring_t *)channelh; in xge_hal_ring_dtr_pre_post() local
545 xge_hal_ring_t *ring = (xge_hal_ring_t *)channelh; in xge_hal_ring_dtr_post_post() local
553 priv = __hal_ring_rxd_priv(ring, rxdp); in xge_hal_ring_dtr_post_post()
554 xge_os_dma_sync(ring->channel.pdev, in xge_hal_ring_dtr_post_post()
556 priv->dma_offset, ring->rxd_size, in xge_hal_ring_dtr_post_post()
564 if (ring->channel.usage_cnt > 0) in xge_hal_ring_dtr_post_post()
[all …]
/titanic_50/usr/src/uts/i86pc/io/ioat/
H A Dioat_chan.c96 int ioat_ring_reserve(ioat_channel_t channel, ioat_channel_ring_t *ring,
99 static void ioat_cmd_post_copy(ioat_channel_ring_t *ring, uint64_t src_addr,
101 static void ioat_cmd_post_dca(ioat_channel_ring_t *ring, uint32_t dca_id);
295 ioat_channel_ring_t *ring; in ioat_channel_resume() local
303 ring = channel->ic_ring; in ioat_channel_resume()
333 bzero(ring->cr_desc, channel->ic_desc_alloc_size); in ioat_channel_resume()
338 (uint32_t)(ring->cr_phys_desc & 0xffffffff)); in ioat_channel_resume()
341 (uint32_t)(ring->cr_phys_desc >> 32)); in ioat_channel_resume()
346 (uint32_t)(ring->cr_phys_desc & 0xffffffff)); in ioat_channel_resume()
349 (uint32_t)(ring->cr_phys_desc >> 32)); in ioat_channel_resume()
[all …]
/titanic_50/usr/src/uts/common/sys/fibre-channel/fca/oce/
H A Doce_buf.h146 #define RING_NUM_PENDING(ring) ring->num_used argument
148 #define RING_NUM_FREE(ring) \ argument
149 (uint32_t)(ring->num_items - ring->num_used)
151 #define RING_FULL(ring) (ring->num_used == ring->num_items) argument
153 #define RING_EMPTY(ring) (ring->num_used == 0) argument
155 #define RING_GET(ring, n) \ argument
156 ring->cidx = GET_Q_NEXT(ring->cidx, n, ring->num_items)
158 #define RING_PUT(ring, n) \ argument
159 ring->pidx = GET_Q_NEXT(ring->pidx, n, ring->num_items)
161 #define RING_GET_CONSUMER_ITEM_VA(ring, type) \ argument
[all …]
/titanic_50/usr/src/uts/common/io/fibre-channel/fca/oce/
H A Doce_buf.c170 oce_ring_buffer_t *ring; in create_ring_buffer() local
174 ring = kmem_zalloc(sizeof (oce_ring_buffer_t), KM_NOSLEEP); in create_ring_buffer()
175 if (ring == NULL) { in create_ring_buffer()
181 ring->dbuf = oce_alloc_dma_buffer(dev, size, NULL, flags); in create_ring_buffer()
182 if (ring->dbuf == NULL) { in create_ring_buffer()
189 ring->num_items = num_items; in create_ring_buffer()
190 ring->item_size = item_size; in create_ring_buffer()
191 ring->num_used = 0; in create_ring_buffer()
192 return (ring); in create_ring_buffer()
195 kmem_free(ring, sizeof (oce_ring_buffer_t)); in create_ring_buffer()
[all …]
H A Doce_rx.c274 oce_ring_buffer_t *ring; in oce_rq_charge() local
277 ring = rq->ring; in oce_rq_charge()
278 cur_index = ring->cidx; in oce_rq_charge()
286 cur_index = GET_Q_NEXT(cur_index, 1, ring->num_items); in oce_rq_charge()
289 rqe = RING_GET_PRODUCER_ITEM_VA(rq->ring, in oce_rq_charge()
293 shadow_rq[rq->ring->pidx] = rqbd; in oce_rq_charge()
295 RING_PUT(rq->ring, 1); in oce_rq_charge()
317 rqbd = shadow_rq[rq->ring->cidx]; in oce_rq_discharge()
319 RING_GET(rq->ring, 1); in oce_rq_discharge()
343 oce_ring_buffer_t *ring; in oce_rx() local
[all …]
H A Doce_queue.c92 eq->ring = create_ring_buffer(dev, q_len, in oce_eq_create()
95 if (eq->ring == NULL) { in oce_eq_create()
97 "EQ ring alloc failed:0x%p", (void *)eq->ring); in oce_eq_create()
107 fwcmd->params.req.num_pages = eq->ring->dbuf->num_pages; in oce_eq_create()
108 oce_page_list(eq->ring->dbuf, &fwcmd->params.req.pages[0], in oce_eq_create()
109 eq->ring->dbuf->num_pages); in oce_eq_create()
136 destroy_ring_buffer(dev, eq->ring); in oce_eq_create()
172 destroy_ring_buffer(dev, eq->ring); in oce_eq_del()
173 eq->ring = NULL; in oce_eq_del()
213 cq->ring = create_ring_buffer(dev, q_len, in oce_cq_create()
[all …]
/titanic_50/usr/src/uts/common/io/xge/drv/
H A Dxgell.c197 xgell_rx_buffer_replenish_all(xgell_rx_ring_t *ring) in xgell_rx_buffer_replenish_all() argument
199 xgell_rx_buffer_pool_t *bf_pool = &ring->bf_pool; in xgell_rx_buffer_replenish_all()
207 (xge_hal_ring_dtr_reserve(ring->channelh, &dtr) == XGE_HAL_OK)) { in xgell_rx_buffer_replenish_all()
218 xge_hal_ring_dtr_private(ring->channelh, dtr); in xgell_rx_buffer_replenish_all()
223 xge_hal_ring_dtr_post(ring->channelh, dtr); in xgell_rx_buffer_replenish_all()
236 xgell_rx_ring_t *ring = rx_buffer->ring; in xgell_rx_buffer_release() local
237 xgell_rx_buffer_pool_t *bf_pool = &ring->bf_pool; in xgell_rx_buffer_release()
268 xgell_rx_ring_t *ring = rx_buffer->ring; in xgell_rx_buffer_recycle() local
269 xgelldev_t *lldev = ring->lldev; in xgell_rx_buffer_recycle()
270 xgell_rx_buffer_pool_t *bf_pool = &ring->bf_pool; in xgell_rx_buffer_recycle()
[all …]
/titanic_50/usr/src/uts/common/io/nxge/
H A Dnxge_hio_guest.c607 tx_ring_t *ring; in nxge_tdc_lp_conf() local
614 ring = nxge->tx_rings->rings[channel]; in nxge_tdc_lp_conf()
616 if (ring->hv_set) { in nxge_tdc_lp_conf()
631 ring->hv_tx_buf_base_ioaddr_pp = (uint64_t)data->orig_ioaddr_pp; in nxge_tdc_lp_conf()
632 ring->hv_tx_buf_ioaddr_size = (uint64_t)data->orig_alength; in nxge_tdc_lp_conf()
636 ring->hv_tx_buf_base_ioaddr_pp, in nxge_tdc_lp_conf()
637 ring->hv_tx_buf_ioaddr_size); in nxge_tdc_lp_conf()
645 ring->hv_tx_buf_base_ioaddr_pp, in nxge_tdc_lp_conf()
646 ring->hv_tx_buf_ioaddr_size)); in nxge_tdc_lp_conf()
659 channel, hv_rv, ring->hv_tx_buf_base_ioaddr_pp, in nxge_tdc_lp_conf()
[all …]
/titanic_50/usr/src/cmd/cmd-inet/usr.lib/in.chargend/
H A Din.chargend.c48 static char ring[RINGSIZE]; variable
57 endring = ring; in initring()
72 char *rs = ring; in chargen_stream()
78 rs = ring; in chargen_stream()
85 rp = ring; in chargen_stream()
91 rp = ring; in chargen_stream()
110 static char *rs = ring; in chargen_dg()
114 rs = ring; in chargen_dg()
118 rp = ring; in chargen_dg()
122 rp = ring; in chargen_dg()
/titanic_50/usr/src/uts/common/io/rwd/
H A Drt2661.c609 struct rt2661_tx_ring *ring, int count) in rt2661_alloc_tx_ring() argument
618 ring->count = count; in rt2661_alloc_tx_ring()
619 ring->queued = 0; in rt2661_alloc_tx_ring()
620 ring->cur = 0; in rt2661_alloc_tx_ring()
621 ring->next = 0; in rt2661_alloc_tx_ring()
622 ring->stat = 0; in rt2661_alloc_tx_ring()
627 &ring->txdesc_dma); in rt2661_alloc_tx_ring()
634 ring->desc = (struct rt2661_tx_desc *)ring->txdesc_dma.mem_va; in rt2661_alloc_tx_ring()
635 (void) bzero(ring->desc, size); in rt2661_alloc_tx_ring()
636 ring->paddr = ring->txdesc_dma.cookie.dmac_address; in rt2661_alloc_tx_ring()
[all …]
/titanic_50/usr/src/uts/sun4u/sunfire/io/
H A Djtag.c1114 get_ring_descriptor_bytype(int ring, enum board_type type) in get_ring_descriptor_bytype() argument
1119 return (cpu_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1122 return (io1_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1125 return (io1plus_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1128 return (io2_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1131 return (io2plus_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1134 return (io3_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1137 return (disk_system_board[ring & 0xf]); in get_ring_descriptor_bytype()
1147 jtag_ring ring, in jtag_check_plus_board() argument
1159 if ((jtag_scanout_chip(jreg, ring, comp, (u_int *)&fhc_data) >= 0) && in jtag_check_plus_board()
[all …]
/titanic_50/usr/src/uts/common/io/bnxe/
H A Dbnxe_rr.c45 int ring = 0; in BnxeRouteTxRing() local
134 ring = ((u32_t)(pHdr[0] ^ pHdr[1] ^ pHdr[2] ^ pHdr[3]) % in BnxeRouteTxRing()
142 ring = ((pHdr[4] ^ pHdr[5] ^ pHdr[6] ^ pHdr[7]) % in BnxeRouteTxRing()
149 ring = (pHdr[19] % numRings); in BnxeRouteTxRing()
156 ring = (pHdr[19] % numRings); in BnxeRouteTxRing()
161 ring = (pMblk->b_band % numRings); in BnxeRouteTxRing()
170 ring = (pHdr[5] % numRings); in BnxeRouteTxRing()
175 ring = (pMblk->b_band % numRings); in BnxeRouteTxRing()
181 ring = 0; in BnxeRouteTxRing()
185 return ring; in BnxeRouteTxRing()
/titanic_50/usr/src/uts/common/io/mac/
H A Dmac.c602 mac_ring_t *ring = (mac_ring_t *)buf; in i_mac_ring_ctor() local
604 bzero(ring, sizeof (mac_ring_t)); in i_mac_ring_ctor()
605 cv_init(&ring->mr_cv, NULL, CV_DEFAULT, NULL); in i_mac_ring_ctor()
606 mutex_init(&ring->mr_lock, NULL, MUTEX_DEFAULT, NULL); in i_mac_ring_ctor()
607 ring->mr_state = MR_FREE; in i_mac_ring_ctor()
615 mac_ring_t *ring = (mac_ring_t *)buf; in i_mac_ring_dtor() local
617 cv_destroy(&ring->mr_cv); in i_mac_ring_dtor()
618 mutex_destroy(&ring->mr_lock); in i_mac_ring_dtor()
1090 mac_ring_t *ring = NULL; in mac_start() local
1106 ring = (mac_ring_t *)mip->mi_default_tx_ring; in mac_start()
[all …]
H A Dmac_stat.c415 mac_ring_t *ring = (mac_ring_t *)handle; in mac_rx_ring_stat_get() local
425 if (ring->mr_stat != NULL) in mac_rx_ring_stat_get()
426 ring->mr_stat(ring->mr_driver, stat, &val); in mac_rx_ring_stat_get()
439 i_mac_rx_ring_stat_create(mac_ring_t *ring, const char *modname, in i_mac_rx_ring_stat_create() argument
444 ksp = i_mac_stat_create(ring, modname, statname, in i_mac_rx_ring_stat_create()
447 ring->mr_ksp = ksp; in i_mac_rx_ring_stat_create()
456 mac_ring_t *ring = (mac_ring_t *)handle; in mac_tx_ring_stat_get() local
466 if (ring->mr_stat != NULL) in mac_tx_ring_stat_get()
467 ring->mr_stat(ring->mr_driver, stat, &val); in mac_tx_ring_stat_get()
480 i_mac_tx_ring_stat_create(mac_ring_t *ring, const char *modname, in i_mac_tx_ring_stat_create() argument
[all …]
H A Dmac_datapath_setup.c194 #define MAC_RING_RETARGETABLE(ring) \ argument
195 (((ring) != NULL) && \
196 ((ring)->mr_info.mri_intr.mi_ddi_handle != NULL) && \
197 !((ring)->mr_info.mri_intr.mi_ddi_shared))
505 mac_ring_t *ring; in mac_srs_poll_state_change() local
512 ring = mac_srs->srs_ring; in mac_srs_poll_state_change()
513 if ((ring != NULL) && in mac_srs_poll_state_change()
514 (ring->mr_classify_type == MAC_HW_CLASSIFIER)) { in mac_srs_poll_state_change()
714 mac_ring_t *ring; in mac_tx_cpu_init() local
740 ring = (mac_ring_t *)sringp->s_ring_tx_arg2; in mac_tx_cpu_init()
[all …]
/titanic_50/usr/src/uts/intel/io/drm/
H A Di915_dma.c53 drm_i915_ring_buffer_t *ring = &(dev_priv->ring); in i915_wait_ring() local
61 ring->head = I915_READ(PRB0_HEAD) & HEAD_ADDR; in i915_wait_ring()
63 ring->space = ring->head - (ring->tail + 8); in i915_wait_ring()
64 if (ring->space < 0) in i915_wait_ring()
65 ring->space += ring->Size; in i915_wait_ring()
66 if (ring->space >= n) in i915_wait_ring()
69 if (ring->head != last_head) in i915_wait_ring()
75 last_head = ring->head; in i915_wait_ring()
134 drm_i915_ring_buffer_t *ring = &(dev_priv->ring); in i915_kernel_lost_context() local
136 ring->head = I915_READ(PRB0_HEAD) & HEAD_ADDR; in i915_kernel_lost_context()
[all …]
/titanic_50/usr/src/uts/common/io/bge/
H A Dbge_main2.c285 bge_reinit_buff_ring(buff_ring_t *brp, uint32_t ring) in bge_reinit_buff_ring() argument
318 hw_rbd_p->flags |= ring_type_flag[ring]; in bge_reinit_buff_ring()
335 uint32_t ring; in bge_reinit_rings() local
342 for (ring = 0; ring < bgep->chipid.tx_rings; ++ring) in bge_reinit_rings()
343 bge_reinit_send_ring(&bgep->send[ring]); in bge_reinit_rings()
348 for (ring = 0; ring < bgep->chipid.rx_rings; ++ring) in bge_reinit_rings()
349 bge_reinit_recv_ring(&bgep->recv[ring]); in bge_reinit_rings()
354 for (ring = 0; ring < BGE_BUFF_RINGS_USED; ++ring) in bge_reinit_rings()
355 bge_reinit_buff_ring(&bgep->buff[ring], ring); in bge_reinit_rings()
382 uint32_t ring; in bge_reset() local
[all …]
H A Dbge_hw.h521 #define NIC_MEM_SEND_RING(ring) (0x0100+16*(ring)) argument
523 #define NIC_MEM_RECV_RING(ring) (0x0200+16*(ring)) argument
549 #define NIC_MEM_SHADOW_SEND_RING(ring, nslots) (0x4000 + 4*(ring)*(nslots)) argument
746 #define RECV_RING_CONS_INDEX_REG(ring) (0x0280+8*(ring)) argument
747 #define SEND_RING_HOST_INDEX_REG(ring) (0x0300+8*(ring)) argument
748 #define SEND_RING_NIC_INDEX_REG(ring) (0x0380+8*(ring)) argument
955 #define RECV_RULE_CTL_CLASS(ring) (((ring) << 8) & \ argument
971 #define RULE_MATCH(ring) (RECV_RULE_CTL_ENABLE | RECV_RULE_CTL_OP_EQ | \ argument
972 RECV_RULE_CTL_CLASS((ring)))
974 #define RULE_MATCH_MASK(ring) (RULE_MATCH(ring) | RECV_RULE_CTL_MASK) argument
[all …]
/titanic_50/usr/src/uts/common/io/ral/
H A Drt2560.c570 rt2560_alloc_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring, in rt2560_alloc_tx_ring() argument
576 ring->count = count; in rt2560_alloc_tx_ring()
577 ring->queued = 0; in rt2560_alloc_tx_ring()
578 ring->cur = ring->next = 0; in rt2560_alloc_tx_ring()
579 ring->cur_encrypt = ring->next_encrypt = 0; in rt2560_alloc_tx_ring()
581 ring->data = kmem_zalloc(count * (sizeof (struct rt2560_tx_data)), in rt2560_alloc_tx_ring()
583 ring->dr_txbuf = kmem_zalloc(count * (sizeof (struct dma_region)), in rt2560_alloc_tx_ring()
586 err = ral_dma_region_alloc(sc, &ring->dr_desc, in rt2560_alloc_tx_ring()
595 err = ral_dma_region_alloc(sc, &ring->dr_txbuf[i], size, in rt2560_alloc_tx_ring()
599 ral_dma_region_free(sc, &ring->dr_txbuf[i]); in rt2560_alloc_tx_ring()
[all …]

1234567