Re: [PATCH rdma-next 12/14] RDMA/restrack: Support all QP types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 26, 2020 at 11:03:18AM +0300, Gal Pressman wrote:
> On 24/08/2020 13:44, Leon Romanovsky wrote:
> >  /**
> > - * ib_create_qp - Creates a kernel QP associated with the specified protection
> > + * ib_create_named_qp - Creates a kernel QP associated with the specified protection
> >   *   domain.
> >   * @pd: The protection domain associated with the QP.
> >   * @qp_init_attr: A list of initial attributes required to create the
> > @@ -1204,8 +1204,9 @@ static struct ib_qp *create_xrc_qp_user(struct ib_qp *qp,
> >   *
> >   * NOTE: for user qp use ib_create_qp_user with valid udata!
> >   */
> > -struct ib_qp *ib_create_qp(struct ib_pd *pd,
> > -			   struct ib_qp_init_attr *qp_init_attr)
> > +struct ib_qp *ib_create_named_qp(struct ib_pd *pd,
> > +				 struct ib_qp_init_attr *qp_init_attr,
> > +				 const char *caller)
>
> This function can be static.
> Also, caller parameter missing from doc.

This function is referenced from ib_verbs.h. How can it be static?

>
> >  {
> >  	struct ib_device *device = pd ? pd->device : qp_init_attr->xrcd->device;
> >  	struct ib_qp *qp;
> > @@ -1230,7 +1231,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
> >  	if (qp_init_attr->cap.max_rdma_ctxs)
> >  		rdma_rw_init_qp(device, qp_init_attr);
> >
> > -	qp = _ib_create_qp(device, pd, qp_init_attr, NULL, NULL);
> > +	qp = _ib_create_qp(device, pd, qp_init_attr, NULL, NULL, caller);
> >  	if (IS_ERR(qp))
> >  		return qp;
> >
> > @@ -1299,7 +1300,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
> >  	return ERR_PTR(ret);
> >
> >  }
> > -EXPORT_SYMBOL(ib_create_qp);
> > +EXPORT_SYMBOL(ib_create_named_qp);
>
> Shouldn't ib_create_qp be exported instead?

Not, ib_create_qp is declared as inline function, so callers need to see
function referenced in that inline body. The ib_create_named_qp() should
be exported.

Thanks



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux