summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5/ib_rep.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-05-29 22:50:41 +0000
committerSaeed Mahameed <saeedm@mellanox.com>2019-05-31 12:28:14 -0700
commit8693115af4c24d92b971ad895c5f329761ed5d38 (patch)
tree1798bbac2ed974f1b29257a6de2fed1f7cad322d /drivers/infiniband/hw/mlx5/ib_rep.h
parentc94ff7487754dd23159a8dc47466c0cc82121ebd (diff)
{IB,net}/mlx5: Constify rep ops functions pointers
Currently for every representor type and for every single vport, representer function pointers copy is stored even though they don't change from one to other vport. Additionally priv data entry for the rep is not passed during registration, but its copied. It is used (set and cleared) by the user of the reps. As we want to scale vports, to simplify and also to split constants from data, 1. Rename mlx5_eswitch_rep_if to mlx5_eswitch_rep_ops as to match _ops prefix with other standard netdev, ibdev ops. 2. Constify the IB and Ethernet rep ops structure. 3. Instead of storing copy of all rep function pointers, store copy per eswitch rep type. 4. Split data and function pointers to mlx5_eswitch_rep_ops and mlx5_eswitch_rep_data. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/ib_rep.h')
-rw-r--r--drivers/infiniband/hw/mlx5/ib_rep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/ib_rep.h b/drivers/infiniband/hw/mlx5/ib_rep.h
index c995102b0276..22adce2d6795 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.h
+++ b/drivers/infiniband/hw/mlx5/ib_rep.h
@@ -72,6 +72,6 @@ struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
static inline
struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep)
{
- return rep->rep_if[REP_IB].priv;
+ return rep->rep_data[REP_IB].priv;
}
#endif /* __MLX5_IB_REP_H__ */