Home
last modified time | relevance | path

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

1234567

/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/telnet/
H A Dring.c113 ring->supply = ring->consume = ring->bottom = buffer;
115 ring->top = ring->bottom+ring->size;
132 ring->mark = ring_decrement(ring, ring->supply, 1);
194 ring->bottom + ((ring->consume + count) - ring->top))
203 ring->consume = ring->supply = ring->bottom;
229 if ((ring->consume < ring->supply) || ring_empty(ring)) {
234 return (ring_subtract(ring, ring->top, ring->supply));
252 if ((ring->mark == 0) || (ring->mark == ring->consume)) {
260 return (ring_subtract(ring, ring->mark, ring->consume));
272 if ((ring->mark == 0) || (ring->mark == ring->consume)) {
[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);
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);
95 extern void ring_encrypt(Ring *ring, void (*func)());
[all …]
/illumos-gate/usr/src/uts/intel/io/viona/
H A Dviona_ring.c238 ring); in viona_ring_lease_renew()
241 if (ring->vr_pa != 0 && ring->vr_size != 0) { in viona_ring_lease_renew()
315 ring->vr_mask = (ring->vr_size - 1); in viona_ring_init()
335 bzero(&ring->vr_stats, sizeof (ring->vr_stats)); in viona_ring_init()
353 ring->vr_pa = 0; in viona_ring_init()
373 cv_wait(&ring->vr_cv, &ring->vr_lock); in viona_ring_reset()
377 rs = cv_wait_sig(&ring->vr_cv, &ring->vr_lock); in viona_ring_reset()
518 (void) cv_wait_sig(&ring->vr_cv, &ring->vr_lock); in viona_worker()
794 head = vq_read_avail(ring, idx & ring->vr_mask); in vq_popchain()
890 vq_write_used_ent(ring, uidx & ring->vr_mask, cookie, len); in vq_pushchain()
[all …]
H A Dviona_tx.c91 cv_wait(&ring->vr_cv, &ring->vr_lock); in viona_tx_wait_outstanding()
140 ring->vr_txdesb = dp; in viona_tx_ring_alloc()
144 dp->d_ring = ring; in viona_tx_ring_alloc()
164 ring->vr_txdesb = NULL; in viona_tx_ring_free()
169 ring->vr_txiov = NULL; in viona_tx_ring_free()
192 mutex_exit(&ring->vr_lock); in viona_worker_tx()
201 viona_tx(link, ring); in viona_worker_tx()
240 (void) cv_wait_sig(&ring->vr_cv, &ring->vr_lock); in viona_worker_tx()
261 mutex_exit(&ring->vr_lock); in viona_worker_tx()
266 ring->vr_state = VRS_STOP; in viona_worker_tx()
[all …]
H A Dviona_rx.c93 ASSERT(MUTEX_HELD(&ring->vr_lock)); in viona_worker_rx()
96 viona_ring_disable_notify(ring); in viona_worker_rx()
108 mutex_exit(&ring->vr_lock); in viona_worker_rx()
110 mutex_enter(&ring->vr_lock); in viona_worker_rx()
124 (void) cv_wait_sig(&ring->vr_cv, &ring->vr_lock); in viona_worker_rx()
127 ring->vr_state = VRS_STOP; in viona_worker_rx()
134 mutex_exit(&ring->vr_lock); in viona_worker_rx()
136 mutex_enter(&ring->vr_lock); in viona_worker_rx()
138 viona_ring_enable_notify(ring); in viona_worker_rx()
608 viona_intr_ring(ring, B_FALSE); in viona_rx_common()
[all …]
/illumos-gate/usr/src/uts/common/xen/io/
H A Dblk_common.c171 blk_ring_t ring; in blk_ring_init() local
224 *ringp = ring; in blk_ring_init()
248 blk_ring_t ring; in blk_ring_fini() local
251 ring = *ringp; in blk_ring_fini()
280 ring->ri_kstats = kstat_create(ddi_get_name(ring->ri_dip), in blk_kstat_init()
287 ring->ri_kstats->ks_private = ring; in blk_kstat_init()
322 blk_ring_t ring; in blk_kstat_update() local
356 blk_ring_t ring; in blk_oe_state_change() local
390 (*(ring->ri_ringdown))(ring->ri_ringdown_arg); in blk_oe_state_change()
614 (*(ring->ri_ringup))(ring->ri_ringup_arg); in blk_start_connect()
[all …]
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Dib_ring.c76 (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()
87 diff = ring->w_alloc_ctr - (uint32_t)atomic_get(&ring->w_free_ctr); in __rdsv3_ib_ring_used()
101 ring->w_nr = nr; in rdsv3_ib_ring_resize()
116 avail = ring->w_nr - __rdsv3_ib_ring_used(ring); in rdsv3_ib_ring_alloc()
126 ring->w_alloc_ptr = (ring->w_alloc_ptr + ret) % ring->w_nr; in rdsv3_ib_ring_alloc()
136 ring->w_free_ptr = (ring->w_free_ptr + val) % ring->w_nr; in rdsv3_ib_ring_free()
146 ring->w_alloc_ptr = (ring->w_alloc_ptr - val) % ring->w_nr; in rdsv3_ib_ring_unalloc()
147 ring->w_alloc_ctr -= val; in rdsv3_ib_ring_unalloc()
[all …]
/illumos-gate/usr/src/uts/common/io/xge/hal/xgehal/
H A Dxgehal-ring.c133 xge_assert(ring); in __hal_ring_mempool_item_alloc()
145 (ring->rxds_per_block - 1 - i) * ring->rxd_size; in __hal_ring_mempool_item_alloc()
252 ring->config = &hldev->config.ring; in __hal_ring_open()
279 ring->rxdblock_priv_size = ring->rxd_priv_size * ring->rxds_per_block; in __hal_ring_open()
297 ring); in __hal_ring_open()
317 (ring->rxds_per_block * ring->rxd_size - ring->rxd_size)); in __hal_ring_open()
355 queue = &ring->config->queue[ring->channel.post_qid]; in __hal_ring_close()
398 queue = &ring->config->queue[ring->channel.post_qid]; in __hal_ring_prc_enable()
410 xge_os_pio_mem_write64(ring->channel.pdev, ring->channel.regh0, in __hal_ring_prc_enable()
440 xge_os_pio_mem_write64(ring->channel.pdev, ring->channel.regh0, in __hal_ring_prc_enable()
[all …]
H A Dxgehal-ring-fp.c38 xge_assert(ring); in __hal_ring_rxd_priv()
45 ((char*)ring->mempool->memblocks_priv_arr[memblock_idx] + ring->rxd_priv_size * i); in __hal_ring_rxd_priv()
564 if (ring->channel.usage_cnt > 0) in xge_hal_ring_dtr_post_post()
565 ring->channel.usage_cnt--; in xge_hal_ring_dtr_post_post()
597 if (ring->channel.usage_cnt > 0) in xge_hal_ring_dtr_post_post_wmb()
598 ring->channel.usage_cnt--; in xge_hal_ring_dtr_post_post_wmb()
694 if (++ring->cmpl_cnt > ring->indicate_max_pkts) { in xge_hal_ring_dtr_next_completed()
716 __hal_channel_dtr_complete(ring); in xge_hal_ring_dtr_next_completed()
729 ring->channel.usage_cnt++; in xge_hal_ring_dtr_next_completed()
730 if (ring->channel.stats.usage_max < ring->channel.usage_cnt) in xge_hal_ring_dtr_next_completed()
[all …]
/illumos-gate/usr/src/uts/i86pc/io/ioat/
H A Dioat_chan.c796 &ring->cr_desc[ring->cr_desc_next]; in ioat_ring_seed()
798 &ring->cr_desc[ring->cr_desc_prev]; in ioat_ring_seed()
1165 ring->cr_desc_prev = ring->cr_desc_next; in ioat_cmd_post_dca()
1166 ring->cr_desc_gen_prev = ring->cr_desc_gen; in ioat_cmd_post_dca()
1170 if (ring->cr_desc_next > ring->cr_desc_last) { in ioat_cmd_post_dca()
1181 &ring->cr_desc[ring->cr_desc_next]; in ioat_cmd_post_dca()
1183 &ring->cr_desc[ring->cr_desc_prev]; in ioat_cmd_post_dca()
1248 ring->cr_desc_prev = ring->cr_desc_next; in ioat_cmd_post_copy()
1249 ring->cr_desc_gen_prev = ring->cr_desc_gen; in ioat_cmd_post_copy()
1264 &ring->cr_desc[ring->cr_desc_next]; in ioat_cmd_post_copy()
[all …]
/illumos-gate/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
156 ring->cidx = GET_Q_NEXT(ring->cidx, n, ring->num_items)
159 ring->pidx = GET_Q_NEXT(ring->pidx, n, ring->num_items)
162 (void*)(((type *)DBUF_VA(ring->dbuf)) + ring->cidx)
165 (uint64_t)(((type *)DBUF_PA(ring->dbuf)) + ring->cidx)
168 (void *)(((type *)DBUF_VA(ring->dbuf)) + ring->pidx)
[all …]
/illumos-gate/usr/src/uts/common/io/xge/drv/
H A Dxgell.c236 xgell_rx_ring_t *ring = rx_buffer->ring; in xgell_rx_buffer_release() local
268 xgell_rx_ring_t *ring = rx_buffer->ring; in xgell_rx_buffer_recycle() local
371 rx_buffer->ring = ring; in xgell_rx_buffer_alloc()
760 if (ring->bf_pool.post > ring->bf_pool.post_hiwat) { in xgell_rx_1b_callback()
796 ring->rx_pkts++; in xgell_rx_1b_callback()
810 if ((ring->poll_mp == NULL) && (ring->poll_bytes > 0)) { in xgell_rx_1b_callback()
830 if (ring->bf_pool.post > ring->bf_pool.post_hiwat) { in xgell_rx_1b_callback()
873 ring->poll_mp = NULL; in xgell_rx_poll()
877 mp = ring->poll_mp; in xgell_rx_poll()
1223 ring->mmac.naddrfree = ring->mmac.naddr; in xgell_rx_ring_maddr_init()
[all …]
/illumos-gate/usr/src/uts/common/io/fibre-channel/fca/oce/
H A Doce_buf.c170 oce_ring_buffer_t *ring; in create_ring_buffer() local
175 if (ring == NULL) { 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()
211 ASSERT(ring != NULL); in destroy_ring_buffer()
214 oce_free_dma_buffer(dev, ring->dbuf); in destroy_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()
295 RING_PUT(rq->ring, 1); in oce_rq_charge()
319 RING_GET(rq->ring, 1); in oce_rq_discharge()
350 ring = rq->ring; in oce_rx()
351 cur_index = ring->cidx; in oce_rx()
422 ring = rq->ring; in oce_rx_bcopy()
424 cur_index = ring->cidx; in oce_rx_bcopy()
481 RING_GET(rq->ring, 1); in oce_rx_drop_pkt()
[all …]
H A Doce_queue.c95 if (eq->ring == NULL) { in oce_eq_create()
173 eq->ring = NULL; in oce_eq_del()
215 if (cq->ring == NULL) { in oce_cq_create()
298 cq->ring = NULL; in oce_cq_del()
434 mq->ring = NULL; in oce_mq_del()
569 wq->ring = NULL; in oce_wq_fini()
646 wq->ring->cidx = 0; in oce_wq_create()
647 wq->ring->pidx = 0; in oce_wq_create()
805 rq->ring = NULL; in oce_rq_fini()
881 rq->ring->cidx = 0; in oce_rq_create()
[all …]
/illumos-gate/usr/src/uts/common/io/nxge/
H A Dnxge_hio_guest.c607 tx_ring_t *ring; in nxge_tdc_lp_conf() local
616 if (ring->hv_set) { 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()
672 ring->hv_tx_cntl_ioaddr_size); in nxge_tdc_lp_conf()
697 ring->hv_set = B_TRUE; in nxge_tdc_lp_conf()
726 rx_rbr_ring_t *ring; in nxge_rdc_lp_conf() local
735 if (ring->hv_set) { in nxge_rdc_lp_conf()
755 ring->hv_rx_buf_ioaddr_size); in nxge_rdc_lp_conf()
790 ring->hv_rx_cntl_ioaddr_size); in nxge_rdc_lp_conf()
[all …]
/illumos-gate/usr/src/uts/common/io/rwd/
H A Drt2661.c710 ring->cur = ring->next = ring->stat = 0; in rt2661_reset_tx_ring()
826 ring->cur = ring->next = 0; in rt2661_reset_rx_ring()
857 desc = &ring->desc[ring->next]; in rt2661_tx_dma_intr()
858 data = &ring->data[ring->next]; in rt2661_tx_dma_intr()
910 data = &ring->data[ring->stat]; in rt2661_tx_intr()
985 desc = &ring->desc[ring->cur]; in rt2661_rx_intr()
986 data = &ring->data[ring->cur]; in rt2661_rx_intr()
1473 desc = &ring->desc[ring->cur]; in rt2661_send()
1474 data = &ring->data[ring->cur]; in rt2661_send()
1600 desc = &ring->desc[ring->cur]; in rt2661_mgmt_send()
[all …]
/illumos-gate/usr/src/uts/sun4u/sunfire/io/
H A Djtag.c1145 jtag_ring ring, in jtag_check_plus_board() argument
1172 int ring; in jtag_get_board_type() local
1294 int ring; in jtag_get_board_info() local
1820 jtag_ring ring, in jtag_init_chip() argument
1891 jtag_ring ring, in jtag_scanout_chip() argument
2038 int ring; in jtag_powerdown_board() local
2051 ring = board << 4; in jtag_powerdown_board()
2124 int ring; in jtag_init_disk_board() local
2126 ring = board << 4; in jtag_init_disk_board()
2293 jring = ((u_int)(ring & 0x10) << 3) | ((u_int)(ring & 0xE0) >> 1) | in select_ring()
[all …]
/illumos-gate/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()
/illumos-gate/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()
/illumos-gate/usr/src/uts/common/io/mac/
H A Dmac_stat.c427 ring->mr_stat(ring->mr_driver, stat, &val); in mac_rx_ring_stat_get()
448 ring->mr_ksp = ksp; in i_mac_rx_ring_stat_create()
468 ring->mr_stat(ring->mr_driver, stat, &val); in mac_tx_ring_stat_get()
489 ring->mr_ksp = ksp; in i_mac_tx_ring_stat_create()
1053 if (ring != NULL) { in mac_srs_stat_create()
1065 if (ring == NULL) { in mac_srs_stat_create()
1215 mac_ring_t *ring; in mac_pseudo_ring_stat_rename() local
1220 for (ring = group->mrg_rings; ring != NULL; in mac_pseudo_ring_stat_rename()
1221 ring = ring->mr_next) { in mac_pseudo_ring_stat_rename()
1230 for (ring = group->mrg_rings; ring != NULL; in mac_pseudo_ring_stat_rename()
[all …]
H A Dmac.c1534 for (ring = grp->mrg_rings; ring != NULL; ring = ring->mr_next) in mac_rx_group_unmark()
1604 for (ring = grp->mrg_rings; ring != NULL; ring = ring->mr_next, cnt++) { in mac_hwrings_get()
1672 for (ring = grp->mrg_rings; ring != NULL; ring = ring->mr_next, cnt++) { in mac_hwrings_idx_get()
4047 rv = ring->mr_start(ring->mr_driver, ring->mr_gen_num); in mac_start_ring()
4108 for (ring = group->mrg_rings; ring != NULL; ring = ring->mr_next) { in mac_start_group_and_rings()
4145 for (ring = group->mrg_rings; ring != NULL; ring = ring->mr_next) { in mac_stop_group_and_rings()
4554 ring = ring->mr_next; in mac_init_rings()
4599 ring = ring->mr_next) { in mac_compare_ddi_handle()
4809 for (ring = group->mrg_rings; ring != NULL; ring = ring->mr_next) in mac_find_ring()
7251 for (ring = group->mrg_rings; ring != NULL; ring = ring->mr_next) { in mac_release_rx_group()
[all …]
H A Dmac_datapath_setup.c506 mac_ring_t *ring; in mac_srs_poll_state_change() local
2331 for (ring = group->mrg_rings; ring != NULL; ring = ring->mr_next) { in mac_rx_switch_grp_to_sw()
2410 for (ring = rx_group->mrg_rings; ring != NULL; in mac_rx_srs_group_setup()
2411 ring = ring->mr_next) { in mac_rx_srs_group_setup()
2448 for (ring = rx_group->mrg_rings; ring != NULL; in mac_rx_srs_group_setup()
2449 ring = ring->mr_next) { in mac_rx_srs_group_setup()
2527 for (ring = grp->mrg_rings; ring != NULL; in mac_tx_srs_group_setup()
2528 ring = ring->mr_next) { in mac_tx_srs_group_setup()
3342 ring = ring->mr_next; in mac_datapath_teardown()
3602 ASSERT(ring == NULL || ring->mr_refcnt == 0); in mac_srs_signal()
[all …]
/illumos-gate/usr/src/uts/common/io/bge/
H A Dbge_main2.c312 for (ring = 0; ring < bgep->chipid.tx_rings; ++ring) in bge_reinit_rings()
318 for (ring = 0; ring < bgep->chipid.rx_rings; ++ring) in bge_reinit_rings()
324 for (ring = 0; ring < BGE_BUFF_RINGS_USED; ++ring) in bge_reinit_rings()
363 for (ring = 0; ring < BGE_RECV_RINGS_MAX; ++ring) in bge_reset()
365 for (ring = 0; ring < BGE_BUFF_RINGS_MAX; ++ring) in bge_reset()
368 for (ring = 0; ring < BGE_SEND_RINGS_MAX; ++ring) in bge_reset()
370 for (ring = 0; ring < BGE_SEND_RINGS_MAX; ++ring) in bge_reset()
385 for (ring = 0; ring < BGE_SEND_RINGS_MAX; ++ring) in bge_reset()
2837 for (ring = 0; ring < tx_rings; ++ring) {
2867 for (ring = 0; ring < rx_rings; ++ring) {
[all …]
H A Dbge_hw.h555 #define NIC_MEM_SEND_RING(ring) (0x0100+16*(ring)) argument
557 #define NIC_MEM_RECV_RING(ring) (0x0200+16*(ring)) argument
780 #define RECV_RING_CONS_INDEX_REG(ring) (0x0280+8*(ring)) argument
782 #define SEND_RING_NIC_INDEX_REG(ring) (0x0380+8*(ring)) argument
989 #define RECV_RULE_CTL_CLASS(ring) (((ring) << 8) & \ argument
1010 #define RULE_DEST_MAC_1(ring) (RULE_MATCH(ring) | \ argument
1024 #define RULE_IP_PROTO(ring) (RULE_MATCH_MASK(ring) | \ argument
1028 #define RULE_TCP_SPORT(ring) (RULE_MATCH_MASK(ring) | \ argument
1032 #define RULE_TCP_DPORT(ring) (RULE_MATCH_MASK(ring) | \ argument
1036 #define RULE_UDP_SPORT(ring) (RULE_MATCH_MASK(ring) | \ argument
[all …]

1234567