[openib-general] Update from merging in Roland's changes...

Hal Rosenstock halr at voltaire.com
Fri Jul 30 16:43:26 PDT 2004


Sean Hefty wrote:
> I've updated ib_verbs based on changes that Roland had in his copy of
> the file.  Specifically, I've updated the ib_xxx structures to
> include pointers to referenced items, added a usecnt field, and
> converted the functions from prototypes into static inline routines.
> The patch for this update is listed below.

Can you pick up the ib_device struct too (so device->xxxx can be
dereferenced) ?

Also, a few typos (aka nits) :-)
> +static inline struct ib_srq *ib_create_srq(struct ib_pd *pd,
> +    void *srq_context;

s.b.
void *srq_context,

> +    struct ib_srq_attr *srq_attr)
> +/**
> + * ib_poll_cq - poll a CQ for completion(s)
> + * @cq:the CQ being polled
> + * @num_entries:maximum number of completions to return
> + * @wc:array of at least @num_entries &struct ib_wc where completions
> + *   will be returned
> + *
> + * Poll a CQ for (possibly multiple) completions.  If the return
> value + * is < 0, an error occurred.  If the return value is >= 0, it
> is the + * number of completions returned.  If the return value is
> + * non-negative and < num_entries, then the CQ was emptied.
> + */
> +static inline int ib_poll_cq(struct ib_cq *cq,
> +      int num_entries,
> +      struct ib_wc *wc_array)
> +{
> + return cq->device->poll_cq(cq, num_entries, wc);

s.b.
return cq->device->poll_cq(cq, num_entries, wc_array);

> +}




More information about the general mailing list