diff options
author | Aviad Yehezkel <aviadye@mellanox.com> | 2018-03-28 09:27:52 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-04 12:06:27 -0600 |
commit | 363c5a570d4a386fa1bf8d3833de817d7c4fcda2 (patch) | |
tree | 70ebd6cf046a4f6575156d57ca39887125c47fe0 /include/linux/mlx5 | |
parent | 349705c1936269aa6e5f923a0bc663e1addf288e (diff) | |
download | linux-stable-363c5a570d4a386fa1bf8d3833de817d7c4fcda2.tar.gz linux-stable-363c5a570d4a386fa1bf8d3833de817d7c4fcda2.tar.bz2 linux-stable-363c5a570d4a386fa1bf8d3833de817d7c4fcda2.zip |
{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>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/fs_helpers.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mlx5/fs_helpers.h b/include/linux/mlx5/fs_helpers.h index 7b476bbae731..9db21cd0e92c 100644 --- a/include/linux/mlx5/fs_helpers.h +++ b/include/linux/mlx5/fs_helpers.h @@ -38,6 +38,14 @@ #define MLX5_FS_IPV4_VERSION 4 #define MLX5_FS_IPV6_VERSION 6 +static inline bool mlx5_fs_is_ipsec_flow(const u32 *match_c) +{ + void *misc_params_c = MLX5_ADDR_OF(fte_match_param, match_c, + misc_parameters); + + return MLX5_GET(fte_match_set_misc, misc_params_c, outer_esp_spi); +} + static inline bool _mlx5_fs_is_outer_ipproto_flow(const u32 *match_c, const u32 *match_v, u8 match) { |