Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 11:28 -0800, Cong Wang wrote: > Hello, Saeed > > On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed > wrote: > > static int mlx5e_handle_pflag(struct net_device *netdev, > > u32 wanted_flags, > > - enum mlx5e_priv_flag f

Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 10:36 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed > wrote: > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > > index a429553002a6..49e90ac5dc8b 100644 > > --- a/drivers/net/ethernet/

Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Cong Wang
Hello, Saeed On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed wrote: > static int mlx5e_handle_pflag(struct net_device *netdev, > u32 wanted_flags, > - enum mlx5e_priv_flag flag, > - mlx5e_pflag_handler pflag_han

Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Cong Wang
On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed wrote: > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > index a429553002a6..49e90ac5dc8b 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h > +++ b/drivers/net/ethernet/mellanox/m

[net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-04 Thread Saeed Mahameed
From: Tariq Toukan Refactor the code of private-flags setter. Replace consecutive calls to mlx5e_handle_pflag with a loop that uses a preset set of parameters. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 17 ++--- .../ethernet/