[...] > > > > do we need to check pp->is_stopped here? (we already check if page_pool > > pointer is NULL in mvneta_ethtool_pp_stats). > > Moreover in mvneta_ethtool_get_sset_count() and in mvneta_ethtool_get_strings() > > we just check pp->bm_priv pointer. Are the stats disaligned in this case? > > Hi Lorenzo, > > so the buffer manager (bm) does not support the page pool. > If this mode is used we can skip any page pool references. > > The question is do we end up with a race condition when we skip the is_stopped check > as the variable is set to true just before the page pools are > deallocated on suspend or interface stop calls. Do we really have a race here? e.g. both ndo_stop and ethtool_get_stats() run under rtnl. Moreover it seems is_stopped is not set for armada-3700 devices (e.g. my espressobin). Do we have the issue for this kind of devices? Regards, Lorenzo > > Best > Sven > > > > > > + mvneta_ethtool_pp_stats(pp, data); > > > } > > > > > > static int mvneta_ethtool_get_sset_count(struct net_device *dev, int sset) > > > { > > > - if (sset == ETH_SS_STATS) > > > - return ARRAY_SIZE(mvneta_statistics) + > > > - page_pool_ethtool_stats_get_count(); > > > + if (sset == ETH_SS_STATS) { > > > + int count = ARRAY_SIZE(mvneta_statistics); > > > + struct mvneta_port *pp = netdev_priv(dev); > > > + > > > + if (!pp->bm_priv) > > > + count += page_pool_ethtool_stats_get_count(); > > > + > > > + return count; > > > + } > > > > > > return -EOPNOTSUPP; > > > } > > > -- > > > 2.42.0 > > > > >