diff options
author | Mark Bloch | 2017-12-07 21:55:10 +0100 |
---|---|---|
committer | Saeed Mahameed | 2017-12-28 11:36:33 +0100 |
commit | 5ed99fb421d4d5cd4cba613c1ab115585aa277d2 (patch) | |
tree | a6b95b90a93bb4eb3cd5c912983bf8f4800c8a87 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | |
parent | net/mlx5: E-Switch, Create a dedicated send to vport rule deletion function (diff) | |
download | kernel-qcow2-linux-5ed99fb421d4d5cd4cba613c1ab115585aa277d2.tar.gz kernel-qcow2-linux-5ed99fb421d4d5cd4cba613c1ab115585aa277d2.tar.xz kernel-qcow2-linux-5ed99fb421d4d5cd4cba613c1ab115585aa277d2.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index 9ed401225225..3a21ea4e4d24 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -142,12 +142,9 @@ struct mlx5_eswitch_rep { int (*load)(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep); void (*unload)(struct mlx5_eswitch_rep *rep); + void *priv; u16 vport; u8 hw_id[ETH_ALEN]; - struct net_device *netdev; - - struct mlx5_flow_handle *vport_rx_rule; - struct list_head vport_sqs_list; u16 vlan; u32 vlan_refcount; bool valid; @@ -274,7 +271,7 @@ void mlx5_eswitch_register_vport_rep(struct mlx5_eswitch *esw, struct mlx5_eswitch_rep *rep); void mlx5_eswitch_unregister_vport_rep(struct mlx5_eswitch *esw, int vport_index); -struct net_device *mlx5_eswitch_get_uplink_netdev(struct mlx5_eswitch *esw); +void *mlx5_eswitch_get_uplink_priv(struct mlx5_eswitch *esw); int mlx5_eswitch_add_vlan_action(struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *attr); |