/illumos-gate/usr/src/lib/libtecla/common/ |
H A D | chrqueue.c | 97 if(!cq) { in _new_GlCharQueue() 110 cq->nflush = cq->ntotal = 0; in _new_GlCharQueue() 123 return cq; in _new_GlCharQueue() 136 if(cq) { in _del_GlCharQueue() 137 cq->err = _del_ErrMsg(cq->err); in _del_GlCharQueue() 138 cq->bufmem = _del_FreeList(cq->bufmem, 1); in _del_GlCharQueue() 272 if(cq) { in _glq_empty_queue() 280 cq->buffers.head = cq->buffers.tail = NULL; in _glq_empty_queue() 281 cq->nflush = cq->ntotal = 0; in _glq_empty_queue() 295 return (cq && cq->buffers.head) ? (cq->ntotal - cq->nflush) : 0; in _glq_char_count() [all …]
|
H A D | chrqueue.h | 52 GlCharQueue *_del_GlCharQueue(GlCharQueue *cq); 57 int _glq_append_chars(GlCharQueue *cq, const char *chars, int n, 63 void _glq_empty_queue(GlCharQueue *cq); 68 int _glq_char_count(GlCharQueue *cq); 97 GlqFlushState _glq_flush_queue(GlCharQueue *cq, GlWriteFn *write_fn, 104 const char *_glq_last_error(GlCharQueue *cq);
|
/illumos-gate/usr/src/uts/common/io/ib/adapters/tavor/ |
H A D | tavor_cq.c | 70 tavor_cqhdl_t cq; in tavor_cq_alloc() local 256 cq->cq_eqnum = TAVOR_CQ_EQNUM_GET(cq->cq_cqnum); in tavor_cq_alloc() 257 cq->cq_erreqnum = TAVOR_CQ_ERREQNUM_GET(cq->cq_cqnum); in tavor_cq_alloc() 336 *cqhdl = cq; in tavor_cq_alloc() 389 cq = *cqhdl; in tavor_cq_free() 746 if ((cq->cq_is_umap) && (cq->cq_umap_dhp != NULL)) { in tavor_cq_resize() 1028 if ((cq != NULL) && (cq->cq_cqnum == cqnum) && in tavor_cq_handler() 1088 if ((cq != NULL) && (cq->cq_cqnum == cqnum) && in tavor_cq_err_handler() 1123 cq->cq_refcnt++; in tavor_cq_refcnt_inc() 1138 cq->cq_refcnt--; in tavor_cq_refcnt_dec() [all …]
|
H A D | tavor_wr.c | 2666 mutex_exit(&cq->cq_wrid_wqhdr_lock); in tavor_wrid_get_entry() 2868 tavor_wrid_cq_reap(tavor_cqhdl_t cq) in tavor_wrid_cq_reap() argument 2873 ASSERT(MUTEX_HELD(&cq->cq_lock)); in tavor_wrid_cq_reap() 2879 container = cq->cq_wrid_reap_head; in tavor_wrid_cq_reap() 2895 cq->cq_wrid_reap_head = cq->cq_wrid_reap_tail = NULL; in tavor_wrid_cq_reap() 2897 mutex_exit(&cq->cq_wrid_wqhdr_lock); in tavor_wrid_cq_reap() 2913 ASSERT(MUTEX_HELD(&cq->cq_lock)); in tavor_wrid_cq_force_reap() 2921 tavor_wrid_cq_reap(cq); in tavor_wrid_cq_force_reap() 2938 treep = &cq->cq_wrid_wqhdr_avl_tree; in tavor_wrid_cq_force_reap() 2955 tavor_cq_wqhdr_remove(cq, curr); in tavor_wrid_cq_force_reap() [all …]
|
H A D | tavor_umap.c | 248 tavor_cqhdl_t cq; in tavor_umap_cqmem() local 371 tavor_cqhdl_t cq; in tavor_devmap_umem_map() local 429 mutex_enter(&cq->cq_lock); in tavor_devmap_umem_map() 430 if (cq->cq_umap_dhp == NULL) { in tavor_devmap_umem_map() 431 cq->cq_umap_dhp = dhp; in tavor_devmap_umem_map() 433 mutex_exit(&cq->cq_lock); in tavor_devmap_umem_map() 435 mutex_exit(&cq->cq_lock); in tavor_devmap_umem_map() 569 tavor_cqhdl_t cq; in tavor_devmap_umem_unmap() local 697 mutex_enter(&cq->cq_lock); in tavor_devmap_umem_unmap() 701 mutex_exit(&cq->cq_lock); in tavor_devmap_umem_unmap() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/adapters/hermon/ |
H A D | hermon_cq.c | 75 hermon_cqhdl_t cq; in hermon_cq_alloc() local 170 &cq->cq_arm_ci_vdbr, &cq->cq_arm_ci_pdbr, &cq->cq_dbr_mapoffset); in hermon_cq_alloc() 376 *cqhdl = cq; in hermon_cq_alloc() 431 cq = *cqhdl; in hermon_cq_free() 553 hermon_dbr_free(state, cq->cq_uarpg, cq->cq_arm_ci_vdbr); in hermon_cq_free() 1087 if ((cq != NULL) && (cq->cq_cqnum == cqnum) && in hermon_cq_handler() 1136 if ((cq != NULL) && (cq->cq_cqnum == cqnum) && in hermon_cq_err_handler() 1170 cq->cq_refcnt++; in hermon_cq_refcnt_inc() 1185 cq->cq_refcnt--; in hermon_cq_refcnt_dec() 1631 cq->cq_umap_dhp = cq->cq_resize_hdl->cq_umap_dhp; in hermon_cq_resize_helper() [all …]
|
H A D | hermon_umap.c | 292 hermon_cqhdl_t cq; in hermon_umap_cqmem() local 302 cq->cq_resize_hdl->cq_cqinfo.qa_size : cq->cq_cqinfo.qa_size)); in hermon_umap_cqmem() 460 hermon_cqhdl_t cq; in hermon_devmap_umem_map() local 520 cq->cq_umap_dhp = dhp; in hermon_devmap_umem_map() 664 hermon_cqhdl_t cq; in hermon_devmap_umem_unmap() local 794 cq->cq_umap_dhp = NULL; in hermon_devmap_umem_unmap() 865 hermon_cqhdl_t cq; in hermon_devmap_dbrecmem_map() local 925 cq->cq_umap_dhp = dhp; in hermon_devmap_dbrecmem_map() 1063 hermon_cqhdl_t cq; in hermon_devmap_dbrecmem_unmap() local 1552 if (cq == NULL) { in hermon_umap_cq_data_out() [all …]
|
/illumos-gate/usr/src/lib/udapl/udapl_tavor/tavor/ |
H A D | dapl_hermon_hw.c | 45 ((cq->cq_consindx & cq->cq_size) >> cq->cq_log_cqsz)) 584 (munmap((char *)cq->cq_addr, cq->cq_map_len) < 0)) { in dapli_hermon_cq_resize_helper() 590 cq->cq_addr = cq->cq_resize_addr; in dapli_hermon_cq_resize_helper() 591 cq->cq_map_offset = cq->cq_resize_map_offset; in dapli_hermon_cq_resize_helper() 592 cq->cq_map_len = cq->cq_resize_map_len; in dapli_hermon_cq_resize_helper() 593 cq->cq_size = cq->cq_resize_size; in dapli_hermon_cq_resize_helper() 594 cq->cq_cqesz = cq->cq_resize_cqesz; in dapli_hermon_cq_resize_helper() 683 dapli_hermon_cq_update_ci(cq, cq->cq_poll_dbp); in dapli_hermon_cq_poll() 743 dapli_hermon_cq_update_ci(cq, cq->cq_poll_dbp); in dapli_hermon_cq_poll_one() 998 cqnum = cq->cq_num; in dapli_hermon_cq_notify() [all …]
|
H A D | dapl_arbel_hw.c | 563 cons_indx = cq->cq_consindx; in dapli_arbel_cq_peek() 680 dapli_arbel_cq_update_ci(cq, cq->cq_poll_dbp); in dapli_arbel_cq_poll() 734 cq->cq_consindx = in dapli_arbel_cq_poll_one() 736 dapli_arbel_cq_update_ci(cq, cq->cq_poll_dbp); in dapli_arbel_cq_poll_one() 992 dapli_arbel_cq_update_ci(cq, cq->cq_arm_dbp); in dapli_arbel_cq_notify() 993 cqnum = cq->cq_num; in dapli_arbel_cq_notify() 1386 ib_cq_handle_t cq; in dapli_arbel_cq_srq_entries_flush() local 1398 cq = qp->qp_rq_cqhdl; in dapli_arbel_cq_srq_entries_flush() 1525 dapli_arbel_cq_update_ci(cq, cq->cq_poll_dbp); in dapli_arbel_cq_srq_entries_flush() 1593 (cq->cq_poll_dbp)[1] = in dapli_arbel_cq_init() [all …]
|
H A D | dapl_tavor_hw.c | 795 cons_indx = cq->cq_consindx; in dapli_tavor_cq_peek() 852 cons_indx = cq->cq_consindx; in dapli_tavor_cq_poll() 913 cq->cq_consindx) - 1; in dapli_tavor_cq_poll() 949 cons_indx = cq->cq_consindx; in dapli_tavor_cq_poll_one() 971 cq->cq_consindx = in dapli_tavor_cq_poll_one() 975 cq->cq_num, 0); in dapli_tavor_cq_poll_one() 1271 cqnum = cq->cq_num; in dapli_tavor_cq_notify() 1719 ib_cq_handle_t cq; in dapli_tavor_cq_srq_entries_flush() local 1732 cq = qp->qp_rq_cqhdl; in dapli_tavor_cq_srq_entries_flush() 1832 cqe = &cq->cq_addr[indx]; in dapli_tavor_cq_srq_entries_flush() [all …]
|
H A D | dapl_tavor_wr.c | 68 dapl_os_lock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_get_entry() 114 dapl_os_unlock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_get_entry() 312 dapl_os_lock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_cq_reap() 315 container = cq->cq_wrid_reap_head; in dapls_tavor_wrid_cq_reap() 331 cq->cq_wrid_reap_head = cq->cq_wrid_reap_tail = NULL; in dapls_tavor_wrid_cq_reap() 333 dapl_os_unlock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_cq_reap() 356 dapls_tavor_wrid_cq_reap(cq); in dapls_tavor_wrid_cq_force_reap() 359 dapl_os_lock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_cq_force_reap() 398 dapl_os_lock(&cq->cq_wrid_wqhdr_lock); in dapls_tavor_wrid_cq_force_reap() 519 if ((cq->cq_wrid_reap_head == NULL) && in dapli_tavor_wrid_reaplist_add() [all …]
|
/illumos-gate/usr/src/uts/common/io/fibre-channel/fca/oce/ |
H A D | oce_mq.c | 47 struct oce_cq *cq; in oce_drain_mq_cq() local 52 cq = mq->cq; in oce_drain_mq_cq() 55 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct oce_mq_cqe); in oce_drain_mq_cq() 77 RING_GET(cq->ring, 1); in oce_drain_mq_cq() 82 oce_arm_cq(dev, cq->cq_id, num_cqe, B_TRUE); in oce_drain_mq_cq() 89 oce_arm_cq(mq->parent, mq->cq->cq_id, 0, B_TRUE); in oce_start_mq() 97 struct oce_cq *cq; in oce_clean_mq() local 102 cq = mq->cq; in oce_clean_mq() 108 RING_GET(cq->ring, 1); in oce_clean_mq() 113 oce_arm_cq(dev, cq->cq_id, num_cqe, B_FALSE); in oce_clean_mq() [all …]
|
H A D | oce_queue.c | 206 if (cq == NULL) { in oce_cq_create() 277 dev->cq[cq->cq_id % OCE_MAX_CQ] = cq; in oce_cq_create() 279 return (cq); in oce_cq_create() 298 cq->ring = NULL; in oce_cq_del() 310 dev->cq[cq->cq_id % OCE_MAX_CQ] = NULL; in oce_cq_del() 395 mq->cq = cq; in oce_mq_create() 442 mq->cq = NULL; in oce_mq_del() 639 wq->cq = cq; in oce_wq_create() 681 wq->cq = NULL; in oce_wq_del() 875 rq->cq = cq; in oce_rq_create() [all …]
|
H A D | oce_rx.c | 502 struct oce_cq *cq; in oce_drain_rq_cq() local 509 cq = rq->cq; in oce_drain_rq_cq() 554 RING_GET(cq->ring, 1); in oce_drain_rq_cq() 555 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, in oce_drain_rq_cq() 567 oce_arm_cq(dev, cq->cq_id, num_cqe, B_TRUE); in oce_drain_rq_cq() 615 struct oce_cq *cq; in oce_clean_rq() local 621 cq = rq->cq; in oce_clean_rq() 631 oce_arm_cq(dev, cq->cq_id, 1, B_TRUE); in oce_clean_rq() 633 RING_GET(cq->ring, 1); in oce_clean_rq() 634 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, in oce_clean_rq() [all …]
|
/illumos-gate/usr/src/uts/common/io/mlxcx/ |
H A D | mlxcx_ring.c | 364 cq->mlcq_bufhwm = cq->mlcq_nents - MLXCX_CQ_HWM_GAP; in mlxcx_cq_setup() 365 cq->mlcq_buflwm = cq->mlcq_nents - MLXCX_CQ_LWM_GAP; in mlxcx_cq_setup() 368 cq->mlcq_eq = eq; in mlxcx_cq_setup() 391 *cqp = cq; in mlxcx_cq_setup() 408 wq->mlwq_cq = cq; in mlxcx_rq_setup() 432 cq->mlcq_wq = wq; in mlxcx_rq_setup() 452 wq->mlwq_cq = cq; in mlxcx_sq_setup() 481 cq->mlcq_wq = wq; in mlxcx_sq_setup() 504 cq = wq->mlwq_cq; in mlxcx_quiesce_rx_cqs() 642 if (cq != NULL) in mlxcx_teardown_rx_group() [all …]
|
H A D | mlxcx_gld.c | 563 cq = sq->mlwq_cq; in mlxcx_mac_ring_tx() 587 if (cq->mlcq_bufcnt >= cq->mlcq_bufhwm || in mlxcx_mac_ring_tx() 588 (cq->mlcq_bufcnt + bcount) > cq->mlcq_nents) { in mlxcx_mac_ring_tx() 814 ASSERT(cq != NULL); in mlxcx_mac_ring_start() 828 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_start() 902 cq->mlcq_bufcnt = 0; in mlxcx_mac_ring_stop() 1012 mlxcx_arm_cq(mlxp, cq); in mlxcx_mac_ring_intr_enable() 1014 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_enable() 1027 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_disable() 1040 ASSERT(cq != NULL); in mlxcx_mac_ring_rx_poll() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/clients/of/sol_ofs/ |
H A D | sol_kverbs.c | 913 "arg: 0x%p", ibt_cq, cq, cq->comp_handler, arg); in ofs_cq_handler() 916 cq->comp_handler(cq, cq->cq_context); in ofs_cq_handler() 945 struct ib_cq *cq; in ib_create_cq() local 982 cq->device = device; in ib_create_cq() 987 ibt_set_cq_private(cq->ibt_cq, cq); in ib_create_cq() 993 return (cq); in ib_create_cq() 1024 cq, cq->device->reg_state); in ib_destroy_cq() 1048 ibt_set_cq_private(cq->ibt_cq, cq); in ib_destroy_cq() 1332 cq, flags); in ib_req_notify_cq() 2271 cq, cq->device->reg_state); in ib_poll_cq() [all …]
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | dedump.c | 161 struct copyreq *cq = (struct copyreq *)mp->b_rptr; in dedump_copyreq() local 164 "%lu\n", hdr, cq->cq_cmd, (void *)cq->cq_cr, cq->cq_id, cq->cq_flag, in dedump_copyreq() 165 (void *)cq->cq_private, (void *)cq->cq_addr, cq->cq_size); in dedump_copyreq()
|
/illumos-gate/usr/src/cmd/spell/ |
H A D | huff.c | 144 *py = ((y-1)<<w) + cq + k; in encode() 196 cq = c*q; in huff() 197 cs = cq<<(L-w); in huff() 198 qcs = (((long)(q-1)<<w) + cq) << (L-QW-w); in huff() 199 v0 = c - cq; in huff()
|
/illumos-gate/usr/src/uts/common/sys/ib/adapters/tavor/ |
H A D | tavor_hw.h | 1441 #define TAVOR_CQE_QPNUM_GET(cq, cqe) \ argument 1445 #define TAVOR_CQE_DQPN_GET(cq, cqe) \ argument 1449 #define TAVOR_CQE_SL_GET(cq, cqe) \ argument 1453 #define TAVOR_CQE_GRH_GET(cq, cqe) \ argument 1461 #define TAVOR_CQE_DLID_GET(cq, cqe) \ argument 1477 #define TAVOR_CQE_OPCODE_GET(cq, cqe) \ argument 1492 if ((cq)->cq_is_umap) { \ 1495 ddi_put32((cq)->cq_cqinfo.qa_acchdl, \ 1502 if ((cq)->cq_is_umap) { \ 1505 ddi_put32((cq)->cq_cqinfo.qa_acchdl, \ [all …]
|
/illumos-gate/usr/src/uts/common/io/ena/ |
H A D | ena_admin.c | 168 ena_admin_cq_t *cq = &aq->ea_cq; in ena_admin_read_resp() local 174 uint16_t head_mod = cq->eac_head & modulo_mask; in ena_admin_read_resp() 175 uint8_t phase = cq->eac_phase & ENAHW_RESP_PHASE_MASK; in ena_admin_read_resp() 203 ena_admin_cq_t *cq = &aq->ea_cq; in ena_admin_process_responses() local 208 uint16_t head_mod = cq->eac_head & modulo_mask; in ena_admin_process_responses() 211 ENA_DMA_SYNC(cq->eac_dma, DDI_DMA_SYNC_FORKERNEL); in ena_admin_process_responses() 212 hwresp = &cq->eac_entries[head_mod]; in ena_admin_process_responses() 216 cq->eac_head++; in ena_admin_process_responses() 217 head_mod = cq->eac_head & modulo_mask; in ena_admin_process_responses() 223 hwresp = &cq->eac_entries[head_mod]; in ena_admin_process_responses() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | dumpsubr.c | 1691 cv_wait(&cq->cv, &cq->mutex); in dumpsys_wait_cq() 1694 while (cq->open) in dumpsys_wait_cq() 1695 if (cq->first) in dumpsys_wait_cq() 1709 if (cq->ts != 0) { in dumpsys_put_cq() 1710 cq->empty += gethrtime() - cq->ts; in dumpsys_put_cq() 1711 cq->ts = 0; in dumpsys_put_cq() 1717 cq->first = cp; in dumpsys_put_cq() 1720 cq->last = cp; in dumpsys_put_cq() 1744 cq->last = NULL; in dumpsys_get_cq() 1745 cq->ts = now; in dumpsys_get_cq() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/clients/of/sol_uverbs/ |
H A D | sol_uverbs_comp.c | 286 rc = ibt_alloc_cq(uctxt->hca->hdl, &cq_attr, &ucq->cq, &real_size); in sol_uverbs_create_cq() 296 ibt_set_cq_private(ucq->cq, ucq); in sol_uverbs_create_cq() 307 (void *) ucq->cq, &resp.drv_out, sizeof (resp.drv_out)); in sol_uverbs_create_cq() 357 ibt_set_cq_handler(ucq->cq, sol_uverbs_comp_event_handler, ucq); in sol_uverbs_create_cq() 374 (void) ibt_free_cq(ucq->cq); in sol_uverbs_create_cq() 394 rc = ibt_free_cq(ucq->cq); in uverbs_ucq_free() 534 resize_status = ibt_resize_cq(ucq->cq, cmd.cqe, &resp.cqe); in sol_uverbs_resize_cq() 546 (void *) ucq->cq, &resp.drv_out, sizeof (resp.drv_out)); in sol_uverbs_resize_cq() 623 rc = ibt_enable_cq_notify(ucq->cq, flag); in sol_uverbs_req_notify_cq() 697 rc = ibt_poll_cq(ucq->cq, completions, cmd.ne, &resp.count); in sol_uverbs_poll_cq() [all …]
|
/illumos-gate/usr/src/uts/common/inet/ |
H A D | mi.c | 218 cq->cq_size = len; in mi_copyin() 219 cq->cq_flag = 0; in mi_copyin() 220 bcopy(mp->b_cont->b_rptr, &cq->cq_addr, sizeof (cq->cq_addr)); in mi_copyin() 302 cq->cq_private = mp->b_cont; in mi_copyin_n() 303 cq->cq_size = len; in mi_copyin_n() 304 cq->cq_flag = 0; in mi_copyin_n() 305 bcopy(mp->b_cont->b_rptr, &cq->cq_addr, sizeof (cq->cq_addr)); in mi_copyin_n() 306 cq->cq_addr += offset; in mi_copyin_n() 352 cq->cq_private = mp1; in mi_copyout() 358 sizeof (cq->cq_addr)); in mi_copyout() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/clients/rds/ |
H A D | rdsib_ib.c | 637 ret = ibt_poll_cq(cq, &wc, 1, &npolled); in rds_poll_ctrl_completions() 641 "returned: %d", ep, cq, ret); in rds_poll_ctrl_completions() 644 "returned: IBT_CQ_EMPTY", ep, cq); in rds_poll_ctrl_completions() 664 ep, cq, wc.wc_id, wc.wc_status); in rds_poll_ctrl_completions() 886 "returned: %d", ep, cq, ret); in rds_poll_data_completions() 912 ep, cq, wc.wc_id, wc.wc_status); in rds_poll_data_completions() 1004 ret = func(cq, ep); in rds_recvcq_handler() 1011 "failed: %d", ep, cq, ret); in rds_recvcq_handler() 1016 ret = func(cq, ep); in rds_recvcq_handler() 1044 ep, cq); in rds_poll_send_completions() [all …]
|