This source file includes following definitions.
- mlx5_accel_esp_create_hw_context
- mlx5_accel_esp_free_hw_context
- mlx5_accel_ipsec_init
- mlx5_accel_ipsec_build_fs_cmds
- mlx5_accel_ipsec_cleanup
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
33
34 #ifndef __MLX5_ACCEL_IPSEC_H__
35 #define __MLX5_ACCEL_IPSEC_H__
36
37 #include <linux/mlx5/driver.h>
38 #include <linux/mlx5/accel.h>
39
40 #ifdef CONFIG_MLX5_FPGA_IPSEC
41
42 #define MLX5_IPSEC_DEV(mdev) (mlx5_accel_ipsec_device_caps(mdev) & \
43 MLX5_ACCEL_IPSEC_CAP_DEVICE)
44
45 unsigned int mlx5_accel_ipsec_counters_count(struct mlx5_core_dev *mdev);
46 int mlx5_accel_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters,
47 unsigned int count);
48
49 void *mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev,
50 struct mlx5_accel_esp_xfrm *xfrm,
51 const __be32 saddr[4],
52 const __be32 daddr[4],
53 const __be32 spi, bool is_ipv6);
54 void mlx5_accel_esp_free_hw_context(void *context);
55
56 int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev);
57 void mlx5_accel_ipsec_build_fs_cmds(void);
58 void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev);
59
60 #else
61
62 #define MLX5_IPSEC_DEV(mdev) false
63
64 static inline void *
65 mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev,
66 struct mlx5_accel_esp_xfrm *xfrm,
67 const __be32 saddr[4],
68 const __be32 daddr[4],
69 const __be32 spi, bool is_ipv6)
70 {
71 return NULL;
72 }
73
74 static inline void mlx5_accel_esp_free_hw_context(void *context)
75 {
76 }
77
78 static inline int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev)
79 {
80 return 0;
81 }
82
83 static inline void mlx5_accel_ipsec_build_fs_cmds(void)
84 {
85 }
86
87 static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev)
88 {
89 }
90
91 #endif
92
93 #endif