lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519844114.28560.216.camel@redhat.com>
Date:   Wed, 28 Feb 2018 13:55:14 -0500
From:   Doug Ledford <dledford@...hat.com>
To:     Max Gurtovoy <maxg@...lanox.com>,
        Bart Van Assche <bart.vanassche@....com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Sagi Grimberg <sagi@...mberg.me>
Cc:     Chuck Lever <chuck.lever@...cle.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "leonro@...lanox.com" <leonro@...lanox.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

On Wed, 2018-02-28 at 11:50 +0200, Max Gurtovoy wrote:
> 
> On 2/28/2018 2:21 AM, Bart Van Assche wrote:
> > On 02/27/18 14:15, Max Gurtovoy wrote:
> > > -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc 
> > > *poll_wc)
> > > +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc 
> > > *poll_wc,
> > > +                          int batch)
> > >   {
> > > -       int i, n, completed = 0;
> > > -       struct ib_wc *wcs = poll_wc ? : cq->wc;
> > > +       int i, n, ib_poll_batch, completed = 0;
> > > +       struct ib_wc *wcs;
> > > +
> > > +       if (poll_wc) {
> > > +               wcs = poll_wc;
> > > +               ib_poll_batch = batch;
> > > +       } else {
> > > +               wcs = cq->wc;
> > > +               ib_poll_batch = IB_POLL_BATCH;
> > > +       }
> > 
> > Since this code has to be touched I think that we can use this 
> > opportunity to get rid of the "poll_wc ? : cq->wc" conditional and 
> > instead use what the caller passes. That will require to update all 
> > __ib_process_cq(..., ..., NULL) calls. I also propose to let the caller 
> > pass ib_poll_batch instead of figuring it out in this function. 
> > Otherwise the approach of this patch looks fine to me.
> 
> Thanks Bart.
> I'll make these changes and submit.

That sounds reasonable to me too, thanks for reworking and resubmitting.

-- 
Doug Ledford <dledford@...hat.com>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ