Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp67219lqq; Wed, 12 Jun 2024 17:10:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVB/UyOVXSk42LjN8Qw35wqBdpy07dHkiG9eYbUQ77V8o2SufnMXwRvSIsj1IYYmXMgwQZ2XjsDq3MFB+FVUNF3t+0LHv2p0U6sT6ydxw== X-Google-Smtp-Source: AGHT+IG6mkvc1mHOuNc2qDTwK75v3tkmu1xG3Yg5PiTHtsXFI/xrnk8BTmWzEQoOgQ99W1O7lvJU X-Received: by 2002:a05:6808:1145:b0:3d2:2f52:c630 with SMTP id 5614622812f47-3d23e0a7848mr3829411b6e.11.1718237452788; Wed, 12 Jun 2024 17:10:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718237452; cv=pass; d=google.com; s=arc-20160816; b=tlspvq+5mNZi+irAxYvu5VVkPhQ5dvoNuV/JE/D3Q0tVHOna8KPjiPundSaAMJb1zm BdUp+wyqqvYe1fulre/oPG2DzRv4JWPLsfx161myXMgbw1RGLSQSP3X6Khq5+fdo0h3D knHOf4mv2CIiVrvAVihERd0IC8AbGtIkQQfJCLjnWTbD2eIlt7F/njS4gp7Jdiqf/TJf s0cWyh3VCq7XXjIDtJ4GJ2JdXpfv4zOLUNt+pb4N/VqfKboQqyRDCjWiEzIw4Y1BYM05 M7tlxe+4s2BINXGpLSiIE4zqPGV0AH7j0M8EqUCfIMLBKhVc8666QlyvzGrXX7Ef/u/x r6Dw== ARC-Message-Signature: i=2; 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=Nv2O89A+dr+tGgTPPHnZVbINBUgetoXh7+oMgvyIwkM=; fh=dG0t10Oc+dh7W/1rfHTIDmfDYUbzg8XtGVDq7Ur5ZTk=; b=verocK5LywfZRhfzGFEqVOd4Drl/NFd21Nn/WBL7UDnovKJ/sspiw51atSltpvmMLY aFI3iwgf5hDCV8c5+7mFbng5LzYsQjjuNU9QI9ZvQSD3U4hJpbl3SjIp6VQLFjZiXyFa az1m2rCnq31cATI8F1U7wWrZeVJr4UUAf/3Zsgr9GtsFyb8wYBBOWCAulS/ZXRZxuPvo RxPrCn3hcuLkW23lCKvZ2EG5zdlGVXsm+SnaS80ColK+Ab79OC/6phqvEbZUBJ4/oUWW bvoYMswzzi+HXxiny74g5KlkROAc235MirWCaPBNrQYV6x4Y5OB/YWtOBzNIZeLl1i/P fbcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="mz/ZQ4SN"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212398-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 6a1803df08f44-6b2a5b5fadesi2923916d6.450.2024.06.12.17.10.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 17:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212398-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="mz/ZQ4SN"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212398-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 7B3EC1C21A83 for ; Thu, 13 Jun 2024 00:10:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84A9F28FF; Thu, 13 Jun 2024 00:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mz/ZQ4SN" 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 6AA6137C; Thu, 13 Jun 2024 00:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718237432; cv=none; b=hrlwPFeAog/B8XYNVTRfZz4tNgZJlsJ75L0cRtlORlEDV5Rrno6WJ1MvVSE0UtCzWFrAWLqgsrTN6pSnrlmQ4TzKQqi77eqNQ5AF+u2Uvpp8IxPE3DJWepbaOy+Y4swkMSlse1LkWq9L9TOITwXuCOA/IhuuGSr+sW4TTB/4NKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718237432; c=relaxed/simple; bh=ALaMOklo/D6m9out9qebU875GAFWtP61hk1J63pvt/w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BGTfOfycW+8XJWjm6WtyCQMTCZ4ViI1AeILaW5e40PN+BZ96FqKqUpC9aw1KjwrJsix9l9B0XgI4Qwx4axQbraEL7z8ObmIH7N4tG9gJLSvHgYp8PzL+5tF4RnQausEAeq/Fbh/WsSKoqY/0+2bqzmwXp0V1tPYK4Hjk4G16fzo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mz/ZQ4SN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09BC8C116B1; Thu, 13 Jun 2024 00:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718237431; bh=ALaMOklo/D6m9out9qebU875GAFWtP61hk1J63pvt/w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mz/ZQ4SNRhD4Slftyf1RGHhLam/Qf7W3PwDTBqymj8MrjJ2zFfcEBpzzqoIp7aIRE +HNQhNVE1+IOeDAWgqZssDT0yMjs5KujxGNYD5/v0d4xLqGdW6Z4IfirrVTI0gfG77 pMXEtZ7kL2cG4kkEGdlkXN+sdZwbMnbryjY9PGB3jmEupZmxCvx/3ljnSDJVkMYjc3 aerFM5mLp0PJV3xP/U6IojVO32XHdmwSgJHAiTk7a4PvwYlAlAf0U2KtXvJacugqV3 /CEmWSpj8No1QubiV6AWTL6traVV8XO5JJaskmf2fawRbrkUX9ZG4c4dRG9FtdOikt K1w3nC+pECkGA== Date: Wed, 12 Jun 2024 17:10:29 -0700 From: Jakub Kicinski To: Mina Almasry Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Donald Hunter , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , "Christian =?UTF-8?B?S8O2bmln?=" , Bagas Sanjaya , Christoph Hellwig , Nikolay Aleksandrov , Pavel Begunkov , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , linux-mm@kvack.org, Matthew Wilcox Subject: Re: [PATCH net-next v11 05/13] page_pool: convert to use netmem Message-ID: <20240612171029.71adc273@kernel.org> In-Reply-To: <20240607005127.3078656-6-almasrymina@google.com> References: <20240607005127.3078656-1-almasrymina@google.com> <20240607005127.3078656-6-almasrymina@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, 7 Jun 2024 00:51:15 +0000 Mina Almasry wrote: > Abstrace the memory type from the page_pool so we can later add support > for new memory types. Convert the page_pool to use the new netmem type > abstraction, rather than use struct page directly. > > As of this patch the netmem type is a no-op abstraction: it's always a > struct page underneath. All the page pool internals are converted to > use struct netmem instead of struct page, and the page pool now exports > 2 APIs: > > 1. The existing struct page API. > 2. The new struct netmem API. > > Keeping the existing API is transitional; we do not want to refactor all > the current drivers using the page pool at once. > > The netmem abstraction is currently a no-op. The page_pool uses > page_to_netmem() to convert allocated pages to netmem, and uses > netmem_to_page() to convert the netmem back to pages to pass to mm APIs, > > Follow up patches to this series add non-paged netmem support to the > page_pool. This change is factored out on its own to limit the code > churn to this 1 patch, for ease of code review. Sorry for lack of meaningful review, busy times, in the meantime: drivers/net/ethernet/renesas/ravb_main.c:306:16: error: incompatible integer to pointer conversion assigning to 'struct page *' from 'netmem_ref' (aka 'unsigned long') [-Wint-conversion] 306 | rx_buff->page = page_pool_alloc(priv->rx_pool[q], &rx_buff->offset, | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 | &size, gfp_mask); | ~~~~~~~~~~~~~~~~ -- pw-bot: cr