Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp374173rdb; Sat, 16 Dec 2023 11:47:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjGAM+3lw9/pXO0AkTGCcDpff/UiMQ2guZqu9fIyClQNLj7xfv4uqojDKOpPyTkUTzd+Av X-Received: by 2002:a05:600c:1f1a:b0:40c:16ee:3219 with SMTP id bd26-20020a05600c1f1a00b0040c16ee3219mr8456509wmb.165.1702756044316; Sat, 16 Dec 2023 11:47:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702756044; cv=none; d=google.com; s=arc-20160816; b=NZDOO328QQiItNzxNGwJh3Y9W8i/SKUIP4Ay1c4/mrepoYXE4cRqMK04zYq4HD5w5t 0fwfRCQCzmkgH22MWo6sLXUTCobq8v3MD+b2s8H0taAJd8ZIbEs5iXIQF4QzdN56ULhe oXFx/7ZUdYmHn1F2NS0QqMCXJ7ZbK7KCLAFAqSKhEO1/t7FZvJNyZhkNR2GtpMSbB2mC 8TKSSD8IaU0BchwNLSbCKbNYYap939/3CeUnOTq9CSNia5gW3EgTBzsl8h50laNdNEno 5N3zyBbgI+eLs9JS0a55vjE+lnsSaxG60GYYjUCmGoJE/gzTRhwIoBcfDKF+L9nQ0vDQ uGwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Xk2EOjATRTJxRrrcnsFLeLcL8neXxaj8OIxb84EMHzw=; fh=urREd8UnkxVP347FHDGN7fMYOctIWaE5jkjvWCxMjwo=; b=vf06EQlYmAjmPIrXe/M2tMHbaFEViOUBn50cSlIxHtwElhvrSqEeBqEh82Dqsgl+jJ AZOXCuLVZACNyvam0lLZ2ZPpJwECYHwMMV+aQprhafy46IDelzdU+l5s0ZKm0E1q8wjw 6/Zwnvj5KhLXunR1KEjioca6IFAm6kdgBOdQdSdfMfPTI88ZJiSsk3XcpHIRcEwBtRKg bnNeVsoKP7sOtixzNAeorXkkU3V+bjo+XTMcfT3TE0xv/7CN11jhZXcU2nbZj0AR74li E6rDOstZRgpi1JnVOySbCq7s4QPhUfek7grrUarlxYWulVMXceoP0qheHbDQ+XBRYIVS VSUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=OFfmWsIU; spf=pass (google.com: domain of linux-kernel+bounces-2349-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2349-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t13-20020a170906178d00b00a1e1846d09fsi8517578eje.176.2023.12.16.11.47.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 11:47:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2349-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=OFfmWsIU; spf=pass (google.com: domain of linux-kernel+bounces-2349-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2349-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D94BB1F240FA for ; Sat, 16 Dec 2023 19:47:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8DB7328CD; Sat, 16 Dec 2023 19:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="OFfmWsIU" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9D0D321AF for ; Sat, 16 Dec 2023 19:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f177.google.com with SMTP id e9e14a558f8ab-35f9f3e98f4so107315ab.1 for ; Sat, 16 Dec 2023 11:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702756028; x=1703360828; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xk2EOjATRTJxRrrcnsFLeLcL8neXxaj8OIxb84EMHzw=; b=OFfmWsIUMY2kYqh9vTdql015YTC3dnoxdnV97ZTUlcKD9Zbtj+Jm9vbyiEScZ6+Lv2 DoKjKibIHgHn62Vb1wLzwCQpRPeCwmz8ot3GWB7MmUVxGSSd+5aqMLVCkQ7u2H0cGCAa H7jCDp48lyfOMaSLlSGkEJZomFBB5mrkl9NnOqNXy+/FTEsksbHgOoMYq6nR9zPux31h 3HMsN/+IHqQOE7C3DDhQnBBEo/8CRndntfezBNwihqcPP2fE/MKJHY/sNaND09y0BTqN 3caIzYnEyMno1RfETMVWyi/kRRi8BeplFC6tB9eRfL2wMBly1BT3TnAS8lnIBm1lh7r5 ygFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702756028; x=1703360828; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xk2EOjATRTJxRrrcnsFLeLcL8neXxaj8OIxb84EMHzw=; b=D4SeVE/Br4wt2wABC4alGVl30Ca9+XsfaDHQaFLmKq2wWuZgmG/BnLi/X8FgVO55TM Kr07+PVTYfvvL6U23+m0yd9q4hVBv7b/GbMLfnX7ffXaDcEh5DLw331wiaO/PkX7SZUE WSxomkUnlQRYmbyfck+k30EhFSmd/nYENm8m9VCA0AiI4zzSgPIov/OfRaiRM/jSiIKq jRe2O8/6okencXJoy1lh6Jq41uMsqXaEythfgZyVevDURCzueyqdAiXFncHO6YAF05BR +DHgUiJiqeH0uHab1NzOhhluQwhr/NmDv3blgn3Tec/lT9ZRSvNof1ju0EAsikudHoBR /4dQ== X-Gm-Message-State: AOJu0Yy0g7TP6FToXUv6b6BLYITC2618yxuTqG44gY2bLZ0qzC6EZzvW 5P3Gv2Oo/m8SFvTuFoKRFsl8HwmDpMcUNcPg1ttuQz62grGQ X-Received: by 2002:a92:d7cc:0:b0:35f:716d:443c with SMTP id g12-20020a92d7cc000000b0035f716d443cmr207119ilq.16.1702756027759; Sat, 16 Dec 2023 11:47:07 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231214020530.2267499-1-almasrymina@google.com> <20231214020530.2267499-5-almasrymina@google.com> <20231215021114.ipvdx2bwtxckrfdg@google.com> <20231215190126.1040fa12@kernel.org> In-Reply-To: <20231215190126.1040fa12@kernel.org> From: Shakeel Butt Date: Sat, 16 Dec 2023 11:46:54 -0800 Message-ID: Subject: Re: [RFC PATCH net-next v1 4/4] net: page_pool: use netmem_t instead of struct page in API To: Jakub Kicinski 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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 7:01=E2=80=AFPM Jakub Kicinski wr= ote: > > 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 memor= y > > > 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. "Decouple" might not be the right word. What I wanted to say was to avoid too much specialization such that we have to have a new API for every new fancy thing. > > Perhaps we should aim to not export netmem_to_page(), > prevent modules from accessing it directly. +1.