Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1262152rwb; Wed, 26 Jul 2023 09:47:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlF9p+3V989a9b+wd5pWsd7scoH3GaNtDqt+awlHLBjlCm3JcjszcMl7y43NWENuY3wGm6WD X-Received: by 2002:a05:6358:919a:b0:135:48d9:eb90 with SMTP id j26-20020a056358919a00b0013548d9eb90mr2114486rwa.13.1690390031581; Wed, 26 Jul 2023 09:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690390031; cv=none; d=google.com; s=arc-20160816; b=DayV3vAx47Xo5P3KhEov6Cwf6PPs+qmK0anLxfiChcsCY/dRgh4OdqGxXOjEZiImtr hz9/WR+A1DwGGISQhG5AGwLebYvnachHxuIX75y7tShlPk+1B6uZ3PxKiD+bEdlp5UIu BZsFLrG4qJNGgglJjJfxwbsTOw5KWBs9W1m7ZqXZ+W6kJx8N0MJg5GpBwc3+bVONsFvh 1l2J498JolvqknAqSDs0c0UKvDLuMrYN6cvqr1Sd6Ah6nLbNuGWv8tsnsElBZgbX0Gtv 0bE5hS383Z8eGOCRGg+2R22KoF5Synwfx5ML4a0/IVnxRw4BImoaXy10fyzd1fOnyKnX GQWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KCv8whutDfLJorKpUOqJ8+KkOpc2kOBhY8hTu1PhHvI=; fh=+XsV0z7woOSEKFhwSHwcKaQwWBDRA5AMIVu2W3djasE=; b=PKqWcKyALCcgnymYfxDHYfneBb0mrSXbVyzPoRy4LIvRm4rNdEjHWGfFWIcbQ5Mqe0 KVhkjqzR+4H/zd1jYVs1AyPNaZH+HI8ipxQuqK6V+mOP9hmiqIl7YEHNeGxE3BusPEsY fL3zJOaHQt2syPbVe8JiklkwCayD8CLtLy872gBlpUHyc0rw4flw1qutgfh+t6Z0LyWI nxHCK3LSdcHhXNiYoAWuv9IlTaeoqPEqmPslUz2P+6Qf9Z8hn4IE7HaaFyl+duutsLR/ yG6dnhR9fTVjGL0pGcCfe8s6GWG1PBdM9q6EroieIHanc2faOtI9ii/PWL6oyt/SalkF MQvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QMUznHOL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv69-20020a632e48000000b0055bbc74626esi1051033pgb.217.2023.07.26.09.47.03; Wed, 26 Jul 2023 09:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QMUznHOL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbjGZQnO (ORCPT + 58 others); Wed, 26 Jul 2023 12:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231345AbjGZQnN (ORCPT ); Wed, 26 Jul 2023 12:43:13 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A4626B8; Wed, 26 Jul 2023 09:43:12 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1b89cfb4571so55417545ad.3; Wed, 26 Jul 2023 09:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690389792; x=1690994592; 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=KCv8whutDfLJorKpUOqJ8+KkOpc2kOBhY8hTu1PhHvI=; b=QMUznHOLJYfI3Cg1OGbvbUK2zwN4Xs54ZJ3JbZrw4JhdF1uxPQBZ3HVCSn31MYAgdc Q3UdwouTq+Mcv+ne7ujpatnJtig71lQqScyMfCpcd4njFTx2RrYTuWYS75n+F8Ub+lJb sgYnZK0m3NpEEtpkxeXqvlCQL5FyNn9joXe4bALGP92MnaPs+jHcAWAHXearGlrCz8vp NiOWaE+mGvO2zNT5aJxPyQVlYzpIxZgun8DIiMsIyNzjTELMbe8K/8SOPkhf+s3/lXjk II5NtI1EzZjw6UkqZdZsvukqb8KGZBLOTuS3MfVf02FYRvI+M5kRxGwBzEWcbh/IBuyC WI3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690389792; x=1690994592; 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=KCv8whutDfLJorKpUOqJ8+KkOpc2kOBhY8hTu1PhHvI=; b=GBt3NA5pNQ1akjvGOAZItclKXqBzKoEc9R+/iZ4uWNPpeAs1ZMC2STAudf54WM8YPr oEznqknjN1S5jLmJpBkyplAi9+3A34DJZ4L7EfCZdLhHn522n0OEYpJA4O8JkR5dngjv pWtP0MogwAQTEU+8g6lqEnj48k47bM1ALXY5k9Jms3ORK2Q0P0f8uuC0v//1kdRbripe ydXFDYsa5+uRYdmHO7/DCGhoUX+AsD3QT/sXR6zHL0PugOlYffmgAzUfkMgVct3m5vEh XzYRFfqG/duH9w3UKYKdh3z1f/7gnZxt1eOmnzYu5p2liSyvrpM1AtEx5qHzfXmlrDnY x07g== X-Gm-Message-State: ABy/qLYhU4dukQt5W0+ubN3zpnyzYGDdYO06KOw22brnUGgkGAKpBNlM Nak27gn0Z8BuShSCHRpH1D87JTjtvobx6LhC1nU= X-Received: by 2002:a17:90a:c714:b0:263:f643:4bd3 with SMTP id o20-20020a17090ac71400b00263f6434bd3mr2209207pjt.27.1690389791855; Wed, 26 Jul 2023 09:43:11 -0700 (PDT) MIME-Version: 1.0 References: <20230725131258.31306-1-linyunsheng@huawei.com> <94272ffed7636c4c92fcc73ccfc15236dd8e47dc.camel@gmail.com> <16b4ab57-dfb0-2c1d-9be1-57da30dff3c3@intel.com> <22af47fe-1347-3e32-70bf-745d833e88b9@huawei.com> <20230726085049.36b527a4@kernel.org> In-Reply-To: <20230726085049.36b527a4@kernel.org> From: Alexander Duyck Date: Wed, 26 Jul 2023 09:42:34 -0700 Message-ID: Subject: Re: [PATCH net-next v2] page_pool: split types and declarations from page_pool.h To: Jakub Kicinski Cc: Yunsheng Lin , Alexander Lobakin , davem@davemloft.net, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Saeed Mahameed , Leon Romanovsky , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , Matthias Brugger , AngeloGioacchino Del Regno , Ilias Apalodimas , linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-wireless@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jul 26, 2023 at 8:50=E2=80=AFAM Jakub Kicinski wr= ote: > > On Wed, 26 Jul 2023 08:39:43 -0700 Alexander Duyck wrote: > > > > I suppose the above suggestion is about splitting or naming by > > > > the user as the discussed in the below thread? > > > > https://lore.kernel.org/all/20230721182942.0ca57663@kernel.org/ > > > > > > Actually my suggestion is more about defining boundaries for what is > > > meant to be used by drivers and what isn't. The stuff you could keep > > > in net/core/page_pool.h would only be usable by the files in net/core= / > > > whereas the stuff you are keeping in the include/net/ folder is usabl= e > > > by drivers. It is meant to prevent things like what you were > > > complaining about with the Mellanox drivers making use of interfaces > > > you didn't intend them to use. > > FWIW moving stuff which is only supposed to be used by core (xdp, skb, > etc.) to net/core/page_pool.h is a good idea, too. > Seems a bit independent from splitting the main header, tho. It seems a bit independent, but I was reacting only because I feel like this ijust adding to the technical debt on this. Basically before we can really just go ahead and split it the header file itself should probably be cleaned up a bit. The reason why it occurred to me is that I noticed things like page_pool_use_xdp_mem and the forward declaration for xdp_mem_info was being picked up and moved into the types.h file in the move. The whole block was in a #if/#else statement w/ definitions for the PAGE_POOL and non-PAGE_POOL cases. We also have functions that don't really need to be included such as page_pool_unlink_napi which is exported but not used outside of page_pool.c from what I can tell.