]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Don't hide fallback to software IPsec in FS code
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 1 Mar 2022 09:55:25 +0000 (11:55 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 05:59:14 +0000 (22:59 -0700)
commit512ca6d5ab928833a9a023cf5912d3389abb6b26
tree593c6ff2424c487d2bef4d909063426be5766f69
parented383a003ae0e3b915a376d842ed9c458ed430e2
net/mlx5: Don't hide fallback to software IPsec in FS code

The XFRM code performs fallback to software IPsec if .xdo_dev_state_add()
returns -EOPNOTSUPP. This is what mlx5 did very deep in its stack trace,
despite have all the knowledge that IPsec is not going to work in very
early stage.

This is achieved by making sure that priv->ipsec pointer is valid for
fully working and supported hardware crypto IPsec engine.

In case, the hardware IPsec is not supported, the XFRM code will set NULL
to xso->dev and it will prevent from calls to various .xdo_dev_state_*()
callbacks.

Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c