net/mlx5: E-Switch, Refactor vport representors initialization
authorMark Bloch <markb@mellanox.com>
Wed, 9 Aug 2017 11:47:14 +0000 (11:47 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 Dec 2017 10:36:33 +0000 (12:36 +0200)
commite8d31c4d65998c38feccc539297ca506099e0194
treecc57e1430d3bd0b406072eb0248be2255282f168
parent1291a0d5049dbc06baaaf66a9ff3f53db493b19b
net/mlx5: E-Switch, Refactor vport representors initialization

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 array
instead of kzalloc.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c