Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7207850rwb; Tue, 15 Nov 2022 09:01:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf5JdGtBRJLbChxX9moUWhFb1/SHBtZhCGqP/BWqXARdnvWL34+eJKJwBoZ40s9bQNTCK9vS X-Received: by 2002:aa7:d489:0:b0:458:bd09:1b20 with SMTP id b9-20020aa7d489000000b00458bd091b20mr16036397edr.176.1668531702577; Tue, 15 Nov 2022 09:01:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668531702; cv=pass; d=google.com; s=arc-20160816; b=Z73uq1xS+u4CQsFRUBs0YoedT88TTpWql1oZSV9qpbqryHKxo7wOcAbpGdQP38J9qp 4hVlGc+2P0DGCnu+21ZmNU1ZI5ryts92lZCjLhdfSQ0BIWtqZcJghkviBGXV/byef6HQ azYAcXSlBsXSSstxq4+62uD0HrK3HU/afTBZv6CM2J6m8oy2OyQEBqbkuO6vetgHena6 gFjpx7hfr8pskApsX3hiBF08ePP1l9fvVThzSzlwED7sPycrRoqr25aEbUmNcoMt0z7C N5/jqGc26ZB2fboA4/NVFXHruh+vhZP93iBF5JfthOA+Xgpm2Ty82es5OoauaRzk4loq acHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=25xDlwa8FLh4KnY3G2hZMn4siFAizlq83ldQ6RuVf3o=; b=azlQqJzMySWlOmkN0dpQJxISayegISa+lX8Wi89fYV0vRcrm9Hxnlb0xbsAxuDY0He mbXp69WRQcEc1JC5sH7mixmRf8bOqCGS1V0MCwGjgALwaayhW0iDyPhSITQuyvoZpKi4 zGB7o03rDodiMl+qcx9B6AmhGyDpjJvGx7icFKV26LPCwvpKt9qtkOtUGLK8shixtynM hmPWahM9AT4Z3TWmLuNaR8pRaKRSVM97koQ6SnEqHewNqjTNNcUu8wOT3wUuzcdGvqDe wzx0wH2BFE6kZlAWoOdxf4vle+pErToFD5C+Jyh/TIJekvntXLHX6XD2yq+mVWJ8Rxv7 xr0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=KOeYfQHc; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a056402348e00b00461e63fe88fsi14281093edc.596.2022.11.15.09.01.18; Tue, 15 Nov 2022 09:01:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@nxp.com header.s=selector2 header.b=KOeYfQHc; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238482AbiKOP6l (ORCPT + 90 others); Tue, 15 Nov 2022 10:58:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238029AbiKOP62 (ORCPT ); Tue, 15 Nov 2022 10:58:28 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 709BD2ED5C; Tue, 15 Nov 2022 07:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bN6LEdxrXKJGWjyCF2oLiYAnD1FP6l7daF4liXtrzkckIgRFWq6FYNkIq+hAVYQnFm7hB1BDpRE9RqUALvT8hHcPdOoVQCGPRAOc/CoYubcmnfyvNaggDQ7vYUFRZeAl0bIp1ZOHoWfrR6q+3iL6M7v2y79/PISR2PcVO6NqkwNbzAHcwxynQCtyWM1R4OSMbgd3QqPTuq/bXsdEg98ZC9KzhU+qwKSyRTx/LHk2dNYXc3cM0TTfSiZiQ/jKzI44r6QNLG1Kg42m8hzIbD+4adoHXi2Dh+KdoF0q0i4IHVnhaiPMpJ03VIJhlmqegSUfUxfMDyiPxCdoXaDFy087Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=25xDlwa8FLh4KnY3G2hZMn4siFAizlq83ldQ6RuVf3o=; b=Y9YT2rDVGccXDEDmwPjD4aXI9tSgeP7kmfAxj7nhlTh0mDXom4+qSet/+15OeTE0vdz3olRP/6pquWfvvBqUzcK/aLAE9hnKnhEgedSb5tESbkY+H3mCmzwpROzrBmlL/q78E6j6RDAhBdId+/o3RqQ/5I1WQiyydPWyiWHao0C3cVTwzMEXHCwU28QQA1ig1ochLFZvVxK8fpkr+RJaCPp70y4R6lFIPrK6os6gv3RE/1rmtWSv6wovsSxL0Mraw3vDTyoJd3AI2///85w6Gs/9Kwj00iO17Q34QL78eieSXK1/W3ZpBHahQ3zzXR4g369/tjbfhwNospnnEPzyaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=25xDlwa8FLh4KnY3G2hZMn4siFAizlq83ldQ6RuVf3o=; b=KOeYfQHcMhI2bvM8hrLykslLTtG5zWottACfTEi1/q2Yu8WZVT5uQUhpdNEK+yF/DrvH+1Rajd41w4bYkL5G2SzDo4cJZ+zF2P9aaNW/Uou0nKQcyDPZPgsU6GozneExbeCfWkQV4Xg2ivhHVjpohXtxjDjMLC9TtFYdtdXz+oE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by DBBPR04MB7690.eurprd04.prod.outlook.com (2603:10a6:10:200::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Tue, 15 Nov 2022 15:58:18 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::6b44:4677:ad1d:b33a]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::6b44:4677:ad1d:b33a%6]) with mapi id 15.20.5813.018; Tue, 15 Nov 2022 15:58:17 +0000 From: Shenwei Wang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Jesper Dangaard Brouer , Ilias Apalodimas , Alexei Starovoitov , Daniel Borkmann , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Shenwei Wang Subject: [PATCH v4 1/2] net: page_pool: export page_pool_stats definition Date: Tue, 15 Nov 2022 09:57:43 -0600 Message-Id: <20221115155744.193789-2-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221115155744.193789-1-shenwei.wang@nxp.com> References: <20221115155744.193789-1-shenwei.wang@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR08CA0030.namprd08.prod.outlook.com (2603:10b6:a03:100::43) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|DBBPR04MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: 60facf98-beb6-4b77-cd9b-08dac7223614 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1bJuG8LB9RLuejUKIcfYMcBlhytNwNbmzXUCqRb5q8nwE6lNCyFP+/cLE909/X+Mq5agFkahY4ZoHuNB07IT0iyo3hEpAT8Eoa9UFha3EScaoOd9roZp2VL6sPyaOPYtfVRW5R0kQC7W43En3Nwpp3xuoE8tYa3WsYucHWO7KHNM11FF1oFuix4BwdbDHbQMcRPRNxOkr1beTnvVotOcGkK9oIH6ISI8SsQWuqf27GKnt4vPEDzkABo5PbjOy34+OxKVx/borFpmoC2HIJwYMubKWrkNf5Guz1eOGmUAYuMhTxL55KBcOgjG3oZB+sVBhQH23x1ChqAeEHGpERBESbD63APrwKJOiOi2OsURNU8HZq/g0PFLFHYVh9v/UhZmJgfYVOwgRXmMA6QYdK/6Hpsl7K22el2+075avlt151rCHsitGozrHjnOAJ5TYNgBBK7D2Jg5adFHVcSM6dE7Ibwt7tD3AnyJCankT9lEQgv9xi+RipVtQU6ALApV2mFOsPkBqx4DV4H6dcKJ0MGdTL6IOLtBEylwyIkIcvyFOJhFbB1eOK7yAQWZdo8YkzAXJNdWSZsYIKaaYRHh7D+gtElUROAKWUvMmHKG6LKDnzLadNGtRZHM8K42OEwKM7wdXgV6CPmXUAStaWm9Yu7NqOmBCcIHCSFmeHdqmbXk/2A0bj0E1r6SGDbIEjLGdSiFAlO4gJYgT8VVLGy3tsIvPEYuKF2QULiVYJQno6qEGXvpqaIUeqhgyZpgNdYj058IwPLLRJ30hnQgoSERRkf3dA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(366004)(396003)(346002)(376002)(39860400002)(451199015)(36756003)(6512007)(186003)(83380400001)(26005)(86362001)(2616005)(38350700002)(5660300002)(38100700002)(7416002)(2906002)(44832011)(41300700001)(8936002)(4744005)(478600001)(52116002)(55236004)(6486002)(316002)(1076003)(54906003)(110136005)(66476007)(66946007)(6666004)(6506007)(4326008)(66556008)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?QpmWGvBghVNJSP9rySjTyIzIiFEyHFeJh6YnbG3w1D2n09DKddnz6xRIj9PF?= =?us-ascii?Q?Yj1FU+qkhpSW1tPOysCdsoLx7WC+obcJmxKvUyhMvbFZA44U9iJe4//FciVo?= =?us-ascii?Q?ORnFxhhlJVTsCHPkcizWdi+0PEmsphNF/I8HNb/CgeiyzCq5JaDwkErKNVHf?= =?us-ascii?Q?I0Wr5nj+5dRafMb8Sz7xd+HWKDBLGuYK8S6kPjF5/bxeWY+tUaQ4GBEebihI?= =?us-ascii?Q?2H1G+Ng8IfVKV7//ddVRtuj0qFrZATpQecv0nx56Lrg+lgbGPh3g5BAJrRrD?= =?us-ascii?Q?HA6GDewpUN6jDPpVR1kZ0MY3xZg6gKBbBWOudMDlhjkP2FIS6hs+A2AOmk8R?= =?us-ascii?Q?tF2X2dclTF18ZrW0ZsN1afPbCld3eW14ArRO4rBjCjYR8dw7UIp2wzR/pydl?= =?us-ascii?Q?KjXWqQsNnHmrNB32NM0sus9YJ3Kc4u+R1CIiXFJFt4kD4gM1ah307A5EEA7X?= =?us-ascii?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bqxnCnpTvZ6B1KQCi?= =?us-ascii?Q?iv/XRXwGDeApt7sNexe0Lz5iNBgYOmmsR80CAZswWRjH5XujlmLQY8IdySIa?= =?us-ascii?Q?MjA6db/hb4UpTtDwrPG3lKebNWK00itPC6uOfdCFq2zXvtyDdUtMJ/MxlVnt?= =?us-ascii?Q?HUVcQVzEnd5aOUjdkOP1o5QqHvEZHyHsTOE/W7g8foZs3Yt0vo1eyfoOXpZl?= =?us-ascii?Q?AWHbnXpbZiM+GSVnzRML/UiPPznI3pjQadOsGKeI?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60facf98-beb6-4b77-cd9b-08dac7223614 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2022 15:58:17.8994 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y00TKI3t/Km2r6s2IfS6spYAoooRlpioMq0a198s8NMflZRSdljx13dpXIO/QzPWa9MBNI85kVzaY8KENilaEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7690 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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-kernel@vger.kernel.org The definition of the 'struct page_pool_stats' is required even when the CONFIG_PAGE_POOL_STATS is not defined. Otherwise, it is required the drivers to handle the case of CONFIG_PAGE_POOL_STATS undefined. Signed-off-by: Shenwei Wang --- include/net/page_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/page_pool.h b/include/net/page_pool.h index 813c93499f20..adfd4bb609a7 100644 --- a/include/net/page_pool.h +++ b/include/net/page_pool.h @@ -84,7 +84,6 @@ struct page_pool_params { void *init_arg; }; -#ifdef CONFIG_PAGE_POOL_STATS struct page_pool_alloc_stats { u64 fast; /* fast path allocations */ u64 slow; /* slow-path order 0 allocations */ @@ -117,6 +116,7 @@ struct page_pool_stats { struct page_pool_recycle_stats recycle_stats; }; +#ifdef CONFIG_PAGE_POOL_STATS int page_pool_ethtool_stats_get_count(void); u8 *page_pool_ethtool_stats_get_strings(u8 *data); u64 *page_pool_ethtool_stats_get(u64 *data, void *stats); -- 2.34.1