lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64
On Thu, 3 Dec 2020 09:50:11 +0100 Oleksij Rempel wrote:
> @Jakub,
>
> > You can't take sleeping locks from .ndo_get_stats64.
> >
> > Also regmap may sleep?
> >
> > + ret = regmap_read(priv->regmap, reg, &val);
>
> Yes. And underling layer is mdio bus which is by default sleeping as
> well.
>
> > Am I missing something?
>
> In this log, the ar9331_get_stats64() was never called from atomic or
> irq context. Why it should not be sleeping?

You missed some long discussions about this within last week on netdev.
Also Documentation/networking/statistics.rst.

To answer your direct question - try:

# cat /proc/net/dev

procfs iterates over devices while holding only an RCU read lock.

\
 
 \ /
  Last update: 2020-12-03 17:39    [W:0.061 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site