Skip to content

Commit 363c5a5

Browse files
aviadyejgunthorpe
authored andcommitted
{net,IB}/mlx5: Add ipsec helper
Simple wrapper to understand if we are dealing with IPsec flow. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 349705c commit 363c5a5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎include/linux/mlx5/fs_helpers.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
#define MLX5_FS_IPV4_VERSION 4
3939
#define MLX5_FS_IPV6_VERSION 6
4040

41+
static inline bool mlx5_fs_is_ipsec_flow(const u32 *match_c)
42+
{
43+
void *misc_params_c = MLX5_ADDR_OF(fte_match_param, match_c,
44+
misc_parameters);
45+
46+
return MLX5_GET(fte_match_set_misc, misc_params_c, outer_esp_spi);
47+
}
48+
4149
static inline bool _mlx5_fs_is_outer_ipproto_flow(const u32 *match_c,
4250
const u32 *match_v, u8 match)
4351
{

0 commit comments

Comments
 (0)