[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1480613764.18162.324.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Thu, 01 Dec 2016 09:36:04 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Saeed Mahameed <saeedm@....mellanox.co.il>
Cc: Jesper Dangaard Brouer <brouer@...hat.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...lanox.com>
Subject: Re: Regression: [PATCH] mlx4: give precise rx/tx bytes/packets
counters
On Thu, 2016-12-01 at 08:08 -0800, Eric Dumazet wrote:
> On Thu, 2016-12-01 at 07:55 -0800, Eric Dumazet wrote:
>
> > So removing the spinlock is doable, but needs to add a new parameter
> > to mlx4_en_fold_software_stats() and call netdev_stats_to_stats64()
> > before mlx4_en_fold_software_stats(dev)
>
> Untested patch would be :
>
> drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 -
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 10 +----
> drivers/net/ethernet/mellanox/mlx4/en_port.c | 24 +++++++++-----
> drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +
> 4 files changed, 23 insertions(+), 16 deletions(-)
The patch is wrong, since priv->port_up could change to false while we
are running and using the about to be deleted tx/rx rings.
So the only safe thing to do is to remove the _bh suffix.
Not worth trying to avoid taking a spinlock in this code.
Powered by blists - more mailing lists