Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7247426rwb; Tue, 15 Nov 2022 09:29:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6foTail7A5U2walhsjNnbEcec3hyo9oDPXNBCvi5R2fGRZqINJxNOBq+hXaJih1YNw84wE X-Received: by 2002:a17:906:8144:b0:7b2:75c6:6d32 with SMTP id z4-20020a170906814400b007b275c66d32mr2309436ejw.209.1668533353099; Tue, 15 Nov 2022 09:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668533353; cv=none; d=google.com; s=arc-20160816; b=Zx2yLt1N/JG7CkMhxnwqGR1YhPJHLQZT2JKFrQi8FlN+dMQ3zJyZUKzYpATJhnGRLL N522vuaHuV+gwIdK13akOjgGuD58MbO9u06uHqJ7cUUblWoTve2wz9WMV1MSJbcGt8JI 70ADABJcgaBomqcSMdwL/GBeudSJTxh1NOsp7YUetnqUlmTuqVbUZywiSfgORwsgqyBv +g4nod2GUrr6y2qfRxSztsyCqNUtPoo3IlIw5g+QlJtIZkC1gjEPQNvTBOa1Zwa7lzHD CRypBT4WJ1LvUtymCTFE35STfXxiDYtz4mZO9Sp7eAVH3RKng9AC0b2qhqPgmWSJClrm 6Iog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HT0pmrQ9nKiRSy0684bpSN9Np5hhj3VvrPzQFQl+VOM=; b=zkqBeZT+5Zl9BSEzQ7cI1XfeodpeOCkQOYIJ2Pw15b+Bzn4nnK0et5OWF05bEpY2tz bd7Igc6ozvrXnCkEJT69Wi/I3PoHXrtWbbYILI6BdhYKLXqrNJnGgX4SYJLUIkVYqRis aHykA1WfUGM2zP3UQDDfuVrdDQGcQRtSZqD0OFQGPTzuB3fwGVFDoDUxo4URaCsZ9/nK AJnyGjMDOiko5jjWMuE4/2IRiUSSj7Aqzr8v6j1il3js+jF4fRPyb8kHZa/uZcmXLonF 1Md5Sem93UbSvHX9gO+uXdPpDZFU8K6KTcWtfoFKrAv8WxYRP8JHqSuHtSKoKfuUMvpp u00A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=UBG50IXm; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw6-20020a170906478600b007ada03062e9si13320646ejc.415.2022.11.15.09.28.50; Tue, 15 Nov 2022 09:29:13 -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=@lunn.ch header.s=20171124 header.b=UBG50IXm; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbiKORM3 (ORCPT + 91 others); Tue, 15 Nov 2022 12:12:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbiKORM1 (ORCPT ); Tue, 15 Nov 2022 12:12:27 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD59F175AB; Tue, 15 Nov 2022 09:12:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=HT0pmrQ9nKiRSy0684bpSN9Np5hhj3VvrPzQFQl+VOM=; b=UBG50IXmzx/yfY6fDXl2dUFSl5 a+B7ALVpVATw6u7MxryqOtW6NnoxJ4DVWXsVQBFFcQ9tUtJKTu+UIsUOKW96He4orcVO6lVZ0w/d1 O4KZgbUtHI600TXwMr6GhedIGROIL4gwuEHNqTrDK9jw/pmuG7mgMaw2mkhNjm5tKxrI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ouzTe-002TpO-6a; Tue, 15 Nov 2022 18:12:02 +0100 Date: Tue, 15 Nov 2022 18:12:02 +0100 From: Andrew Lunn To: Shenwei Wang Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jesper Dangaard Brouer , Ilias Apalodimas , Alexei Starovoitov , Daniel Borkmann , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: Re: [PATCH v4 1/2] net: page_pool: export page_pool_stats definition Message-ID: References: <20221115155744.193789-1-shenwei.wang@nxp.com> <20221115155744.193789-2-shenwei.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221115155744.193789-2-shenwei.wang@nxp.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Tue, Nov 15, 2022 at 09:57:43AM -0600, Shenwei Wang wrote: > 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. I agree the API is broken, but i think there is a better fix. There should be a stub of page_pool_get_stats() for when CONFIG_PAGE_POOL_STATS is disabled. Nothing actually dereferences struct page_pool_stats when you have this stub. So it might be enough to simply have struct page_pool_stats{ }; Andrew