diff options
author | Parav Pandit | 2019-05-30 00:50:41 +0200 |
---|---|---|
committer | Saeed Mahameed | 2019-05-31 21:28:14 +0200 |
commit | 8693115af4c24d92b971ad895c5f329761ed5d38 (patch) | |
tree | 1798bbac2ed974f1b29257a6de2fed1f7cad322d /drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | |
parent | {IB, net}/mlx5: No need to typecast from void* to mlx5_ib_dev* (diff) | |
download | kernel-qcow2-linux-8693115af4c24d92b971ad895c5f329761ed5d38.tar.gz kernel-qcow2-linux-8693115af4c24d92b971ad895c5f329761ed5d38.tar.xz kernel-qcow2-linux-8693115af4c24d92b971ad895c5f329761ed5d38.zip |
{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/net/ethernet/mellanox/mlx5/core/en_rep.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h index c40c025afd99..e34573fd88c1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h @@ -91,7 +91,7 @@ struct mlx5e_rep_priv { static inline struct mlx5e_rep_priv *mlx5e_rep_to_rep_priv(struct mlx5_eswitch_rep *rep) { - return rep->rep_if[REP_ETH].priv; + return rep->rep_data[REP_ETH].priv; } struct mlx5e_neigh { |