OSDN Git Service

net/mlx5e: Move ethernet representors data into separate struct
authorMark Bloch <markb@mellanox.com>
Thu, 7 Dec 2017 20:55:10 +0000 (20:55 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 Dec 2017 10:36:33 +0000 (12:36 +0200)
commit5ed99fb421d4d5cd4cba613c1ab115585aa277d2
treea6b95b90a93bb4eb3cd5c912983bf8f4800c8a87
parent159fe63922450183931429ef0b6c7548d49e5bcc
net/mlx5e: Move ethernet representors data into separate struct

Ethernet representors have a need to store data which is applicable
only for them. Create a priv void pointer in struct mlx5_eswitch_rep
and move mlx5e to store the relevant data there. As part of this change
we also initialize rep_if in mlx5e_rep_register_vf_vports() as otherwise the
E-Switch code will copy a priv value which is garbage.

We also rename mlx5_eswitch_get_uplink_netdev() to
mlx5_eswitch_get_uplink_priv() and make it return void *.
This way E-Switch code doesn't need to deal with net devices and
we leave the task of getting it to mlx5e.

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/en_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c