aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
diff options
context:
space:
mode:
authorMohamad Haj Yahia <mohamad@mellanox.com>2016-09-09 17:35:24 +0300
committerDavid S. Miller <davem@davemloft.net>2016-09-10 21:21:50 -0700
commit1ab2068a4c663cbb2e0e0cfea934bc4e163abed0 (patch)
tree7e01da99ca132302aeb646794c2227ae272792d6 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
parentnet/mlx5: Align sriov/eswitch modules with the new load/unload flow. (diff)
downloadlinux-dev-1ab2068a4c663cbb2e0e0cfea934bc4e163abed0.tar.xz
linux-dev-1ab2068a4c663cbb2e0e0cfea934bc4e163abed0.zip
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.h16
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;
};