Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-04 Thread Oleksij Rempel
On Thu, Dec 03, 2020 at 08:01:40PM +0200, Vladimir Oltean wrote: > On Thu, Dec 03, 2020 at 06:53:20PM +0100, Oleksij Rempel wrote: > > It is possible to poll it more frequently, but it make no reals sense > > on this low power devices. > > Frankly I thought you understood the implications of

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Vladimir Oltean
On Thu, Dec 03, 2020 at 06:53:20PM +0100, Oleksij Rempel wrote: > It is possible to poll it more frequently, but it make no reals sense > on this low power devices. Frankly I thought you understood the implications of periodic polling and you're ok with them, just wanting to have _something_.

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Jakub Kicinski
On Thu, 3 Dec 2020 18:53:20 +0100 Oleksij Rempel wrote: > On Thu, Dec 03, 2020 at 08:35:17AM -0800, Jakub Kicinski wrote: > > 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

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Oleksij Rempel
On Thu, Dec 03, 2020 at 08:35:17AM -0800, Jakub Kicinski wrote: > 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, ); > > >

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Jakub Kicinski
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, ); > > Yes. And underling layer is mdio bus which is by default sleeping as > well. >

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Andrew Lunn
> @Andrew > > > You could update the stats here, after the interface is down. You then > > know the stats are actually up to date and correct! > > stats are automatically read on __dev_notify_flags(), for example here: > > [ 11.049289] [<80069ce0>] show_stack+0x9c/0x140 > [ 11.053651]

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Oleksij Rempel
Hello Jakub and Andrew, > Ah, I missed the v3 (like most reviewers it seems :)). No problem, I moved your replies from v2 tread to this mail. On Wed, Dec 02, 2020 at 10:42:07AM -0800, Jakub Kicinski wrote: > On Wed, 2 Dec 2020 15:09:04 +0100 Oleksij Rempel wrote: > > Add stats support for the

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-02 Thread Jakub Kicinski
On Wed, 2 Dec 2020 15:09:04 +0100 Oleksij Rempel wrote: > Add stats support for the ar9331 switch. > > Signed-off-by: Oleksij Rempel Ah, I missed the v3 (like most reviewers it seems :)). The sleeping in ndo_get_stats64 question applies.

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-02 Thread Florian Fainelli
On 12/2/2020 6:09 AM, Oleksij Rempel wrote: > Add stats support for the ar9331 switch. > > Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli -- Florian

[PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-02 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 248 ++- 1 file changed, 247 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index