[openib-general] [PATCH] mthca: query_qp and query_srq
Roland Dreier
rdreier at cisco.com
Mon Feb 13 14:59:59 PST 2006
> --- openib_gen2.orig/drivers/infiniband/core/verbs.c
> +++ openib_gen2/drivers/infiniband/core/verbs.c
> @@ -257,9 +257,18 @@ int ib_query_qp(struct ib_qp *qp,
> int qp_attr_mask,
> struct ib_qp_init_attr *qp_init_attr)
> {
> - return qp->device->query_qp ?
> + int err;
> +
> + err = qp->device->query_qp ?
> qp->device->query_qp(qp, qp_attr, qp_attr_mask, qp_init_attr) :
> -ENOSYS;
> + if (err)
> + return err;
> + qp_init_attr->recv_cq = qp->recv_cq;
> + qp_init_attr->send_cq = qp->send_cq;
> + qp_init_attr->srq = qp->srq;
> +
> + return err;
> }
> EXPORT_SYMBOL(ib_query_qp);
Actually this chunk is pretty silly -- anyone querying the QP could
just look into the qp struct and get the information directly. So I'm
going to drop this chunk unless there's something I'm missing.
- R.
More information about the general
mailing list