Skip to content

Commit 16736e1

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: kTLS, Destroy key object after destroying the TIS
The TLS TIS object contains the dek/key ID. By destroying the key first, the TIS would contain an invalid non-existing key ID. Reverse the destroy order, this also acheives the desired assymetry between the destroy and the create flows. Fixes: d2ead1f ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Boris Pismenny <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 3213484 commit 16736e1

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ static void mlx5e_ktls_del(struct net_device *netdev,
6969
struct mlx5e_ktls_offload_context_tx *tx_priv =
7070
mlx5e_get_ktls_tx_priv_ctx(tls_ctx);
7171

72-
mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
7372
mlx5e_destroy_tis(priv->mdev, tx_priv->tisn);
73+
mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
7474
kvfree(tx_priv);
7575
}
7676

0 commit comments

Comments
 (0)