Any comments on changing the signature of the struct ib_device
resize_cq method to take the new CQ size rather than a pointer to the
new CQ size?  The low-level driver would then be responsible for
updating the cq->cqe member itself (possibly with proper locking).
This would also make the prototype match the create_cq method and the
actual ib_resize_cq() function.

No device drivers implement this interface yet (except ehca, which had
a commented-out resize_cq method with a prototype that matches the new
changed signature, rather than the current signature).

 - R.


--- infiniband/include/rdma/ib_verbs.h  (revision 3979)
+++ infiniband/include/rdma/ib_verbs.h  (working copy)
@@ -881,7 +881,7 @@ struct ib_device {
                                                struct ib_ucontext *context,
                                                struct ib_udata *udata);
        int                        (*destroy_cq)(struct ib_cq *cq);
-       int                        (*resize_cq)(struct ib_cq *cq, int *cqe);
+       int                        (*resize_cq)(struct ib_cq *cq, int cqe);
        int                        (*poll_cq)(struct ib_cq *cq, int num_entries,
                                              struct ib_wc *wc);
        int                        (*peek_cq)(struct ib_cq *cq, int wc_cnt);
--- infiniband/core/verbs.c     (revision 3979)
+++ infiniband/core/verbs.c     (working copy)
@@ -329,11 +329,7 @@ int ib_resize_cq(struct ib_cq *cq,
        if (!cq->device->resize_cq)
                return -ENOSYS;
 
-       ret = cq->device->resize_cq(cq, &cqe);
-       if (!ret)
-               cq->cqe = cqe;
-
-       return ret;
+       return cq->device->resize_cq(cq, cqe);
 }
 EXPORT_SYMBOL(ib_resize_cq);
 
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to