-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/mlx5: introduce Mellanox crypto driver
Add a new PMD for Mellanox devices- crypto PMD. The crypto PMD will be supported starting Nvidia ConnectX6 and BlueField2. The crypto PMD will add the support of encryption and decryption using the AES-XTS symmetric algorithm. The crypto PMD requires rdma-core and uses mlx5 DevX. This patch adds the PCI probing, basic functions, build files and log utility. Signed-off-by: Shiri Kuzin <[email protected]> Acked-by: Matan Azrad <[email protected]> Acked-by: Akhil Goyal <[email protected]>
- Loading branch information
Shiri Kuzin
authored and
Akhil Goyal
committed
Jul 20, 2021
1 parent
6425d95
commit a7c8688
Showing
13 changed files
with
463 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1102,6 +1102,12 @@ F: drivers/crypto/octeontx2/ | |
F: doc/guides/cryptodevs/octeontx2.rst | ||
F: doc/guides/cryptodevs/features/octeontx2.ini | ||
|
||
Mellanox mlx5 | ||
M: Matan Azrad <[email protected]> | ||
F: drivers/crypto/mlx5/ | ||
F: doc/guides/cryptodevs/mlx5.rst | ||
F: doc/guides/cryptodevs/features/mlx5.ini | ||
|
||
Null Crypto | ||
M: Declan Doherty <[email protected]> | ||
F: drivers/crypto/null/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
; | ||
; Features of a mlx5 crypto driver. | ||
; | ||
; Refer to default.ini for the full list of available PMD features. | ||
; | ||
[Features] | ||
HW Accelerated = Y | ||
|
||
; | ||
; Supported crypto algorithms of a mlx5 crypto driver. | ||
; | ||
[Cipher] | ||
|
||
; | ||
; Supported authentication algorithms of a mlx5 crypto driver. | ||
; | ||
[Auth] | ||
|
||
; | ||
; Supported AEAD algorithms of a mlx5 crypto driver. | ||
; | ||
[AEAD] | ||
|
||
; | ||
; Supported Asymmetric algorithms of a mlx5 crypto driver. | ||
; | ||
[Asymmetric] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ Crypto Device Drivers | |
octeontx | ||
octeontx2 | ||
openssl | ||
mlx5 | ||
mvsam | ||
nitrox | ||
null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.. SPDX-License-Identifier: BSD-3-Clause | ||
Copyright (c) 2021 NVIDIA Corporation & Affiliates | ||
.. include:: <isonum.txt> | ||
|
||
MLX5 Crypto Driver | ||
================== | ||
|
||
The MLX5 crypto driver library | ||
(**librte_crypto_mlx5**) provides support for **Mellanox ConnectX-6** | ||
family adapters. | ||
|
||
Overview | ||
-------- | ||
|
||
The device can provide disk encryption services, | ||
allowing data encryption and decryption towards a disk. | ||
Having all encryption/decryption operations done in a single device | ||
can reduce cost and overheads of the related FIPS certification, | ||
as ConnectX-6 is FIPS 140-2 level-2 ready. | ||
The encryption cipher is AES-XTS of 256/512 bit key size. | ||
|
||
MKEY is a memory region object in the hardware, | ||
that holds address translation information and attributes per memory area. | ||
Its ID must be tied to addresses provided to the hardware. | ||
The encryption operations are performed with MKEY read/write transactions, | ||
when the MKEY is configured to perform crypto operations. | ||
|
||
The encryption does not require text to be aligned to the AES block size (128b). | ||
|
||
The PMD uses ``libibverbs`` and ``libmlx5`` to access the device firmware | ||
or to access the hardware components directly. | ||
There are different levels of objects and bypassing abilities. | ||
To get the best performances: | ||
|
||
- Verbs is a complete high-level generic API. | ||
- Direct Verbs is a device-specific API. | ||
- DevX allows to access firmware objects. | ||
|
||
Enabling ``librte_crypto_mlx5`` causes DPDK applications | ||
to be linked against libibverbs. | ||
|
||
|
||
Driver options | ||
-------------- | ||
|
||
- ``class`` parameter [string] | ||
|
||
Select the class of the driver that should probe the device. | ||
`crypto` for the mlx5 crypto driver. | ||
|
||
|
||
Supported NICs | ||
-------------- | ||
|
||
* Mellanox\ |reg| ConnectX\ |reg|-6 200G MCX654106A-HCAT (2x200G) | ||
|
||
Prerequisites | ||
------------- | ||
|
||
- Mellanox OFED version: **5.3** | ||
see :doc:`../../nics/mlx5` guide for more Mellanox OFED details. | ||
|
||
- Compilation can be done also with rdma-core v15+. | ||
see :doc:`../../nics/mlx5` guide for more rdma-core details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ drivers = [ | |
'dpaa_sec', | ||
'dpaa2_sec', | ||
'kasumi', | ||
'mlx5', | ||
'mvsam', | ||
'nitrox', | ||
'null', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) 2021 NVIDIA Corporation & Affiliates | ||
|
||
if not is_linux | ||
build = false | ||
reason = 'only supported on Linux' | ||
subdir_done() | ||
endif | ||
|
||
fmt_name = 'mlx5_crypto' | ||
deps += ['common_mlx5', 'eal', 'cryptodev'] | ||
sources = files( | ||
'mlx5_crypto.c', | ||
) | ||
|
||
cflags_options = [ | ||
'-std=c11', | ||
'-Wno-strict-prototypes', | ||
'-D_BSD_SOURCE', | ||
'-D_DEFAULT_SOURCE', | ||
'-D_XOPEN_SOURCE=600', | ||
] | ||
foreach option:cflags_options | ||
if cc.has_argument(option) | ||
cflags += option | ||
endif | ||
endforeach |
Oops, something went wrong.