From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED0F71869; Sat, 16 Dec 2023 03:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kSJWuzXf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB8FFC433C7; Sat, 16 Dec 2023 03:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702695691; bh=/P/ZhrLqJHACtkn9yyEkbbr1lTbkhgNG4DxVbVllBpc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kSJWuzXf5JsHFjt6K7rC+2VlvyaR6vrFZPqXGVBXJ22KO4Xlf0lCZ6503KvqaGDL9 IS4QM56v9pkuRl1X3HiEY24kAYSv4YOAY0AZ/6yZjXOI4Qubv7whLLJ6VlTUKGRtoT L1k7/gFq6GVPcg4ZfH/lgDpPFnzba89eyccX0FQbsbQFs3gfLhwEzKHSjRVwwazTVM npO5CMl1qlngApV+pK6Cki843NGMwIUeJYmBnzSLUYFdflZM16+e9IHhFZW2xB0jMs c7+bzsTrOS7SIewdnVCHELoCnspZ01H+edRsLNE8MGbibM1YZ+LoHXvhgn+1yeXICt ny2/w064p7T4A== Date: Fri, 15 Dec 2023 19:01:26 -0800 From: Jakub Kicinski To: Shakeel Butt Cc: Mina Almasry , Yunsheng Lin , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sumit Semwal , "Christian =?UTF-8?B?S8O2bmln?=" , Michael Chan , "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Thomas Petazzoni , Marcin Wojtas , Russell King , Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Saeed Mahameed , Leon Romanovsky , Horatiu Vultur , UNGLinuxDriver@microchip.com, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Jassi Brar , Ilias Apalodimas , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Siddharth Vadapalli , Ravi Gunasekaran , Roger Quadros , Jiawen Wu , Mengyuan Lou , Ronak Doshi , VMware PV-Drivers Reviewers , Ryder Lee , Shayne Chen , Kalle Valo , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Stefan Hajnoczi , Stefano Garzarella , Shuah Khan , " =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?=" , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jason Gunthorpe , Willem de Bruijn Subject: Re: [RFC PATCH net-next v1 4/4] net: page_pool: use netmem_t instead of struct page in API Message-ID: <20231215190126.1040fa12@kernel.org> In-Reply-To: <20231215021114.ipvdx2bwtxckrfdg@google.com> References: <20231214020530.2267499-1-almasrymina@google.com> <20231214020530.2267499-5-almasrymina@google.com> <20231215021114.ipvdx2bwtxckrfdg@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 15 Dec 2023 02:11:14 +0000 Shakeel Butt wrote: > > From my POV it has to be the first one. We want to abstract the memory > > type from the drivers as much as possible, not introduce N new memory > > types and ask the driver to implement new code for each of them > > separately. > > Agree with Mina's point. Let's aim to decouple memory types from > drivers. What does "decouple" mean? Drivers should never convert netmem to pages. Either a path in the driver can deal with netmem, i.e. never touch the payload, or it needs pages. Perhaps we should aim to not export netmem_to_page(), prevent modules from accessing it directly.