[PATCH RFC v2 2/3] rdma_cm: add rdma_consumer_reject() helper function
Steve Wise
swise at opengridcomputing.com
Sat Oct 22 08:57:28 PDT 2016
> > --- a/drivers/infiniband/core/cma.c
> > +++ b/drivers/infiniband/core/cma.c
> > @@ -114,6 +114,19 @@ const char *__attribute_const__
> rdma_reject_msg(struct rdma_cm_id *id,
> > }
> > EXPORT_SYMBOL(rdma_reject_msg);
> >
> > +bool rdma_consumer_reject(struct rdma_cm_id *id, int reason)
> > +{
> > + if (rdma_ib_or_roce(id->device, id->port_num))
> > + return ib_consumer_reject(reason);
> > +
> > + if (rdma_protocol_iwarp(id->device, id->port_num))
> > + return iw_consumer_reject(reason);
> > +
> > + /* FIXME should we WARN_ONCE() here? */
> > + return false;
>
> Yes. Also I'd just inline the ib_consumer_reject and iw_consumer_reject
> helpers here.
>
Why is that preferred vs the static inline functions in ib_cm.h and iw_cm.h?
More information about the Linux-nvme
mailing list