Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7095724rdb; Fri, 15 Dec 2023 19:01:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFg8tfeVN+xWpFz8yKbIGHT3orRBTP54kvwX17Fjq9/slLpEmRcVI0hcwWVqHQp/3DOMRtt X-Received: by 2002:a05:622a:1903:b0:425:4043:8d51 with SMTP id w3-20020a05622a190300b0042540438d51mr13547939qtc.108.1702695705013; Fri, 15 Dec 2023 19:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695705; cv=none; d=google.com; s=arc-20160816; b=F+oE48e5C44zGkiIDpQPDuLgVQhAgG/7iCuK4ggwSjkGHJ8KREftSnXFWJwxQA/LeG wxtYjjc06QGIC/iSWglK4KNCeVDbr3BlAp4Or1jbRujdy9bxnt2jx8ZxC29T8mU46hVv yyUi2MOz+bGIgKFeEv2bvz6HusuinOHfW4FP+mtLBQtAENimLGyF/0JogiIQ3BJY8Wc4 6IqWQ4Q3T2jz5gH+PftD3c6VQrONXNeavnFFecc9z6ABu5TX5eFWRkw5gXYGQ2y095CB EyBCRgMey+SdlHJWIhSKT/x47Ic1CSiknX0pYpLdzj6SO6OWzy8QGx5Llkez9OqzrDN8 dJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=TnLkKbNzRea/zzM3qJ9XiGxurCWw9DfDW06STCdAJ6c=; fh=qC7pObrQ96E0fEIv5qsfDsZ2RTT8zcg+O4HE2D03dMA=; b=t059uSMowv2P56VfaE9m9f/mdk2amdXg3vFaKajsyNK9vNI55J8vNboz9o77M2izvJ kWQZMFyYCQkv01+4cyRXyU+nUrF0xNCh7p1qFDFN3Iy0wr8+OLYHAsV093zBmVIb/vtJ jwAWRaK7vkpd88jT24Wnw7iMQX1+fCWThj9Fgoufw8BrmBLjq7ITae0m2fVq2fjbS+fw HVoyUlY7TCtLUQ6ozOyREBz2e8TyhR7g4PEAtNuzy/loSYeP5Zdus2RbM3MUVKon3PN5 K/EttOcZ3/Hhn3JJhW2sunhJBPghVwSvmaEXVVNjaR/TfWW2t+5SUlz2M5zBJQWWbJSa Z1GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kSJWuzXf; spf=pass (google.com: domain of linux-kernel+bounces-1976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r12-20020ac8424c000000b0042576a11651si18006141qtm.32.2023.12.15.19.01.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kSJWuzXf; spf=pass (google.com: domain of linux-kernel+bounces-1976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B91791C24092 for ; Sat, 16 Dec 2023 03:01:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAA673FFB; Sat, 16 Dec 2023 03:01:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kSJWuzXf" X-Original-To: linux-kernel@vger.kernel.org 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) 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: linux-kernel@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.