Re: [PATCH v3 1/1] net: fec: add xdp and page pool statistics

From: Alexander Lobakin
Date: Mon Nov 14 2022 - 10:28:04 EST


From: Shenwei Wang <shenwei.wang@xxxxxxx>
Date: Mon, 14 Nov 2022 14:53:00 +0000

> > -----Original Message-----
> > From: Alexander Lobakin <alexandr.lobakin@xxxxxxxxx>
> > Sent: Monday, November 14, 2022 7:46 AM
> > To: Shenwei Wang <shenwei.wang@xxxxxxx>
> > Cc: Alexander Lobakin <alexandr.lobakin@xxxxxxxxx>; David S. Miller
> > <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> > Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Alexei
> > Starovoitov <ast@xxxxxxxxxx>; Daniel Borkmann <daniel@xxxxxxxxxxxxx>;
> >> @@ -29,6 +29,7 @@ config FEC
> >> select CRC32
> >> select PHYLIB
> >> select PAGE_POOL
> >> + select PAGE_POOL_STATS
> >
> > Drivers should never select PAGE_POOL_STATS. This Kconfig option was made to
> > allow user to choose whether he wants stats or better performance on slower
> > systems. It's pure user choice, if something doesn't build or link, it must be
> > guarded with IS_ENABLED(CONFIG_PAGE_POOL_STATS).
>
> As the PAGE_POOL_STATS is becoming the infrastructure codes for many drivers, it is
> redundant for every driver to implement the stub function in case it is not selected. These
> stub functions should be provided by PAGE_POOL_STATS itself if the option is not selected.

Correct, but I think you added 'select PAGE_POOL_STATS' due to some
build issues on PPC64, or not? So if there are any when
!PAGE_POOL_STATS, it's always better to handle this at the Page Pool
API level in a separate patch.

>
> >
> >> imply NET_SELFTESTS
> >> help
> >> Say Y here if you want to use the built-in 10/100 Fast

Thanks,
Olek