Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4339531rwe; Mon, 17 Apr 2023 11:05:17 -0700 (PDT) X-Google-Smtp-Source: AKy350b4VMWylc+fc6oj7XcIPIyPGPHhfITYaQNBVWH+h6FzTZG5EQyYOub9GM774T17PH0q1csn X-Received: by 2002:a17:903:32c6:b0:1a6:48e6:ea8e with SMTP id i6-20020a17090332c600b001a648e6ea8emr15669695plr.4.1681754716855; Mon, 17 Apr 2023 11:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681754716; cv=none; d=google.com; s=arc-20160816; b=kwYlWVwrUJB8WiIbcnaG3TjA+SnFvDu7nI49AjaKrUoin6UETGh0D70v7cViedHz35 9DRN4xYsQvhtjgdbyarnbmlARRtXhV72cHJ7CZUAI5uCPWBnWtbmwP6ewgsOuo+Vic7f Uq2Jr5EvupSg9dDc7h/XFs/Icqwd5b0HJDTdorKE0OP9KNv6tT7CncePykCgPpPtHS0L OiST7vuhkkTyTNoKSoAwNbwbSgYS+q7A/ySF0pVosT9S8BqlxQeaw8NlZ/2cSU04WOJh PWNqSrioeNDmRaLRXHkHi5/cDlsgQxGrG5j+cDDfdMtT8whi0bKvH0QWBULmlKDAM88a iH7A== 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=YS4HVGj6pK8yxLZy1gTzhqyoLdh5GZkubtEH1hIiphQ=; b=hB6y9xNYWT+iXxvOU1DnjXRihrbEbSMESsf2jW/JhXJgrCCNSZWjNdyGEPBaitmON5 xOKTajcYQ2g/kTIV9ao0SdUD8KRNw8TaJFN+3XOUqjJBqsT+gXKQsXsTdtuKszaVntUJ dhwAIFf97dZRdrnC2cBVSHifWTFTT0VJZuDgmj1p/pW6RKDkrpybllLaoYiylJ3ub5Zk yTsjWtDGrCE9QJZqMS4wi9NubURUJL5yc8zq8qsc7FKCM37Hvwl4ObDkOpzxLfREQS71 CwU5/j49IbJWYLiiQZF9LaJF9RowmgdKS4bcsr2mpV4c9xBBBTnuRsD7IzTwQASZX7RX AFqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GyKhjju3; 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 iw9-20020a170903044900b001a6cb6667f9si4324306plb.21.2023.04.17.11.05.05; Mon, 17 Apr 2023 11:05:16 -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=GyKhjju3; 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 S230428AbjDQRwe (ORCPT + 99 others); Mon, 17 Apr 2023 13:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjDQRwd (ORCPT ); Mon, 17 Apr 2023 13:52:33 -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 4CAE540FC; Mon, 17 Apr 2023 10:52:32 -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 D6871628D8; Mon, 17 Apr 2023 17:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 590E0C433EF; Mon, 17 Apr 2023 17:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681753951; bh=KUWjXDPTi3zx4/aPtq9cu6CjLL1a2cS0RTwS+jLqeXA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GyKhjju38oDxcu+ziCWD7KV7feK0ctul+XMO8fJzxDUPamU6KI/8qqWMTfJSKwthb hr9iLhJjTljD4TtxRqdFcdx324GVZhFTMB7TaqJZw9337rFvLuH7vrYSw57/5n+Dak mzKJMgLShjqSOLVv8A3Q6nkAdR2wwrtLyDXxR0p3Q/OATOQFyFV4Hish0JvuG5xo4d KZed9yxKQqRJULKioPAfD33fkRaFbWcz3WM2gaG2q78xCvyMwQYIxbAgjOB+54UnQT g+qXhT5jMrCB1PCnB+KYjEpEbjWUmdIY68h8XhNjyuIhNnlnZircAw0TBbF2cngkt9 p5BKB06tH6vIw== Date: Mon, 17 Apr 2023 10:52:29 -0700 From: Jakub Kicinski To: Haiyang Zhang Cc: "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , Dexuan Cui , KY Srinivasan , Paul Rosswurm , "olaf@aepfle.de" , "vkuznets@redhat.com" , "davem@davemloft.net" , "wei.liu@kernel.org" , "edumazet@google.com" , "pabeni@redhat.com" , "leon@kernel.org" , Long Li , "ssengar@linux.microsoft.com" , "linux-rdma@vger.kernel.org" , "daniel@iogearbox.net" , "john.fastabend@gmail.com" , "bpf@vger.kernel.org" , "ast@kernel.org" , Ajay Sharma , "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: <20230417105229.7d1eb988@kernel.org> In-Reply-To: References: <1681334163-31084-1-git-send-email-haiyangz@microsoft.com> <1681334163-31084-4-git-send-email-haiyangz@microsoft.com> <20230414190608.3c21f44f@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Sat, 15 Apr 2023 14:25:29 +0000 Haiyang Zhang wrote: > > Allocating frag larger than a page is not safe. =20 >=20 > I saw other drivers doing this - use napi_alloc_frag for size bigger tha= n a page. > And it returns compound page. Why it's not safe? Should we use other allo= cator > when need compound pages? I believe so. There was a thread about this within the last year. Someone was trying to fix the page frag allocator to not fall back to order 0 pages in case of failure if requested size is > PAGE_SIZE. But there was push back and folks were saying that it's simply not=20 a case supported by the frag allocator. =F0=9F=A4=B7=EF=B8=8F > > Frag allocator falls back to allocating single pages, doesn't it? =20 >=20 > Actually I checked it. Compound page is still returned for size smaller t= han PAGE_SIZE, > so I used single page allocation for that. https://elixir.bootlin.com/linux/v6.3-rc6/source/mm/page_alloc.c#L5723 Jumbo frames should really be supported as scatter transfers,=20 if possible.