]> git.dujemihanovic.xyz Git - linux.git/commit
net/mlx5e: kTLS, Fix protection domain in use syndrome when devlink reload
authorJianbo Liu <jianbol@nvidia.com>
Mon, 8 May 2023 03:36:10 +0000 (03:36 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 26 Jul 2023 21:31:04 +0000 (14:31 -0700)
commit3e4cf1dd2ce413f4be3e2c9062fb470e2ad2be88
treea7f05d1c777c01da083d3fac6e4f50b240a6d5f8
parenteb02b93aad952008f1692cee5c5b13001e908407
net/mlx5e: kTLS, Fix protection domain in use syndrome when devlink reload

There are DEK objects cached in DEK pool after kTLS is used, and they
are freed only in mlx5e_ktls_cleanup().

mlx5e_destroy_mdev_resources() is called in mlx5e_suspend() to
free mdev resources, including protection domain (PD). However, PD is
still referenced by the cached DEK objects in this case, because
profile->cleanup() (and therefore mlx5e_ktls_cleanup()) is called
after mlx5e_suspend() during devlink reload. So the following FW
syndrome is generated:

 mlx5_cmd_out_err:803:(pid 12948): DEALLOC_PD(0x801) op_mod(0x0) failed,
    status bad resource state(0x9), syndrome (0xef0c8a), err(-22)

To avoid this syndrome, move DEK pool destruction to
mlx5e_ktls_cleanup_tx(), which is called by profile->cleanup_tx(). And
move pool creation to mlx5e_ktls_init_tx() for symmetry.

Fixes: f741db1a5171 ("net/mlx5e: kTLS, Improve connection rate by using fast update encryption key")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c