net/mlx5: E-switch, Introduce helper function to enable/disable vports
authorParav Pandit <parav@mellanox.com>
Mon, 29 Jul 2019 21:13:06 +0000 (21:13 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 1 Aug 2019 18:14:25 +0000 (11:14 -0700)
commit5019833d661f5edb6bd63abd3da064d2517966b4
tree9222411d711399cdb07e90ad141892a24f7e29d5
parent610090ebce92ab6a3e1e623344be5a9dd72a8b6d
net/mlx5: E-switch, Introduce helper function to enable/disable vports

vports needs to be enabled in switchdev and legacy mode.

In switchdev mode, vports should be enabled after initializing
the FDB tables and before creating their represntors so that
representor works on an initialized vport object.

Prepare a helper function which can be called when enabling either of
the eswitch modes.

Similarly, have disable vports helper function.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h