hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/infiniband/hw/mlx5/ib_rep.h
....@@ -9,28 +9,31 @@
99 #include <linux/mlx5/eswitch.h>
1010 #include "mlx5_ib.h"
1111
12
+extern const struct mlx5_ib_profile raw_eth_profile;
13
+
1214 #ifdef CONFIG_MLX5_ESWITCH
1315 u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw);
1416 struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
15
- int vport_index);
17
+ u16 vport_num);
1618 struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw);
1719 struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
18
- int vport_index);
19
-void mlx5_ib_register_vport_reps(struct mlx5_ib_dev *dev);
20
-void mlx5_ib_unregister_vport_reps(struct mlx5_ib_dev *dev);
21
-int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
22
- struct mlx5_ib_sq *sq);
20
+ u16 vport_num);
21
+void mlx5_ib_register_vport_reps(struct mlx5_core_dev *mdev);
22
+void mlx5_ib_unregister_vport_reps(struct mlx5_core_dev *mdev);
23
+struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
24
+ struct mlx5_ib_sq *sq,
25
+ u16 port);
2326 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
24
- int vport_index);
27
+ u16 vport_num);
2528 #else /* CONFIG_MLX5_ESWITCH */
2629 static inline u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw)
2730 {
28
- return SRIOV_NONE;
31
+ return MLX5_ESWITCH_NONE;
2932 }
3033
3134 static inline
3235 struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
33
- int vport_index)
36
+ u16 vport_num)
3437 {
3538 return NULL;
3639 }
....@@ -43,22 +46,24 @@
4346
4447 static inline
4548 struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
46
- int vport_index)
49
+ u16 vport_num)
4750 {
4851 return NULL;
4952 }
5053
51
-static inline void mlx5_ib_register_vport_reps(struct mlx5_ib_dev *dev) {}
52
-static inline void mlx5_ib_unregister_vport_reps(struct mlx5_ib_dev *dev) {}
53
-static inline int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
54
- struct mlx5_ib_sq *sq)
54
+static inline void mlx5_ib_register_vport_reps(struct mlx5_core_dev *mdev) {}
55
+static inline void mlx5_ib_unregister_vport_reps(struct mlx5_core_dev *mdev) {}
56
+static inline
57
+struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
58
+ struct mlx5_ib_sq *sq,
59
+ u16 port)
5560 {
56
- return 0;
61
+ return NULL;
5762 }
5863
5964 static inline
6065 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
61
- int vport_index)
66
+ u16 vport_num)
6267 {
6368 return NULL;
6469 }
....@@ -67,6 +72,6 @@
6772 static inline
6873 struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep)
6974 {
70
- return (struct mlx5_ib_dev *)rep->rep_if[REP_IB].priv;
75
+ return rep->rep_data[REP_IB].priv;
7176 }
7277 #endif /* __MLX5_IB_REP_H__ */