From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41B46C3DA4D for ; Thu, 11 Jul 2024 21:41:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C873C6B00A3; Thu, 11 Jul 2024 17:41:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C37276B00A4; Thu, 11 Jul 2024 17:41:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD75D6B00A8; Thu, 11 Jul 2024 17:41:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8E4E76B00A3 for ; Thu, 11 Jul 2024 17:41:13 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4DA5B160817 for ; Thu, 11 Jul 2024 21:41:13 +0000 (UTC) X-FDA: 82328792826.11.9792D96 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 959EE8000B for ; Thu, 11 Jul 2024 21:41:11 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Zp1w1M0V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of kuba@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kuba@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720734034; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CtUi3CKXKJaIUamnhmNE8WvT+2Lvc3Rv0umbblOCpQM=; b=IY4Do3Jf8rFjkMUKWvwW5NHuxAXXxpEKeM+UecY+oNsu3EvjOK07hyy+LLcdFzA+TAFl7b eGkT2Olu9+BRMZQ8HjsSMF7qESPE0i1at2d4YbCpa3RXLh0wIPS9G+blOuSl2PQLJz2ZmZ 19zzQejxb892SI8436bXoQxPxeXIFcw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720734034; a=rsa-sha256; cv=none; b=MP8CVYv3J2mN/qnGLg5BtvmPw/Cb/LbIHdgLVaB86O8dSKMN8R2J6NRAXeyC8xMhPLLTx8 AllAEU7VMnwhjIp0/Jazt2d2ajCdqRE0cFewyOnPYNbRXQdXXSpXTO9M+yTpuYEjCaTlqG wc2jcwGeYjJYslm0ncOlWywxHiBkwa4= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Zp1w1M0V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of kuba@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kuba@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7861461E15; Thu, 11 Jul 2024 21:41:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45582C116B1; Thu, 11 Jul 2024 21:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720734070; bh=g1fNHOiGZm5mn96BaOhihxmzcRcyf74Q/bsZs8K17xc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Zp1w1M0VOLmBNoOKjAT5CTE8BYrya+H1UwJrflrWESuo7uZue7iRKRZ4zpVGBcO2r JfHDmhOh1K91cHcdNCjHshXjwawtPn6kxyHX3Y6rlLk3zHEnjhuBZX277+OqLX05+W +wUPVw/el9mcJ7uNpa3f0WEVqpMx9whj46qVyNBYA1YxFt6Gc+Aap+0IpsZsYS6b6x 99LfRRVFyVT/9XwfcLz99b+8pOGsjni6NXPXPe6e3QNwec5LKy0mZnyaCTJLepsVDG wYu/+B5BdVB3cVS+n3GFpmp+4R/sbXU58e8C1Y6LSMHLZtG/aJJGaGXSa+fE4rRz4E M3SWkeRQ1GlnA== Date: Thu, 11 Jul 2024 14:41:07 -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, linux-kselftest@vger.kernel.org, bpf@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 , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , Bagas Sanjaya , Christoph Hellwig , Nikolay Aleksandrov , Taehee Yoo , 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 v16 05/13] page_pool: devmem support Message-ID: <20240711144107.0086e0e1@kernel.org> In-Reply-To: References: <20240710001749.1388631-1-almasrymina@google.com> <20240710001749.1388631-6-almasrymina@google.com> <20240710094900.0f808684@kernel.org> <20240710182322.667f0108@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 959EE8000B X-Stat-Signature: r99s4njggf75gch7ib6ok63k9x5h7x9w X-Rspam-User: X-HE-Tag: 1720734071-901782 X-HE-Meta: U2FsdGVkX19sGDsiVvv/82kGICl6J/hJO5xnoNL3//7m/W7/1TEFX1anGrpqBvxUHESEXzPlHdPu7mDQLpRj1EU+alyrQlyvp7o5j4UnpxUo9v6TFZfSd3T8Zk9xRuMxyyTqD6tD5v8tdozblrwemY/KlKINkOqKAjI3nDmsZCdtggQLViZreLSzE7uuieWi+usymnQQVehlx+qROslWvmDDuAjaWO4gvgzJPijM5/M4gRWo+JdQrKkBk5HmlK1dC9ghYZaRmBMRyQ97LZ9OhbXwH+6/ipy+NATurdJBUIeOqr8OWWhdSatScMI7x+3/c6EYX1axgCwDZa/WTgKyh/m/v2z/qPtJPQDvHIrUTyZaxO7V3CZ09ceY6qSWpeJ41c8IwVaBFXwRQN8aJGwPt71qNF/9m7TiW59hjCkrmRRZtiEGhMx1GLdvVGnoRFSWRVgtw/DaNW5PuVzfcqsfjmtuhuaiOAPJIY0GWSlJadnAWvC20AU4xqCnTrCG2AaaJL6xc19cv4lcZEuwGEevBMZkGAFH50t2sFbtdHqc5p3VJjue4SIC8Rn9Upo5oWErTLMS22c6u5kkcEPjMy2g09BXSCh5uzQSw9JOi8oV+EueEHvgEHwkl8opiqDa3vBOO/tjT0882yOSFyFIa3WOdhzlW1CaEtsY1qYbY1ae7zj8H+9UwoKG8S2XVNJAOwkP5ploEfaLbox7HbzMpbQkY5mrBnm3n98ewqvYuMxNioM9swl7IYuYhm+8UU48GNXdKYHQq/R9DKKB/WNaxi6XxNJz+3CwEQYpg7RayPBj6ypAcJ4/z4Mg0hOYg4km7cqcDYXGE7cH63I6rV8UMy5pDkWhBsn6vyFnzJFw6NomJeQ4kJbwXQ4vlA1AreC7QewjJDCgFZ4G0eEMm5uzjyeBZfHwfdJehMcOy8eJ0I2AA8M6kLLtaTVTTXwWuoW22OdDJ/OOlFF6t+Vpa7fEo6J eyQhBNKD W/GPg6LiArAx6GSZvIsVRR619egeZe86fM76BUinKF7Zns3kz86F/ezwH7QAnW7aTqYp/gr1GCHj6dp1BbTBKgkROM/sdymAxiP/DnNEjLyWu6eHTPDqpaL7ce0DyxIsU3NiOMRq3399nqH7wHkTWcZtC9q7JUGphZ88XfJV9GBZMzBgjIz5gHz5nsQhytdWERoc77OCZquz6LM7STxJaJgTYj2taMK4YoldzqFt9NJiBKLJ7YBRd7/b5RiZN3pH8g5xPwfS5eBpypzG9+6GxPZrZkABjxxs7Sp41DV1fdM4iA6BSvJZT034ak/PIjBCAhJlZ9qZFVd/dU2VjL705MYg9Xw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, 11 Jul 2024 13:57:01 -0700 Mina Almasry wrote: > > > Sorry none of those are only used by net/core/*. Pretty much all of > > > these are used by include/net/page_pool/helpers.h, and some have > > > callers in net/core/devmem.c or net/core/skbuff.c > > > > > > Would you like me to move these pp specific looking ones to > > > include/net/page_pool/netmem.h or something similar? > > > > That's because some things already in helpers have no real business > > being there either. Why is page_pool_set_pp_info() in helpers.h? > > OK, I looked into this a bit. It looks like I can trivially move > page_pool_set/clear_pp_info() to page_pool_priv.h, and that lets me > move out a few of these netmem helpers to a header under net/core. > > However, to move more of these netmem helpers to a private header, I > think I need to move all the page pool dma helpers and reffing helpers > to a private header or the .c file, which I think will uninline them > as they're eventually called from drivers. > > I had guessed the previous authors put those dma and ref helpers in > the .h file to inline them as they're used in fast paths. Do you think > the refactor and the uninling is desirable? Or should I just do with > the trivial moving of the page_pool_set/clear_pp_info() to the private > file? The helpers which modify pp_magic and dma_addr should go. I don't see anything else on a quick look, but in general the public header shouldn't contain helpers which are meant for setup / init of a buffer.