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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1BF8C3DA42 for ; Thu, 11 Jul 2024 01:23:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AD1C10E080; Thu, 11 Jul 2024 01:23:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="KObjfEuH"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8847D10E080 for ; Thu, 11 Jul 2024 01:23:27 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 76CCFCE16E9; Thu, 11 Jul 2024 01:23:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0730CC32781; Thu, 11 Jul 2024 01:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720661004; bh=BNGP4duokc8ncBE7271BuDVYIIwbBx7q1BctfwQaFqA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KObjfEuHg+F+/bNhywmUUTSGFn3bv/UvTtLsoLP/A8j+JrYJp2Ka3O/ezDg7IquU7 64ig4waKXABYjNs3vbvrYkR7ULJbLzB1fN702YTrMz0Hkxis8BMfqdvmxik/sQQ21K XXeIDIYx3mYfCBeuUJq0aaQspg3EQOjFC5mPiG7btWl7kDBRHcLzhqrGBo3ghENCin 5wPf+YTZV7+ICl9eWbLIMvEJhTp71W9ETPYKnyot5YbyIOKw8smwAldqsdn2p/dXmj xdQJd61Xv49iwsP6htPMECVZNf2v9MhwXGUeQ/ixSeS6yXvvH4jnN0ZxI/3Fhw701B s1ygLn4p0sytg== Date: Wed, 10 Jul 2024 18:23:22 -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: <20240710182322.667f0108@kernel.org> In-Reply-To: References: <20240710001749.1388631-1-almasrymina@google.com> <20240710001749.1388631-6-almasrymina@google.com> <20240710094900.0f808684@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 10 Jul 2024 16:42:04 -0700 Mina Almasry wrote: > > > +static inline void netmem_set_pp(netmem_ref netmem, struct page_pool *pool) > > > +{ > > > + __netmem_clear_lsb(netmem)->pp = pool; > > > +} > > > > Why is all this stuff in the main header? It's really low level. > > Please put helpers which are only used by the core in a header > > under net/core/, like net/core/dev.h > > 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?