| /trueos/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| HD | ctfmerge.c | 286 finalize_phase_one(workqueue_t *wq) in finalize_phase_one() argument 302 for (startslot = -1, i = 0; i < wq->wq_nwipslots; i++) { in finalize_phase_one() 303 if (wq->wq_wip[i].wip_batchid == wq->wq_lastdonebatch + 1) { in finalize_phase_one() 311 for (i = startslot; i < startslot + wq->wq_nwipslots; i++) { in finalize_phase_one() 312 int slotnum = i % wq->wq_nwipslots; in finalize_phase_one() 313 wip_t *wipslot = &wq->wq_wip[slotnum]; in finalize_phase_one() 322 fifo_add(wq->wq_donequeue, wipslot->wip_td); in finalize_phase_one() 323 wq->wq_wip[slotnum].wip_td = NULL; in finalize_phase_one() 327 wq->wq_lastdonebatch = wq->wq_next_batchid++; in finalize_phase_one() 330 fifo_len(wq->wq_donequeue)); in finalize_phase_one() [all …]
|
| /trueos/sys/dev/cxgbe/iw_cxgbe/ |
| HD | t4.h | 345 static inline int t4_rqes_posted(struct t4_wq *wq) in t4_rqes_posted() argument 347 return wq->rq.in_use; in t4_rqes_posted() 350 static inline int t4_rq_empty(struct t4_wq *wq) in t4_rq_empty() argument 352 return wq->rq.in_use == 0; in t4_rq_empty() 355 static inline int t4_rq_full(struct t4_wq *wq) in t4_rq_full() argument 357 return wq->rq.in_use == (wq->rq.size - 1); in t4_rq_full() 360 static inline u32 t4_rq_avail(struct t4_wq *wq) in t4_rq_avail() argument 362 return wq->rq.size - 1 - wq->rq.in_use; in t4_rq_avail() 365 static inline void t4_rq_produce(struct t4_wq *wq, u8 len16) in t4_rq_produce() argument 367 wq->rq.in_use++; in t4_rq_produce() [all …]
|
| HD | cq.c | 197 static void insert_recv_cqe(struct t4_wq *wq, struct t4_cq *cq) in insert_recv_cqe() argument 201 CTR5(KTR_IW_CXGBE, "%s wq %p cq %p sw_cidx %u sw_pidx %u", __func__, wq, in insert_recv_cqe() 208 V_CQE_QPID(wq->sq.qid)); in insert_recv_cqe() 214 int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count) in c4iw_flush_rq() argument 217 int in_use = wq->rq.in_use - count; in c4iw_flush_rq() 221 __func__, wq, cq, wq->rq.in_use, count); in c4iw_flush_rq() 223 insert_recv_cqe(wq, cq); in c4iw_flush_rq() 229 static void insert_sq_cqe(struct t4_wq *wq, struct t4_cq *cq, in insert_sq_cqe() argument 234 CTR5(KTR_IW_CXGBE, "%s wq %p cq %p sw_cidx %u sw_pidx %u", __func__, wq, in insert_sq_cqe() 241 V_CQE_QPID(wq->sq.qid)); in insert_sq_cqe() [all …]
|
| HD | qp.c | 107 static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, in destroy_qp() argument 114 contigfree(wq->rq.queue, wq->rq.memsize, M_DEVBUF); in destroy_qp() 115 dealloc_sq(rdev, &wq->sq); in destroy_qp() 116 c4iw_rqtpool_free(rdev, wq->rq.rqt_hwaddr, wq->rq.rqt_size); in destroy_qp() 117 kfree(wq->rq.sw_rq); in destroy_qp() 118 kfree(wq->sq.sw_sq); in destroy_qp() 119 c4iw_put_qpid(rdev, wq->rq.qid, uctx); in destroy_qp() 120 c4iw_put_qpid(rdev, wq->sq.qid, uctx); in destroy_qp() 124 static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, in create_qp() argument 138 wq->sq.qid = c4iw_get_qpid(rdev, uctx); in create_qp() [all …]
|
| /trueos/sys/dev/cxgb/ulp/iw_cxgb/ |
| HD | iw_cxgb_hal.c | 295 struct t3_wq *wq, struct cxio_ucontext *uctx) in cxio_create_qp() argument 297 int depth = 1UL << wq->size_log2; in cxio_create_qp() 298 int rqsize = 1UL << wq->rq_size_log2; in cxio_create_qp() 300 wq->qpid = get_qpid(rdev_p, uctx); in cxio_create_qp() 301 if (!wq->qpid) in cxio_create_qp() 304 wq->rq = malloc(depth * sizeof(struct t3_swrq), M_DEVBUF, M_NOWAIT|M_ZERO); in cxio_create_qp() 305 if (!wq->rq) in cxio_create_qp() 308 wq->rq_addr = cxio_hal_rqtpool_alloc(rdev_p, rqsize); in cxio_create_qp() 309 if (!wq->rq_addr) in cxio_create_qp() 312 wq->sq = malloc(depth * sizeof(struct t3_swsq), M_DEVBUF, M_NOWAIT|M_ZERO); in cxio_create_qp() [all …]
|
| HD | iw_cxgb_qp.c | 282 qhp->wq.rq[Q_PTR2IDX(qhp->wq.rq_wptr, in build_rdma_recv() 283 qhp->wq.rq_size_log2)].wr_id = wr->wr_id; in build_rdma_recv() 284 qhp->wq.rq[Q_PTR2IDX(qhp->wq.rq_wptr, in build_rdma_recv() 285 qhp->wq.rq_size_log2)].pbl_addr = 0; in build_rdma_recv() 346 qhp->wq.rq[Q_PTR2IDX(qhp->wq.rq_wptr, in build_zero_stag_recv() 347 qhp->wq.rq_size_log2)].wr_id = wr->wr_id; in build_zero_stag_recv() 348 qhp->wq.rq[Q_PTR2IDX(qhp->wq.rq_wptr, in build_zero_stag_recv() 349 qhp->wq.rq_size_log2)].pbl_addr = pbl_addr; in build_zero_stag_recv() 373 num_wrs = Q_FREECNT(qhp->wq.sq_rptr, qhp->wq.sq_wptr, in iwch_post_send() 374 qhp->wq.sq_size_log2); in iwch_post_send() [all …]
|
| HD | iw_cxgb_cq.c | 93 struct t3_wq *wq; in iwch_poll_cq_one() local 106 wq = NULL; in iwch_poll_cq_one() 109 wq = &(qhp->wq); in iwch_poll_cq_one() 111 ret = cxio_poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, in iwch_poll_cq_one() 225 if (wq) in iwch_poll_cq_one()
|
| HD | iw_cxgb_hal.h | 144 int cxio_create_qp(struct cxio_rdev *rdev, u32 kernel_domain, struct t3_wq *wq, 146 int cxio_destroy_qp(struct cxio_rdev *rdev, struct t3_wq *wq, 168 int cxio_flush_rq(struct t3_wq *wq, struct t3_cq *cq, int count); 169 int cxio_flush_sq(struct t3_wq *wq, struct t3_cq *cq, int count); 170 void cxio_count_rcqes(struct t3_cq *cq, struct t3_wq *wq, int *count); 171 void cxio_count_scqes(struct t3_cq *cq, struct t3_wq *wq, int *count); 173 int cxio_poll_cq(struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe,
|
| HD | iw_cxgb_provider.c | 742 remove_handle(rhp, &rhp->qpidr, qhp->wq.qpid); in iwch_destroy_qp() 751 cxio_destroy_qp(&rhp->rdev, &qhp->wq, in iwch_destroy_qp() 755 ib_qp, qhp->wq.qpid, qhp); in iwch_destroy_qp() 810 qhp->wq.size_log2 = ilog2(wqsize); in iwch_create_qp() 811 qhp->wq.rq_size_log2 = ilog2(rqsize); in iwch_create_qp() 812 qhp->wq.sq_size_log2 = ilog2(sqsize); in iwch_create_qp() 814 if (cxio_create_qp(&rhp->rdev, !udata, &qhp->wq, in iwch_create_qp() 850 if (insert_handle(rhp, &rhp->qpidr, qhp, qhp->wq.qpid)) { in iwch_create_qp() 851 cxio_destroy_qp(&rhp->rdev, &qhp->wq, in iwch_create_qp() 874 uresp.qpid = qhp->wq.qpid; in iwch_create_qp() [all …]
|
| HD | iw_cxgb_ev.c | 102 qhp->attr.state, qhp->wq.qpid, CQE_STATUS(rsp_msg->cqe)); in post_qp_event() 171 __FUNCTION__, qhp->wq.qpid, qhp->ep); in iwch_ev_dispatch() 175 qhp->wq.qpid); in iwch_ev_dispatch() 251 CQE_STATUS(rsp_msg->cqe), qhp->wq.qpid); in iwch_ev_dispatch()
|
| /trueos/sys/dev/oce/ |
| HD | oce_queue.c | 49 static int oce_wq_create(struct oce_wq *wq, struct oce_eq *eq); 50 static void oce_wq_free(struct oce_wq *wq); 51 static void oce_wq_del(struct oce_wq *wq); 90 struct oce_wq *wq; in oce_queue_init_all() local 95 for_all_wq_queues(sc, wq, i) { in oce_queue_init_all() 96 sc->wq[i] = oce_wq_init(sc, sc->tx_ring_size, in oce_queue_init_all() 98 if (!sc->wq[i]) in oce_queue_init_all() 131 for_all_wq_queues(sc, wq, i) { in oce_queue_init_all() 132 rc = oce_wq_create(wq, sc->eq[i]); in oce_queue_init_all() 135 wq->queue_index = i; in oce_queue_init_all() [all …]
|
| HD | oce_if.c | 142 static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); 143 static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, 146 struct oce_wq *wq); 562 struct oce_wq *wq = NULL; in oce_multiq_start() local 569 wq = sc->wq[queue_index]; in oce_multiq_start() 571 LOCK(&wq->tx_lock); in oce_multiq_start() 572 status = oce_multiq_transmit(ifp, m, wq); in oce_multiq_start() 573 UNLOCK(&wq->tx_lock); in oce_multiq_start() 588 while ((m = buf_ring_dequeue_sc(sc->wq[i]->br)) != NULL) in oce_multiq_flush() 869 struct oce_wq *wq = sc->wq[wq_index]; in oce_tx() local [all …]
|
| HD | oce_sysctl.c | 893 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_pkts, in oce_add_stats_sysctls_be3() 896 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_bytes, in oce_add_stats_sysctls_be3() 899 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_reqs, 0, in oce_add_stats_sysctls_be3() 902 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_stops, 0, in oce_add_stats_sysctls_be3() 905 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_wrbs, 0, in oce_add_stats_sysctls_be3() 908 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_compl, 0, in oce_add_stats_sysctls_be3() 912 &sc->wq[i]->tx_stats.ipv6_ext_hdr_tx_drop, 0, in oce_add_stats_sysctls_be3() 1096 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_pkts, in oce_add_stats_sysctls_xe201() 1099 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_bytes, in oce_add_stats_sysctls_xe201() 1102 CTLFLAG_RD, &sc->wq[i]->tx_stats.tx_reqs, 0, in oce_add_stats_sysctls_xe201() [all …]
|
| HD | oce_if.h | 206 #define for_all_wq_queues(sc, wq, i) \ argument 207 for (i = 0, wq = sc->wq[0]; i < sc->nwqs; i++, wq = sc->wq[i]) 839 struct oce_wq *wq[OCE_MAX_WQ]; /* TX work queues */ member 965 int oce_start_wq(struct oce_wq *wq); 975 void oce_drain_wq_cq(struct oce_wq *wq); 1045 int oce_mbox_create_wq(struct oce_wq *wq);
|
| /trueos/sys/ofed/include/linux/ |
| HD | workqueue.h | 111 queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, in queue_delayed_work() argument 117 work->work.taskqueue = wq->taskqueue; in queue_delayed_work() 129 struct workqueue_struct wq; in schedule_delayed_work() local 130 wq.taskqueue = taskqueue_thread; in schedule_delayed_work() 131 return queue_delayed_work(&wq, dwork, delay); in schedule_delayed_work() 137 struct workqueue_struct *wq; in _create_workqueue_common() local 139 wq = kmalloc(sizeof(*wq), M_WAITOK); in _create_workqueue_common() 140 wq->taskqueue = taskqueue_create((name), M_WAITOK, in _create_workqueue_common() 141 taskqueue_thread_enqueue, &wq->taskqueue); in _create_workqueue_common() 142 taskqueue_start_threads(&wq->taskqueue, cpus, PWAIT, "%s", name); in _create_workqueue_common() [all …]
|
| /trueos/sys/dev/hyperv/vmbus/ |
| HD | hv_channel_mgmt.c | 101 if (w->wq->work_sema != NULL) { in work_item_callback() 102 sema_wait(w->wq->work_sema); in work_item_callback() 107 if (w->wq->work_sema != NULL) { in work_item_callback() 108 sema_post(w->wq->work_sema); in work_item_callback() 120 struct hv_work_queue* wq; in hv_work_queue_create() local 122 wq = malloc(sizeof(struct hv_work_queue), M_DEVBUF, M_NOWAIT | M_ZERO); in hv_work_queue_create() 123 KASSERT(wq != NULL, ("Error VMBUS: Failed to allocate work_queue\n")); in hv_work_queue_create() 124 if (wq == NULL) in hv_work_queue_create() 145 wq->work_sema = &hv_vmbus_g_connection.control_sema; in hv_work_queue_create() 156 wq->queue = taskqueue_create(qname, M_NOWAIT, taskqueue_thread_enqueue, in hv_work_queue_create() [all …]
|
| /trueos/contrib/ofed/libmthca/src/ |
| HD | cq.c | 295 struct mthca_wq *wq; in mthca_poll_one() local 340 wq = &(*cur_qp)->sq; in mthca_poll_one() 341 wqe_index = ((ntohl(cqe->wqe) - (*cur_qp)->send_wqe_offset) >> wq->wqe_shift); in mthca_poll_one() 346 wq = NULL; in mthca_poll_one() 352 wq = &(*cur_qp)->rq; in mthca_poll_one() 354 wqe_index = wqe >> wq->wqe_shift; in mthca_poll_one() 362 wqe_index = wq->max - 1; in mthca_poll_one() 366 if (wq) { in mthca_poll_one() 367 if (wq->last_comp < wqe_index) in mthca_poll_one() 368 wq->tail += wqe_index - wq->last_comp; in mthca_poll_one() [all …]
|
| HD | qp.c | 86 static inline int wq_overflow(struct mthca_wq *wq, int nreq, struct mthca_cq *cq) in wq_overflow() argument 90 cur = wq->head - wq->tail; in wq_overflow() 91 if (cur + nreq < wq->max) in wq_overflow() 95 cur = wq->head - wq->tail; in wq_overflow() 98 return cur + nreq >= wq->max; in wq_overflow()
|
| /trueos/contrib/ofed/libmlx4/src/ |
| HD | cq.c | 196 struct mlx4_wq *wq; in mlx4_poll_one() local 251 wq = &(*cur_qp)->sq; in mlx4_poll_one() 253 wq->tail += (uint16_t) (wqe_index - (uint16_t) wq->tail); in mlx4_poll_one() 254 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; in mlx4_poll_one() 255 ++wq->tail; in mlx4_poll_one() 266 wq = &(*cur_qp)->rq; in mlx4_poll_one() 267 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; in mlx4_poll_one() 268 ++wq->tail; in mlx4_poll_one()
|
| HD | qp.c | 105 static int wq_overflow(struct mlx4_wq *wq, int nreq, struct mlx4_cq *cq) in wq_overflow() argument 109 cur = wq->head - wq->tail; in wq_overflow() 110 if (cur + nreq < wq->max_post) in wq_overflow() 114 cur = wq->head - wq->tail; in wq_overflow() 117 return cur + nreq >= wq->max_post; in wq_overflow()
|
| /trueos/sys/ofed/drivers/infiniband/hw/mthca/ |
| HD | mthca_cq.c | 488 struct mthca_wq *wq; in mthca_poll_one() local 538 wq = &(*cur_qp)->sq; in mthca_poll_one() 540 >> wq->wqe_shift); in mthca_poll_one() 545 wq = NULL; in mthca_poll_one() 551 wq = &(*cur_qp)->rq; in mthca_poll_one() 553 wqe_index = wqe >> wq->wqe_shift; in mthca_poll_one() 560 wqe_index = wq->max - 1; in mthca_poll_one() 564 if (wq) { in mthca_poll_one() 565 if (wq->last_comp < wqe_index) in mthca_poll_one() 566 wq->tail += wqe_index - wq->last_comp; in mthca_poll_one() [all …]
|
| /trueos/sys/dev/drm2/radeon/ |
| HD | radeon_sa.c | 61 cv_init(&sa_manager->wq, "drm__radeon_sa_manager__wq"); in radeon_sa_bo_manager_init() 98 cv_destroy(&sa_manager->wq); in radeon_sa_bo_manager_fini() 364 r = -cv_wait_sig(&sa_manager->wq, in radeon_sa_bo_new() 402 cv_broadcast(&sa_manager->wq); in radeon_sa_bo_free() 413 spin_lock(&sa_manager->wq.lock); in radeon_sa_bo_dump_debug_info() 428 spin_unlock(&sa_manager->wq.lock); in radeon_sa_bo_dump_debug_info()
|
| /trueos/sys/ofed/drivers/infiniband/hw/mlx4/ |
| HD | cq.c | 608 struct mlx4_ib_wq *wq; in mlx4_ib_poll_one() local 679 wq = &(*cur_qp)->sq; in mlx4_ib_poll_one() 682 wq->tail += (u16) (wqe_ctr - (u16) wq->tail); in mlx4_ib_poll_one() 684 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; in mlx4_ib_poll_one() 685 ++wq->tail; in mlx4_ib_poll_one() 692 wq = &(*cur_qp)->rq; in mlx4_ib_poll_one() 693 tail = wq->tail & (wq->wqe_cnt - 1); in mlx4_ib_poll_one() 694 wc->wr_id = wq->wrid[tail]; in mlx4_ib_poll_one() 695 ++wq->tail; in mlx4_ib_poll_one()
|
| HD | alias_GUID.c | 300 queue_delayed_work(dev->sriov.alias_guid.ports_guid[port_index].wq, in aliasguid_query_handler() 425 queue_delayed_work(dev->sriov.alias_guid.ports_guid[port - 1].wq, in set_guid_rec() 456 queue_delayed_work(dev->sriov.alias_guid.ports_guid[port - 1].wq, in mlx4_ib_invalidate_all_guid_record() 564 queue_delayed_work(dev->sriov.alias_guid.ports_guid[port].wq, in mlx4_ib_init_alias_guid_work() 600 flush_workqueue(dev->sriov.alias_guid.ports_guid[i].wq); in mlx4_ib_destroy_alias_guid_service() 601 destroy_workqueue(dev->sriov.alias_guid.ports_guid[i].wq); in mlx4_ib_destroy_alias_guid_service() 664 dev->sriov.alias_guid.ports_guid[i].wq = in mlx4_ib_init_alias_guid_service() 666 if (!dev->sriov.alias_guid.ports_guid[i].wq) { in mlx4_ib_init_alias_guid_service() 677 destroy_workqueue(dev->sriov.alias_guid.ports_guid[i].wq); in mlx4_ib_init_alias_guid_service() 678 dev->sriov.alias_guid.ports_guid[i].wq = NULL; in mlx4_ib_init_alias_guid_service()
|
| /trueos/contrib/ofed/libmlx4/fixes/ |
| HD | xrc_consolidated_v2.patch | 44 struct mlx4_wq *wq; 86 wq = &(*cur_qp)->sq; 88 wq->tail += (uint16_t) (wqe_index - (uint16_t) wq->tail); 89 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; 90 ++wq->tail;
|