Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4907618rwl; Sun, 8 Jan 2023 05:26:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXvU2Sqh53x1reKgyvO1gUrQlLSZSlj5D41CD5ZVNKE4HsQWA7MZGPPRvcghKIEK2BZ2aMy1 X-Received: by 2002:aa7:c153:0:b0:48e:a97f:a595 with SMTP id r19-20020aa7c153000000b0048ea97fa595mr15877944edp.35.1673184402994; Sun, 08 Jan 2023 05:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673184402; cv=none; d=google.com; s=arc-20160816; b=h89G7ksPuR7gp+QzTPEYNOCAk4ckkz4UCO9CUmnpuS2a8tno4m34tr2AW9ZqLHphf+ 4vs/HiBGkvww3ilhIzUfCBLcI9SLK+khM2xFIMj6aT5UsaJp+zJPCQ3CvMYKUNtZdMQT Lz9J+jW718pV0mQ9zBTO4qcNsSf1EPjDdY20kyY9yp/PCK3bfvWY0YmNEnf5SNqhB92x jfsFCMZD6fs1zr5Xe3i8vbbkCs8ycnNcbaE6aSdwbzv3JONOo1ywFMnKnJ4PofoM2W4k RZkqstXviNTP6UUem69cE+wJMQP2vgVaVDe+RCYYPDp3h39GM636LfJNER6ooR/UBLi8 oS4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SvX6ImbijrObm94OFYhU/rmpcSxXCqv9/bC/oYR8IBQ=; b=sstddNincwT+DopDSaSRl2qGv5jZN+rEn+s8Cc2IMomkHExScyA2i1oSxEgCL+hbbq y2Hi5yPHvv3z74/Mxq/PSYdbD5r1JevbEqkz9Jz5tSxv1ut4lZcAxyfqI0s/YSc4fF8q aNAbpdw9tQ9m2H3UJlPEv3JkzBk6Q5s3Dj95WggYAtRSrTIwNSYrf5VlyjLtPokIR/ZW WNhQssNSs8efj8dtF7EDMUO+KJ9Tb0Q37o3ctsxkeQWpQd/tChpF6EBUgluJNRYKOAms s10jzG39mqH4y/J+6duHK3aBpzGadLsuHzXJoDERSuRgNwHe16AZJ+mIM/CIYoXW6JKH YTkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPBPKDWu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a056402348800b004627d582888si7588377edc.24.2023.01.08.05.26.30; Sun, 08 Jan 2023 05:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPBPKDWu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbjAHNIn (ORCPT + 55 others); Sun, 8 Jan 2023 08:08:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbjAHNIl (ORCPT ); Sun, 8 Jan 2023 08:08:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EEC9E0B8; Sun, 8 Jan 2023 05:08:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ADC0DB80064; Sun, 8 Jan 2023 13:08:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC26BC433D2; Sun, 8 Jan 2023 13:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673183318; bh=2T8+E8cXKaNmV5uXEdKEyGuifcQK6vJrE4POSTr+RVY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BPBPKDWuLZ7pXxzmB/v6ZTfdip4gebFLSjXDb4PZFdszB+Vk9xdS68RJ8MO2eXHGM wSt45wihli20F2MQFsyUPLo2ttuJQo/+ToXq/fuOC8EX6opGuzKfLH3ULi/vDA69tb l+bmvuZTT09uWCY2UNbyQxuVJ/IlX5ph7d2dnXesxDp51PHbe/Nk4Sdd2l6E3sNCiS n154axi9TVxk7j/LLBxmu+LmGSWgjKi9e7AzMgDeJGpQqlEjqXwInB23mwVEz/P7Z6 DnXt5J9Whh7nJwiEcSLz26ZJL3hArCIpAf5zD7QG1W8OCW0Yva6roMhexwNGFg2hQ6 uTpPdWbQuYd5w== Date: Sun, 8 Jan 2023 15:08:33 +0200 From: Leon Romanovsky To: Geetha sowjanya 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 Message-ID: References: <20230107044139.25787-1-gakula@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230107044139.25787-1-gakula@marvell.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Geetha sowjanya > --- > 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 >