Lines Matching refs:qp

473 #define tx_wqe(qp) (&(qp)->tx_ctx.wqe_active)
483 int (*rx_data)(struct siw_qp *qp);
506 int siw_qp_modify(struct siw_qp *qp, struct siw_qp_attrs *attr,
508 int siw_qp_mpa_rts(struct siw_qp *qp, enum mpa_v2_ctrl ctrl);
509 void siw_qp_llp_close(struct siw_qp *qp);
510 void siw_qp_cm_drop(struct siw_qp *qp, int schedule);
511 void siw_send_terminate(struct siw_qp *qp);
513 void siw_qp_get_ref(struct ib_qp *qp);
514 void siw_qp_put_ref(struct ib_qp *qp);
515 int siw_qp_add(struct siw_device *sdev, struct siw_qp *qp);
518 void siw_init_terminate(struct siw_qp *qp, enum term_elayer layer,
524 int siw_sqe_complete(struct siw_qp *qp, struct siw_sqe *sqe, u32 bytes,
526 int siw_rqe_complete(struct siw_qp *qp, struct siw_rqe *rqe, u32 bytes,
535 int siw_qp_sq_process(struct siw_qp *qp);
536 int siw_sq_start(struct siw_qp *qp);
537 int siw_activate_tx(struct siw_qp *qp);
542 int siw_proc_send(struct siw_qp *qp);
543 int siw_proc_rreq(struct siw_qp *qp);
544 int siw_proc_rresp(struct siw_qp *qp);
545 int siw_proc_write(struct siw_qp *qp);
546 int siw_proc_terminate(struct siw_qp *qp);
551 static inline void set_rx_fpdu_context(struct siw_qp *qp, u8 opcode)
554 qp->rx_fpdu = &qp->rx_tagged;
556 qp->rx_fpdu = &qp->rx_untagged;
558 qp->rx_stream.rdmap_op = opcode;
599 struct siw_qp *qp;
602 qp = xa_load(&sdev->qp_xa, id);
603 if (likely(qp && kref_get_unless_zero(&qp->ref))) {
605 return qp;
611 static inline u32 qp_id(struct siw_qp *qp)
613 return qp->base_qp.qp_num;
616 static inline void siw_qp_get(struct siw_qp *qp)
618 kref_get(&qp->ref);
621 static inline void siw_qp_put(struct siw_qp *qp)
623 kref_put(&qp->ref, siw_free_qp);
626 static inline int siw_sq_empty(struct siw_qp *qp)
628 struct siw_sqe *sqe = &qp->sendq[qp->sq_get % qp->attrs.sq_size];
633 static inline struct siw_sqe *sq_get_next(struct siw_qp *qp)
635 struct siw_sqe *sqe = &qp->sendq[qp->sq_get % qp->attrs.sq_size];
643 static inline struct siw_sqe *orq_get_current(struct siw_qp *qp)
645 return &qp->orq[qp->orq_get % qp->attrs.orq_size];
648 static inline struct siw_sqe *orq_get_free(struct siw_qp *qp)
650 struct siw_sqe *orq_e = &qp->orq[qp->orq_put % qp->attrs.orq_size];
658 static inline int siw_orq_empty(struct siw_qp *qp)
660 return orq_get_current(qp)->flags == 0 ? 1 : 0;
663 static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp)
665 struct siw_sqe *irq_e = &qp->irq[qp->irq_put % qp->attrs.irq_size];
668 qp->irq_put++;
702 #define siw_dbg_qp(qp, fmt, ...) \
703 ibdev_dbg(&qp->sdev->base_dev, "QP[%u] %s: " fmt, qp_id(qp), __func__, \
723 void siw_sq_flush(struct siw_qp *qp);
724 void siw_rq_flush(struct siw_qp *qp);