All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Geetha sowjanya <gakula@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net,
	edumazet@google.com, sbhatta@marvell.com, hkelam@marvell.com,
	sgoutham@marvell.com
Subject: Re: [net PATCH] octeontx2-pf: Use GFP_ATOMIC in atomic context
Date: Sun, 8 Jan 2023 15:08:33 +0200	[thread overview]
Message-ID: <Y7rAUVXiRNFsuR8y@unreal> (raw)
In-Reply-To: <20230107044139.25787-1-gakula@marvell.com>

On Sat, Jan 07, 2023 at 10:11:39AM +0530, Geetha sowjanya wrote:
> Use GFP_ATOMIC flag instead of GFP_KERNEL while allocating memory
> in atomic context.

Awesome, but the changed functions don't run in atomic context.

> 
> Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free")
> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> index 88f8772a61cd..12e4365d53df 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> @@ -886,7 +886,7 @@ static int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura)
>  	}
>  
>  	sq->sqe_base = sq->sqe->base;
> -	sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_KERNEL);
> +	sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_ATOMIC);
>  	if (!sq->sg)
>  		return -ENOMEM;
>  
> @@ -1378,7 +1378,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf)
>  
>  		sq = &qset->sq[qidx];
>  		sq->sqb_count = 0;
> -		sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_KERNEL);
> +		sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_ATOMIC);
>  		if (!sq->sqb_ptrs) {
>  			err = -ENOMEM;
>  			goto err_mem;
> -- 
> 2.25.1
> 

  reply	other threads:[~2023-01-08 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07  4:41 [net PATCH] octeontx2-pf: Use GFP_ATOMIC in atomic context Geetha sowjanya
2023-01-08 13:08 ` Leon Romanovsky [this message]
     [not found]   ` <DM6PR18MB2602C7D1546455B12340D140CDFF9@DM6PR18MB2602.namprd18.prod.outlook.com>
2023-01-10  7:54     ` Geethasowjanya Akula
2023-01-10  8:35       ` Eric Dumazet
2023-01-10  8:55         ` [EXT] " Geethasowjanya Akula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7rAUVXiRNFsuR8y@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.