Commit 1ab2068a authored by Mohamad Haj Yahia's avatar Mohamad Haj Yahia Committed by David S. Miller

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: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2d6e31a
...@@ -109,6 +109,16 @@ struct vport_egress { ...@@ -109,6 +109,16 @@ struct vport_egress {
struct mlx5_flow_rule *drop_rule; 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_vport {
struct mlx5_core_dev *dev; struct mlx5_core_dev *dev;
int vport; int vport;
...@@ -121,10 +131,8 @@ struct mlx5_vport { ...@@ -121,10 +131,8 @@ struct mlx5_vport {
struct vport_ingress ingress; struct vport_ingress ingress;
struct vport_egress egress; struct vport_egress egress;
u16 vlan; struct mlx5_vport_info info;
u8 qos;
bool spoofchk;
bool trusted;
bool enabled; bool enabled;
u16 enabled_events; u16 enabled_events;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment