Thread (33 messages) 33 messages, 6 authors, 2016-12-04

Re: Regression: [PATCH] mlx4: give precise rx/tx bytes/packets counters

From: Saeed Mahameed <hidden>
Date: 2016-12-04 13:23:54

On Thu, Dec 1, 2016 at 7:36 PM, Eric Dumazet [off-list ref] wrote:
On Thu, 2016-12-01 at 08:08 -0800, Eric Dumazet wrote:
quoted
On Thu, 2016-12-01 at 07:55 -0800, Eric Dumazet wrote:
quoted
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.
Right, hence the regression Jesper saw ;).
So the only safe thing to do is to remove the _bh suffix.

Not worth trying to avoid taking a spinlock in this code.
Ack.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help