lkml.org 
[lkml]   [2021]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 net-next 2/2] net: dsa: qca: ar9331: export stats64
On Thu, 7 Jan 2021 15:36:45 +0100 Andrew Lunn wrote:
> > +static void ar9331_get_stats64(struct dsa_switch *ds, int port,
> > + struct rtnl_link_stats64 *s)
> > +{
> > + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv;
> > + struct ar9331_sw_port *p = &priv->port[port];
> > +
> > + spin_lock(&p->stats_lock);
> > + memcpy(s, &p->stats, sizeof(*s));
> > + spin_unlock(&p->stats_lock);
> > +}
>
> This should probably wait until Vladimir's changes for stat64 are
> merged, so this call can sleep. You can then return up to date
> statistics.

Plus rx_nohandler is still updated from HW stats here :|

+ stats->rx_nohandler += raw.filtered;

\
 
 \ /
  Last update: 2021-01-09 23:06    [W:0.259 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site