Re: [PATCH V3 2/4] RDMA/core: Introduce shared CQ pool API

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

 



On Wed, May 20, 2020 at 12:23:01PM +0300, Yamin Friedman wrote:
>
> On 5/20/2020 9:19 AM, Devesh Sharma wrote:
> >
> > > +
> > > +static int ib_alloc_cqs(struct ib_device *dev, int nr_cqes,
> > > +                       enum ib_poll_context poll_ctx)
> > > +{
> > > +       LIST_HEAD(tmp_list);
> > > +       struct ib_cq *cq;
> > > +       unsigned long flags;
> > > +       int nr_cqs, ret, i;
> > > +
> > > +       /*
> > > +        * Allocated at least as many CQEs as requested, and otherwise
> > > +        * a reasonable batch size so that we can share CQs between
> > > +        * multiple users instead of allocating a larger number of CQs.
> > > +        */
> > > +       nr_cqes = min(dev->attrs.max_cqe, max(nr_cqes, IB_MAX_SHARED_CQ_SZ));
> > > +       nr_cqs = min_t(int, dev->num_comp_vectors, num_online_cpus());
> > No WARN() or return with failure as pointed by Leon and me. Has
> > anything else changes elsewhere?
>
> Hey Devesh,
>
> I am not sure what you are referring to, could you please clarify?

He is saying that dev->num_comp_vectors can be 0.

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