Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1445700iof; Tue, 7 Jun 2022 05:54:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbMoBjb88XpXM2GLYrGqpFjCxT7Ap7xV8jFYI7GvdcmI0iOslu99Fpchzgvcw2EjlbNnoW X-Received: by 2002:a17:90b:388f:b0:1e8:5a44:8205 with SMTP id mu15-20020a17090b388f00b001e85a448205mr18608138pjb.221.1654606472893; Tue, 07 Jun 2022 05:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654606472; cv=none; d=google.com; s=arc-20160816; b=IydAOixSz3HXQClM41nkXZZDsqQkZc70gpGajYFTDoJElL++CKoFzvr0XDs7/oNFMJ pU5/SbJSmhNgkFqiZ0+GjeWxqSmRkc75TlDXBjBBGYX4GzWTVq6eFChHw2BKQ4QiZoof rQ7fVgME3uvC209slNjX/FJBnyp6GqNHu2NJ1mRXsvKdcRg9jMLa7+onjnIxDAHpwpFm 6V+njF5Cku4Xjyt25TLeRE2YserB1QaB9vih8NjOAOFjq7lGKWecuLgw33D0Y57DthB2 k9/4UyMUtStW6OH4chUe8J74nLmd0maBFffi3kBF2i5w/bvLuMwGE84t3Xe5IZv0601m arrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zPMo1PT3GHwcsdXXYn+JVAivFqfsouy9up6nRsP9Ec4=; b=KTtt9Zph1lBnxfc6QvreSzJtzF0thydYjyaHPQq3EBCkj1GauZ0l98Vt5hnJ3jrc9m 9OWi6a+XDb/ywuVamFhLfDP59N6eNSWimrhrc/ujTGBWSmbkGfxeT0co1SC94s5i++5x DGQ7lkWO1QhkGjEdOpXq7Zv8aOP386jcTHEP0TY7612v/ra4uGOunAGk2W6xI1DYAuik K4yrfpBjULHnMWbABXq7rzaeWMAfHqTRhJandGb9LqdGGmvP1rzDKFXE4flBzuwuNtO6 B/UW8ZwdnYqZ9uWnjCsrXSMlT2UK2cv8S43dBTJ1Kdg8qS6/GFTvXHdslnw0ztd9b8ah XlTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RC8u6hgZ; 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 k18-20020a63d852000000b003f9dd67d2b7si24784512pgj.34.2022.06.07.05.54.19; Tue, 07 Jun 2022 05:54:32 -0700 (PDT) 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=RC8u6hgZ; 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 S234997AbiFFVeu (ORCPT + 99 others); Mon, 6 Jun 2022 17:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234873AbiFFVes (ORCPT ); Mon, 6 Jun 2022 17:34:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D6C3A5EA; Mon, 6 Jun 2022 14:34:43 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6875D61578; Mon, 6 Jun 2022 21:34:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5056FC385A9; Mon, 6 Jun 2022 21:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654551282; bh=6JG6+yF2lDW6S0rq7jlRN1qWjalNKDxNI2CfJMOqPQg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RC8u6hgZ5f6YAmIaYM7jKvP4DiP2SdddwFAbl0XBw2wUxmqLhMqsGSGVWGrt/t360 pPLH9+AowGysob5cAoW/+jQTv8H1J9kbRn+P4+jyUb7C0RnfL7sQYezoQIVfb0/LYn S6hvhJDejJ1eb1uXDQoV36ZTfXtA2klfdCIUmOkA5ahzZfXbWIhF9yTxgcVA5Nq9lX mAw5XlFPxfAymxDj1DJLbO3mch6hOhN54zg5CmkMm/jQKf6MRw73vnJZpecMwAS6UY RVDROK1XFI9DADHmo3HtxxDFvCBsKCNAXYczbm3mN8V9ZQaySK0Nq05vmV28coE89O u3/2CDUYA5f+Q== Date: Mon, 6 Jun 2022 14:34:37 -0700 From: Jakub Kicinski To: Chen Lin Cc: nbd@nbd.name, alexander.duyck@gmail.com, john@phrozen.org, sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, matthias.bgg@gmail.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag Message-ID: <20220606143437.25397f08@kernel.org> In-Reply-To: <1654398757-2937-1-git-send-email-chen45464546@163.com> References: <1654398757-2937-1-git-send-email-chen45464546@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 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,T_SCC_BODY_TEXT_LINE 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 Sun, 5 Jun 2022 11:12:37 +0800 Chen Lin wrote: > + new_data = (void *)__get_free_pages(GFP_ATOMIC | > + __GFP_COMP | __GFP_NOWARN, > + get_order(mtk_max_frag_size(MTK_MAX_LRO_RX_LENGTH))); Please make this a helper which takes the gfp flags.