crypto/mlx5: create login object using DevX
authorShiri Kuzin <shirik@nvidia.com>
Tue, 20 Jul 2021 13:09:36 +0000 (16:09 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 20 Jul 2021 20:27:00 +0000 (22:27 +0200)
commitdebb27ea344242ef0c5c6577e0187ac1d64ca429
tree7df7a3daf55c42672199caaa5b1f47b62e39729a
parent247ad1305a8c7318d4d0b62d7a2b57cc7d4ba2f3
crypto/mlx5: create login object using DevX

To work with crypto engines that are marked with wrapped_import_method,
a login session is required.
A crypto login object needs to be created using DevX.

The crypto login object contains:
- The credential pointer.
- The import_KEK pointer to be used for all secured information
  communicated in crypto commands (key fields), including the
  provided credential in this command.
- The credential secret, wrapped by the import_KEK indicated in
  this command. Size includes 8 bytes IV for wrapping.

Added devargs for the required login values:
- wcs_file - path to the file containing the credential.
- import_kek_id - the import KEK pointer.
- credential_id - the credential pointer.

Create the login DevX object in pci_probe function and destroy it in
pci_remove.
Destroying the crypto login object means logout.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
doc/guides/cryptodevs/mlx5.rst
drivers/crypto/mlx5/mlx5_crypto.c
drivers/crypto/mlx5/mlx5_crypto.h