Re: [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics

2017-05-15 Thread Stephen Hemminger
On Fri, 12 May 2017 14:56:45 +0300 Saeed Mahameed wrote: > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > index 0099a3e397bc..c41cf7e82795 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h > +++ b/drivers/net/ethernet/mellan

Re: [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics

2017-05-15 Thread David Miller
From: Saeed Mahameed Date: Sun, 14 May 2017 11:52:13 +0300 > I agree, it is really ridiculous that we allocate/free a couple of > buffers on each update_stats operations, regardless of this patch. > Is it ok if we use a temp buffer under netdev_priv for such usages or > even use kmemcache ? If y

Re: [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics

2017-05-14 Thread Saeed Mahameed
On Fri, May 12, 2017 at 7:13 PM, David Miller wrote: > From: Saeed Mahameed > Date: Fri, 12 May 2017 14:56:45 +0300 > >> From: Gal Pressman >> >> Add a spinlock to prevent races when querying statistics, for example >> querying counters in the middle of a non atomic memcpy() operation in >> mlx5

Re: [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics

2017-05-12 Thread David Miller
From: Saeed Mahameed Date: Fri, 12 May 2017 14:56:45 +0300 > From: Gal Pressman > > Add a spinlock to prevent races when querying statistics, for example > querying counters in the middle of a non atomic memcpy() operation in > mlx5e_update_stats(). > > This RW lock should be held when accessi

[net 1/6] net/mlx5e: Use a spinlock to synchronize statistics

2017-05-12 Thread Saeed Mahameed
From: Gal Pressman Add a spinlock to prevent races when querying statistics, for example querying counters in the middle of a non atomic memcpy() operation in mlx5e_update_stats(). This RW lock should be held when accessing priv->stats, to prevent other reads/writes. Fixes: 9218b44dcc05 ("net/m