Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/iw_cxgbe/qp.c
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | static void free_qp_work(struct work_struct *work) | ||||
ucontext = qhp->ucontext; | ucontext = qhp->ucontext; | ||||
rhp = qhp->rhp; | rhp = qhp->rhp; | ||||
CTR3(KTR_IW_CXGBE, "%s qhp %p ucontext %p", __func__, | CTR3(KTR_IW_CXGBE, "%s qhp %p ucontext %p", __func__, | ||||
qhp, ucontext); | qhp, ucontext); | ||||
destroy_qp(&rhp->rdev, &qhp->wq, | destroy_qp(&rhp->rdev, &qhp->wq, | ||||
ucontext ? &ucontext->uctx : &rhp->rdev.uctx); | ucontext ? &ucontext->uctx : &rhp->rdev.uctx); | ||||
if (ucontext) | |||||
c4iw_put_ucontext(ucontext); | |||||
kfree(qhp); | kfree(qhp); | ||||
} | } | ||||
static void queue_qp_free(struct kref *kref) | static void queue_qp_free(struct kref *kref) | ||||
{ | { | ||||
struct c4iw_qp *qhp; | struct c4iw_qp *qhp; | ||||
qhp = container_of(kref, struct c4iw_qp, kref); | qhp = container_of(kref, struct c4iw_qp, kref); | ||||
▲ Show 20 Lines • Show All 1,077 Lines • ▼ Show 20 Lines | out: | ||||
* and we need to dereference the EP. | * and we need to dereference the EP. | ||||
*/ | */ | ||||
if (free) | if (free) | ||||
c4iw_put_ep(&ep->com); | c4iw_put_ep(&ep->com); | ||||
CTR2(KTR_IW_CXGBE, "%s exit state %d", __func__, qhp->attr.state); | CTR2(KTR_IW_CXGBE, "%s exit state %d", __func__, qhp->attr.state); | ||||
return ret; | return ret; | ||||
} | } | ||||
int c4iw_destroy_qp(struct ib_qp *ib_qp) | int c4iw_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata) | ||||
{ | { | ||||
struct c4iw_dev *rhp; | struct c4iw_dev *rhp; | ||||
struct c4iw_qp *qhp; | struct c4iw_qp *qhp; | ||||
struct c4iw_qp_attributes attrs; | struct c4iw_qp_attributes attrs; | ||||
CTR2(KTR_IW_CXGBE, "%s ib_qp %p", __func__, ib_qp); | CTR2(KTR_IW_CXGBE, "%s ib_qp %p", __func__, ib_qp); | ||||
qhp = to_c4iw_qp(ib_qp); | qhp = to_c4iw_qp(ib_qp); | ||||
rhp = qhp->rhp; | rhp = qhp->rhp; | ||||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | if (udata) { | ||||
rq_db_key_mm->key = uresp.rq_db_gts_key; | rq_db_key_mm->key = uresp.rq_db_gts_key; | ||||
rq_db_key_mm->addr = (u64)qhp->wq.rq.bar2_pa; | rq_db_key_mm->addr = (u64)qhp->wq.rq.bar2_pa; | ||||
rq_db_key_mm->len = PAGE_SIZE; | rq_db_key_mm->len = PAGE_SIZE; | ||||
CTR4(KTR_IW_CXGBE, "%s rq_db_key_mm %x, %x, %d", __func__, | CTR4(KTR_IW_CXGBE, "%s rq_db_key_mm %x, %x, %d", __func__, | ||||
rq_db_key_mm->key, rq_db_key_mm->addr, | rq_db_key_mm->key, rq_db_key_mm->addr, | ||||
rq_db_key_mm->len); | rq_db_key_mm->len); | ||||
insert_mmap(ucontext, rq_db_key_mm); | insert_mmap(ucontext, rq_db_key_mm); | ||||
c4iw_get_ucontext(ucontext); | |||||
qhp->ucontext = ucontext; | qhp->ucontext = ucontext; | ||||
} | } | ||||
qhp->ibqp.qp_num = qhp->wq.sq.qid; | qhp->ibqp.qp_num = qhp->wq.sq.qid; | ||||
init_timer(&(qhp->timer)); | init_timer(&(qhp->timer)); | ||||
CTR5(KTR_IW_CXGBE, "%s sq id %u size %u memsize %zu num_entries %u", | CTR5(KTR_IW_CXGBE, "%s sq id %u size %u memsize %zu num_entries %u", | ||||
__func__, qhp->wq.sq.qid, | __func__, qhp->wq.sq.qid, | ||||
qhp->wq.sq.size, qhp->wq.sq.memsize, attrs->cap.max_send_wr); | qhp->wq.sq.size, qhp->wq.sq.memsize, attrs->cap.max_send_wr); | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |