Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1331352rwe; Fri, 14 Apr 2023 19:39:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bp9iA1zgXcWHvsAFFogXI/U46HAKdbK3SG6Ji25ylX3fHnVhiYOxrCQjuD0Q9QjNvsu0ui X-Received: by 2002:a05:6a20:3a86:b0:eb:c48b:dcd8 with SMTP id d6-20020a056a203a8600b000ebc48bdcd8mr7700440pzh.25.1681526351452; Fri, 14 Apr 2023 19:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681526351; cv=none; d=google.com; s=arc-20160816; b=Szy0SirPMUmzxDl7d1pnM4SHr/gy26bX3pFwwD7TGussB6Cy6fwGoArkH96aH2Vmf2 gVuqa7voP/TbUjxps8KifIozKiTWEMxsjwojBzHjZrwMa4t793cCZsmGKrc3E3QKB99B Rb9bLYxDmlmxVQcVg2MSAGkuqN5ztEYLdbuxnq4FUt221LnsA0v+j5H94t7goIvigpYi 3UhFRIqGSpGDXjWEjgIjtgWWK8sIyeFmLo89r90Rh49uaNkay+MhAinaZ91GbaPaQqDL Cty3Io5R4PZqTpS9b4zTNRi9rKa9Cdqej5AMgKjj5R9v0bQnxQti7GIuzhZnerEtchXq QsNQ== 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=7ggyTRiGjoO/RwimdiNzBcBQyRMoHVDdchIcllPbbq4=; b=zKajuK6itOj24bGZ+TD3lqpLPIuwdvwRP8nyeutiFdwgqhzMv7sQk1unpmQVi83dg/ JW6nPo/4zhzoOMhS0ol17LI52yeBTWvqz99qOEmMfV31CpHm6BpoH9R+At6jk/4EnPHt 3XW0mouJqn9VLhRw/TibpP1tHA/RfzLgA4rsgHduoh0S1wUA2kgJobFlQxyBzbVm0W71 UjF4odKu6rqKWKGvSYVY40hcEeGZPhEWl2XRRsyZDv+Vx6sTxfSPC5auQ42Mh+NS6tEu OQpMuHlJPUrKdAvaSRg5wfzo2DZmXqXZpsLAEn4DPwvC+KCD6JFH/nQxhMZ7I1prqW68 z0aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uaKoP85D; 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 y20-20020a63e254000000b0050b8a7635dfsi6206819pgj.295.2023.04.14.19.39.00; Fri, 14 Apr 2023 19:39:11 -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=uaKoP85D; 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 S229945AbjDOCGN (ORCPT + 99 others); Fri, 14 Apr 2023 22:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjDOCGM (ORCPT ); Fri, 14 Apr 2023 22:06:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3874C39; Fri, 14 Apr 2023 19:06:11 -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 BB32D61719; Sat, 15 Apr 2023 02:06:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 483C6C433EF; Sat, 15 Apr 2023 02:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681524370; bh=F+qtdLH0oZFhkge6AY0Ykqz4k4fj38qMbGDX2XmCiZM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uaKoP85D6NkHWUhxRs2zayNwV8H66vAumDv9vsno1kIOc83s7lNVbfb4XOetEPRKw XW8jA2yt+qte3GmQNnFUsFo3bCpwTEZ8T4p70JFgtA1wsLqIe7qmDr42XYrxfJybI7 FpWyqeES78iN7SypOX7BYickjse98mM+9aH5FX66UTz11bVYmHWXr3/NfYluB+ABCs GqOXALZdBLSqNeRp5vRpM3ODbnd6Lsy0mcZ0qHCGEgiqKjuks5tZgc2+nBcCs5nvyy PFcE8N7pR2c7PIoZXk2CS7EDSnlfACbOJ1U76jbZ+0sn0E+zjLHsM5co8kDokRzaOE DWSv5hrY306WQ== Date: Fri, 14 Apr 2023 19:06:08 -0700 From: Jakub Kicinski To: Haiyang Zhang Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, decui@microsoft.com, kys@microsoft.com, paulros@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com, davem@davemloft.net, wei.liu@kernel.org, edumazet@google.com, pabeni@redhat.com, leon@kernel.org, longli@microsoft.com, ssengar@linux.microsoft.com, linux-rdma@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, bpf@vger.kernel.org, ast@kernel.org, sharmaajay@microsoft.com, hawk@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3,net-next, 3/4] net: mana: Enable RX path to handle various MTU sizes Message-ID: <20230414190608.3c21f44f@kernel.org> In-Reply-To: <1681334163-31084-4-git-send-email-haiyangz@microsoft.com> References: <1681334163-31084-1-git-send-email-haiyangz@microsoft.com> <1681334163-31084-4-git-send-email-haiyangz@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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,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 Wed, 12 Apr 2023 14:16:02 -0700 Haiyang Zhang wrote: > + } else if (rxq->alloc_size > PAGE_SIZE) { > + if (is_napi) > + va = napi_alloc_frag(rxq->alloc_size); Allocating frag larger than a page is not safe. Frag allocator falls back to allocating single pages, doesn't it?