.. | .. |
---|
37 | 37 | struct mlx5_vxlan; |
---|
38 | 38 | struct mlx5_vxlan_port; |
---|
39 | 39 | |
---|
| 40 | +static inline u8 mlx5_vxlan_max_udp_ports(struct mlx5_core_dev *mdev) |
---|
| 41 | +{ |
---|
| 42 | + return MLX5_CAP_ETH(mdev, max_vxlan_udp_ports) ?: 4; |
---|
| 43 | +} |
---|
| 44 | + |
---|
40 | 45 | static inline bool mlx5_vxlan_allowed(struct mlx5_vxlan *vxlan) |
---|
41 | 46 | { |
---|
42 | 47 | /* not allowed reason is encoded in vxlan pointer as error, |
---|
.. | .. |
---|
50 | 55 | void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan); |
---|
51 | 56 | int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port); |
---|
52 | 57 | int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port); |
---|
53 | | -struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port); |
---|
| 58 | +bool mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port); |
---|
| 59 | +void mlx5_vxlan_reset_to_default(struct mlx5_vxlan *vxlan); |
---|
54 | 60 | #else |
---|
55 | 61 | static inline struct mlx5_vxlan* |
---|
56 | 62 | mlx5_vxlan_create(struct mlx5_core_dev *mdev) { return ERR_PTR(-EOPNOTSUPP); } |
---|
57 | 63 | static inline void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan) { return; } |
---|
58 | 64 | static inline int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } |
---|
59 | 65 | static inline int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } |
---|
60 | | -static inline struct mx5_vxlan_port* |
---|
61 | | -mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { return NULL; } |
---|
| 66 | +static inline bool mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { return false; } |
---|
| 67 | +static inline void mlx5_vxlan_reset_to_default(struct mlx5_vxlan *vxlan) { return; } |
---|
62 | 68 | #endif |
---|
63 | 69 | |
---|
64 | 70 | #endif /* __MLX5_VXLAN_H__ */ |
---|