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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv2ivFBfYA0K-ghN3oy-OAXo-zQfyzHXHpm9eTpiPuw5pw@mail.gmail.com>
Date:   Tue, 3 Jan 2023 14:30:52 +0530
From:   Pavan Chebbi <pavan.chebbi@...adcom.com>
To:     Geetha sowjanya <gakula@...vell.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kuba@...nel.org, pabeni@...hat.com, davem@...emloft.net,
        edumazet@...gle.com, sbhatta@...vell.com, hkelam@...vell.com,
        sgoutham@...vell.com
Subject: Re: [PATCH net] octeontx2-af: Fix QMEM struct memory allocation

On Tue, Jan 3, 2023 at 9:39 AM Geetha sowjanya <gakula@...vell.com> wrote:
>
> Currently NIX, NPA queue context memory is being allocated using
> GFP_KERNEL flag which inturns allocates from memory reserved for
> CMA_DMA. Sizing CMA_DMA memory is getting difficult due to this
> dependency, the more number of interfaces enabled the more the
> CMA_DMA memory requirement.
>
> To address this issue, GFP_KERNEL flag is replaced with GFP_ATOMIC,
> with this memory will be allocated from unreserved memory.
>
> Fixes: 7a37245ef23f ("octeontx2-af: NPA block admin queue init")
> Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> Signed-off-by: Geetha sowjanya <gakula@...vell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/common.h b/drivers/net/ethernet/marvell/octeontx2/af/common.h
> index 8931864ee110..4b4be9ca4d2f 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/common.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/common.h
> @@ -61,7 +61,7 @@ static inline int qmem_alloc(struct device *dev, struct qmem **q,
>         qmem->entry_sz = entry_sz;
>         qmem->alloc_sz = (qsize * entry_sz) + OTX2_ALIGN;
>         qmem->base = dma_alloc_attrs(dev, qmem->alloc_sz, &qmem->iova,
> -                                    GFP_KERNEL, DMA_ATTR_FORCE_CONTIGUOUS);
> +                                    GFP_ATOMIC, DMA_ATTR_FORCE_CONTIGUOUS);

I am not understanding the problem this change is solving. Can you
describe the issue in some detail?
What do you mean when you say GFP_ATOMIC allocates the memory from
unreserved memory?

>         if (!qmem->base)
>                 return -ENOMEM;
>
> --
> 2.25.1
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ