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]
Date:   Fri, 24 Jan 2020 16:51:18 +0530
From:   Sunil Kovvuri <sunil.kovvuri@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Linux Netdev List <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Michal Kubecek <mkubecek@...e.cz>,
        Sunil Goutham <sgoutham@...vell.com>,
        Geetha sowjanya <gakula@...vell.com>
Subject: Re: [PATCH v4 04/17] octeontx2-pf: Initialize and config queues

On Thu, Jan 23, 2020 at 7:50 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 23 Jan 2020 00:59:54 +0530, Sunil Kovvuri wrote:
> > On Tue, Jan 21, 2020 at 9:31 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > > On Tue, 21 Jan 2020 18:51:38 +0530, sunil.kovvuri@...il.com wrote:
> > > > +dma_addr_t otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
> > > > +                        gfp_t gfp)
> > > > +{
> > > > +     dma_addr_t iova;
> > > > +
> > > > +     /* Check if request can be accommodated in previous allocated page */
> > > > +     if (pool->page &&
> > > > +         ((pool->page_offset + pool->rbsize) <= PAGE_SIZE)) {
>
> You use straight PAGE_SIZE here
>
> > > > +             pool->pageref++;
> > > > +             goto ret;
> > > > +     }
> > > > +
> > > > +     otx2_get_page(pool);
> > > > +
> > > > +     /* Allocate a new page */
> > > > +     pool->page = alloc_pages(gfp | __GFP_COMP | __GFP_NOWARN,
> > > > +                              pool->rbpage_order);
>
> but allocate with order
>

For 4K pages and with MTU > 4K, we cannot allocate morethan 1buffer
from a compound page.
For 64K pages the order will never go beyond '0'.
So comparing with PAGE_SIZE or with (PAGE_SIZE * (pool->rbpage_order +
1)) will not make a difference.

But anyway i will change this to make things clear.
Thanks for pointing.

Sunil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ