This source file includes following definitions.
- mlx5_vxlan_allowed
- mlx5_vxlan_create
- mlx5_vxlan_destroy
- mlx5_vxlan_add_port
- mlx5_vxlan_del_port
- mlx5_vxlan_lookup_port
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 #ifndef __MLX5_VXLAN_H__
33 #define __MLX5_VXLAN_H__
34
35 #include <linux/mlx5/driver.h>
36
37 struct mlx5_vxlan;
38 struct mlx5_vxlan_port;
39
40 static inline bool mlx5_vxlan_allowed(struct mlx5_vxlan *vxlan)
41 {
42
43
44
45 return !IS_ERR_OR_NULL(vxlan);
46 }
47
48 #if IS_ENABLED(CONFIG_VXLAN)
49 struct mlx5_vxlan *mlx5_vxlan_create(struct mlx5_core_dev *mdev);
50 void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan);
51 int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port);
52 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);
54 #else
55 static inline struct mlx5_vxlan*
56 mlx5_vxlan_create(struct mlx5_core_dev *mdev) { return ERR_PTR(-EOPNOTSUPP); }
57 static inline void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan) { return; }
58 static inline int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; }
59 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; }
62 #endif
63
64 #endif