diff options
author | Mohamad Haj Yahia <mohamad@mellanox.com> | 2016-09-09 17:35:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-11 07:21:50 +0300 |
commit | 1ab2068a4c663cbb2e0e0cfea934bc4e163abed0 (patch) | |
tree | 7e01da99ca132302aeb646794c2227ae272792d6 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | |
parent | c2d6e31a0008f8188f935f8dd81c81c44697b256 (diff) | |
download | linux-1ab2068a4c663cbb2e0e0cfea934bc4e163abed0.tar.xz |
net/mlx5: Implement vports admin state backup/restore
Save the user configuration in the vport sturct.
Restore saved old configuration upon vport enable.
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index 48c273d5b709..6855783f3bb3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -109,6 +109,16 @@ struct vport_egress { struct mlx5_flow_rule *drop_rule; }; +struct mlx5_vport_info { + u8 mac[ETH_ALEN]; + u16 vlan; + u8 qos; + u64 node_guid; + int link_state; + bool spoofchk; + bool trusted; +}; + struct mlx5_vport { struct mlx5_core_dev *dev; int vport; @@ -121,10 +131,8 @@ struct mlx5_vport { struct vport_ingress ingress; struct vport_egress egress; - u16 vlan; - u8 qos; - bool spoofchk; - bool trusted; + struct mlx5_vport_info info; + bool enabled; u16 enabled_events; }; |