diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2022-12-02 20:41:28 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2022-12-05 10:32:44 +0100 |
commit | 62f6eca5de103c6823f6ca2abbf2ee242e132207 (patch) | |
tree | 0f12f6e5c4e0a97d25e1f7b1c29171c22ac94763 /drivers/net/ethernet/mellanox/mlx5/core | |
parent | d14f28b8c1de668bab863bf5892a49c824cb110d (diff) | |
download | linux-stable-62f6eca5de103c6823f6ca2abbf2ee242e132207.tar.gz linux-stable-62f6eca5de103c6823f6ca2abbf2ee242e132207.tar.bz2 linux-stable-62f6eca5de103c6823f6ca2abbf2ee242e132207.zip |
xfrm: allow state packet offload mode
Allow users to configure xfrm states with packet offload mode.
The packet mode must be requested both for policy and state, and
such requires us to do not implement fallback.
We explicitly return an error if requested packet mode can't
be configured.
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c index 1b03ab03fc5a..e6411533f911 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -253,6 +253,10 @@ static inline int mlx5e_xfrm_validate_state(struct xfrm_state *x) netdev_info(netdev, "Cannot offload xfrm states with geniv other than seqiv\n"); return -EINVAL; } + if (x->xso.type != XFRM_DEV_OFFLOAD_CRYPTO) { + netdev_info(netdev, "Unsupported xfrm offload type\n"); + return -EINVAL; + } return 0; } |