[ofa-general] [PATCH 13/16 v2] IB/ipoib: Add support for modify CQ
Ralph Campbell
ralph.campbell at qlogic.com
Mon Jan 28 11:14:41 PST 2008
Can you send out a specification for what ib_modify_cq()
is supposed to do? It isn't part of the IBTA verbs spec.
so I don't know how other HCAs are supposed to implement it.
On Thu, 2008-01-24 at 18:57 +0200, Eli Cohen wrote:
> Add support for modify CQ
>
> Add support for modifying CQ parameters for controlling
> event generation moderation.
>
> Signed-off-by: Eli Cohen <eli at mellnaox.co.il>
> ---
>
> changes:
> Fix spelling mistakes
> Fix function documentation
>
> drivers/infiniband/core/verbs.c | 7 +++++++
> include/rdma/ib_verbs.h | 11 +++++++++++
> 2 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index 86ed8af..84709ed 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -628,6 +628,13 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
> }
> EXPORT_SYMBOL(ib_create_cq);
>
> +int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period)
> +{
> + return cq->device->modify_cq ?
> + cq->device->modify_cq(cq, cq_count, cq_period) : -ENOSYS;
> +}
> +EXPORT_SYMBOL(ib_modify_cq);
> +
> int ib_destroy_cq(struct ib_cq *cq)
> {
> if (atomic_read(&cq->usecnt))
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 6ef1729..a8f94a9 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -984,6 +984,8 @@ struct ib_device {
> int comp_vector,
> struct ib_ucontext *context,
> struct ib_udata *udata);
> + int (*modify_cq)(struct ib_cq *cq, u16 cq_count,
> + u16 cq_period);
> int (*destroy_cq)(struct ib_cq *cq);
> int (*resize_cq)(struct ib_cq *cq, int cqe,
> struct ib_udata *udata);
> @@ -1389,6 +1391,15 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
> int ib_resize_cq(struct ib_cq *cq, int cqe);
>
> /**
> + * ib_modify_cq - Modifies moderation params of the CQ
> + * @cq: The CQ to modify.
> + * @cq_count: number of CQEs that will trigger an event
> + * @cq_period: max period of time in usec before triggering an event
> + *
> + */
> +int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
> +
> +/**
> * ib_destroy_cq - Destroys the specified CQ.
> * @cq: The CQ to destroy.
> */
More information about the general
mailing list