Skip to content

Commit

Permalink
net/mlx5e: kTLS, Destroy key object after destroying the TIS
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Tariq Toukan authored and Saeed Mahameed committed May 23, 2020
1 parent 3213484 commit 16736e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ static void mlx5e_ktls_del(struct net_device *netdev,
struct mlx5e_ktls_offload_context_tx *tx_priv =
mlx5e_get_ktls_tx_priv_ctx(tls_ctx);

mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
mlx5e_destroy_tis(priv->mdev, tx_priv->tisn);
mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
kvfree(tx_priv);
}

Expand Down

0 comments on commit 16736e1

Please sign in to comment.