[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZUzDIV2SQ4U/rhzI@lore-desk>
Date: Thu, 9 Nov 2023 12:31:45 +0100
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Sven Auhagen <sven.auhagen@...eatech.de>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
"brouer@...hat.com" <brouer@...hat.com>,
"ilias.apalodimas@...aro.org" <ilias.apalodimas@...aro.org>,
"mcroce@...rosoft.com" <mcroce@...rosoft.com>,
"leon@...nel.org" <leon@...nel.org>,
"kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH v4] net: mvneta: fix calls to page_pool_get_stats
[...]
> >
> > 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
> > >
>
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists