Re: [for-next 01/11] net/mlx5: E-Switch, Refactor vport representors initialization

2017-12-20 Thread David Miller
From: Mark Bloch Date: Wed, 20 Dec 2017 21:21:51 +0200 > > > On 20/12/2017 19:57, David Miller wrote: >> From: Saeed Mahameed >> Date: Tue, 19 Dec 2017 12:33:30 -0800 >> >>> +int esw_offloads_init_reps(struct mlx5_eswitch *esw) >>> +{ >>> + struct mlx5_core_dev *dev = esw->dev; >>> + stru

Re: [for-next 01/11] net/mlx5: E-Switch, Refactor vport representors initialization

2017-12-20 Thread Mark Bloch
On 20/12/2017 19:57, David Miller wrote: > From: Saeed Mahameed > Date: Tue, 19 Dec 2017 12:33:30 -0800 > >> +int esw_offloads_init_reps(struct mlx5_eswitch *esw) >> +{ >> +struct mlx5_core_dev *dev = esw->dev; >> +struct mlx5_esw_offload *offloads; >> +struct mlx5_eswitch_rep *rep;

Re: [for-next 01/11] net/mlx5: E-Switch, Refactor vport representors initialization

2017-12-20 Thread David Miller
From: Saeed Mahameed Date: Tue, 19 Dec 2017 12:33:30 -0800 > +int esw_offloads_init_reps(struct mlx5_eswitch *esw) > +{ > + struct mlx5_core_dev *dev = esw->dev; > + struct mlx5_esw_offload *offloads; > + struct mlx5_eswitch_rep *rep; > + int total_vfs = MLX5_TOTAL_VPORTS(dev); >

[for-next 01/11] net/mlx5: E-Switch, Refactor vport representors initialization

2017-12-19 Thread Saeed Mahameed
From: Mark Bloch Refactor the init stage of vport representors registration. vport number and hw id can be assigned by the E-Switch driver and not by the netdevice driver. While here, make the error path of mlx5_eswitch_init() a reverse order of the good path, also use kcalloc to allocate an arra