> +static void mana_get_page_pool_stats(struct net_device *ndev, u64 *data)
> +{
> +#ifdef CONFIG_PAGE_POOL_STATS
> +     struct mana_port_context *apc = netdev_priv(ndev);
> +     unsigned int num_queues = apc->num_queues;
> +     struct page_pool_stats pp_stats = {};
> +     int q;
> +
> +     for (q = 0; q < num_queues; q++) {
> +             if (!apc->rxqs[q] || !apc->rxqs[q]->page_pool)
> +                     continue;
> +
> +             page_pool_get_stats(apc->rxqs[q]->page_pool, &pp_stats);
> +     }
> +
> +     page_pool_ethtool_stats_get(data, &pp_stats);
> +#endif /* CONFIG_PAGE_POOL_STATS */

You should not need this #ifdef. The stubs should make the code do
sensible things if CONFIG_PAGE_POOL_STATS is not enabled.

         Andrew

Reply via email to