Mellanox crypto drivers not working with DPDK

Hello,
I’m trying to use Mellanox ConnectX-6 NICs along with DPDK. I’m unable to execute the sample applications as specified in this docs: [15. NVIDIA MLX5 Crypto Driver — Data Plane Development Kit 23.03.0-rc1 documentation (dpdk.org)]
(https://doc.dpdk.org/guides/cryptodevs/mlx5.html). DPDK is not able to detect the mellanox crypto driver at all.

I’m using MLNX_OFED_LINUX-5.9-0.5.6.0 (OFED-5.9-0.5.6) driver along with ConnectX-6 Dx NIC.

Moreover, I’m unable to get/set registers on the crypto device for wrapped/plaintext configuration. Here is a sample error:
node-0:~> sudo mlxreg -d /dev/mst/mt4119_pciconf0.1 --reg_name CRYPTO_OPERATIONAL --get
Sending access register…

-E- Failed to send access register: ME_ICMD_OPERATIONAL_ERROR

Here are the logs from execution of the DPDK application:
node-0:~> sudo ./dpdk/build/app/test/dpdk-test -c 1 -n 1 -a ca:00.0,class=crypto cryptodev_mlx5_autotest – --driver-name mlx5EAL: PCI device 0000:ca:00.0 on NUMA socket 1
mlx5_pci
EAL: Probe PCI driver: mlx5_pci (15b3:101d) device: 0000:ca:00.0 (socket 1)EAL: Detected CPU lcores: 128
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode ‘PA’
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:101d) device: 0000:ca:00.0 (socket 1)
mlx5_crypto: Not enough capabilities to support crypto operations, maybe old FW/OFED version?
mlx5_common: Failed to load driver crypto_mlx5
EAL: Requested device 0000:ca:00.0 cannot be used
EAL: Bus (pci) probe failed.
TELEMETRY: No legacy callbacks, legacy socket not created
APP: HPET is not enabled, using TSC as default timer
APP: Invalid test requested: ‘–driver-name’
APP: Invalid test requested: ‘mlx5EAL:’
APP: Invalid test requested: ‘PCI’
APP: Invalid test requested: ‘device’
APP: Invalid test requested: ‘0000:ca:00.0’
APP: Invalid test requested: ‘on’
APP: Invalid test requested: ‘NUMA’
APP: Invalid test requested: ‘socket’
APP: Invalid test requested: ‘1’
RTE>>cryptodev_mlx5_autotest

  • ------------------------------------------------------- +
  • Test Suite : Cryptodev Unit Test Suite
    USER1: No crypto devices found?
  • ------------------------------------------------------- +
  • Test Suite Summary : Cryptodev Unit Test Suite
  • ------------------------------------------------------- +
  • AES Chain : 0/57 passed, 57/57 skipped, 0/57 failed, 0/57 unsupported
  • AES Cipher Only : 0/65 passed, 65/65 skipped, 0/65 failed, 0/65 unsupported
  • AES Docsis : 0/24 passed, 24/24 skipped, 0/24 failed, 0/24 unsupported
  • 3DES Chain : 0/20 passed, 20/20 skipped, 0/20 failed, 0/20 unsupported
  • 3DES Cipher Only : 0/10 passed, 10/10 skipped, 0/10 failed, 0/10 unsupported
  • DES Cipher Only : 0/2 passed, 2/2 skipped, 0/2 failed, 0/2 unsupported
  • DES Docsis : 0/12 passed, 12/12 skipped, 0/12 failed, 0/12 unsupported
  • Auth Only : 0/36 passed, 36/36 skipped, 0/36 failed, 0/36 unsupported
  • Multi Session Unit Test Suite : 0/2 passed, 2/2 skipped, 0/2 failed, 0/2 unsupported
  • NULL Test Suite : 0/2 passed, 2/2 skipped, 0/2 failed, 0/2 unsupported
  • AES CCM Authenticated Test Suite : 0/18 passed, 18/18 skipped, 0/18 failed, 0/18 unsupported
  • AES GCM Authenticated Test Suite : 0/58 passed, 58/58 skipped, 0/58 failed, 0/58 unsupported
  • AES GMAC Authentication Test Suite : 0/12 passed, 12/12 skipped, 0/12 failed, 0/12 unsupported
  • SNOW 3G Test Suite : 0/47 passed, 47/47 skipped, 0/47 failed, 0/47 unsupported
  • Chacha20-Poly1305 Test Suite : 0/3 passed, 3/3 skipped, 0/3 failed, 0/3 unsupported
  • ZUC Test Suite : 0/31 passed, 31/31 skipped, 0/31 failed, 0/31 unsupported
  • HMAC_MD5 Authentication Test Suite : 0/4 passed, 4/4 skipped, 0/4 failed, 0/4 unsupported
  • Kasumi Test Suite : 0/36 passed, 36/36 skipped, 0/36 failed, 0/36 unsupported
  • ESN Test Suite : 0/2 passed, 2/2 skipped, 0/2 failed, 0/2 unsupported
  • Negative AES GCM Test Suite : 0/12 passed, 12/12 skipped, 0/12 failed, 0/12 unsupported
  • Negative AES GMAC Test Suite : 0/2 passed, 2/2 skipped, 0/2 failed, 0/2 unsupported
  • Mixed CIPHER + HASH algorithms Test Suite : 0/32 passed, 32/32 skipped, 0/32 failed, 0/32 unsupported
  • Negative HMAC SHA1 Unit Test Suite : 0/4 passed, 4/4 skipped, 0/4 failed, 0/4 unsupported
  • Crypto General Unit Test Suite : 0/6 passed, 6/6 skipped, 0/6 failed, 0/6 unsupported
  • IPsec Proto Unit Test Suite : 0/59 passed, 59/59 skipped, 0/59 failed, 0/59 unsupported
  • PDCP Proto Unit Test Suite : 0/1 passed, 1/1 skipped, 0/1 failed, 0/1 unsupported
  • DOCSIS Proto Unit Test Suite : 0/52 passed, 52/52 skipped, 0/52 failed, 0/52 unsupported
  • ------------------------------------------------------- +
  • Sub Testsuites Total : 27
  • Sub Testsuites Skipped : 27
  • Sub Testsuites Passed : 0
  • Sub Testsuites Failed : 0
  • ------------------------------------------------------- +
  • Tests Total : 609
  • Tests Skipped : 609
  • Tests Executed : 0
  • Tests Unsupported: 0
  • Tests Passed : 0
  • Tests Failed : 0
  • ------------------------------------------------------- +
    Test Skipped

Any guidance is much appreciated.

Hello ckeshavabs,

Thank you for posting your query on our community. Based on the output provided, the mlxreg utility is unable to properly change the register value which could mean that the driver is not loaded properly. Please ensure that the MOFED drivers are loaded properly. Once verified, please reboot the server and give it another try.

If the issue still persists, We would recommend opening a support case for further investigation of the issue. The support ticket can be opened by emailing " Networking-support@nvidia.com "

Please note that an active support contract would be required for the same. If you do not have a current support contract, please reach out to our Contracts team at networking-contracts@nvidia.com

Thank you,
-Nvidia Network Support

Hello,
Thank you for getting back to me. I’m not convinced that that mlxreg command is not working correctly. Other mlxreg commands are working as expected, except for the --get and --set commands.

For example, here is an example for displaying all the registers on the device:
node-0:~/mft-4.22.1-11-x86_64-deb> sudo mlxreg -d /dev/mst/mt4125_pciconf0.1 --reg_name CRYPTO_OPERATIONAL --get
Sending access register…

-E- Failed to send access register: ME_ICMD_OPERATIONAL_ERROR
node-0:~/mft-4.22.1-11-x86_64-deb> sudo mlxreg -d /dev/mst/mt4125_pciconf0.1 --show_regs
Available Access Registers

CHLMM
CHLTM
CHLTR
CNCT
CNMC
CPCS
CPID
CPQE
CREDENTIAL_HANDLE
CRYPTO_OPERATIONAL
CWCAM
CWGCR
CWPP
CWTP
CWTPM
DB_TRESHOLD
DCBX_APPLICATION
DCBX_PARAM
FORE
FP_SL_MAP
HCA_CMD_ENCAP
HOST_ENDIANNESS
IMPORT_KEK_HANDLE
Loopback_Control_Register
MBCT
MCAM
MCC
MCDA
MCDD
MCIA
MCION
MCPP
MCQI
MCQS
MDCR
MDDC
MDDQ
MDDT
MDFCR
MDIR
MDRCR
MDSR
MECCC
MERR
MFBA
MFBE
MFCR
MFM
MFMC
MFNR
MFPA
MFRL
MFSC
MFSL
MFSM
MFSV
MGCR
MGIR
MGNLE
MGPIR
MHMPR
MHSR
MINI
MIRC
MISC_COUNTERS
MJTAG
MKDC
MLCR
MMDIO
MMHI
MMIA
MNVDA
MNVDI
MNVGC
MNVGN
MNVIA
MNVQC
MPCIR
MPCNT
MPECS
MPEGC
MPEIN
MPEINJ
MPFM
MPGO
MPIR
MQDIK
MQIS
MRPR
MRSR
MRTC
MSECQ
MSEES
MSGI
MSPI
MSPMER
MSPS
MSSIR
MTBR
MTCAP
MTCQ
MTECR
MTEWE
MTMP
MTPPS
MTRC_CAP
MTRC_CONF
MTRC_CTRL
MTRC_STDB
MTUTC
MTWE
MVCAP
MVCR
NCFG
NVMF_TARGET_PACER_DEFAULTS
PAOS
PBMC
PBSR
PCAM
PCAP
PCMR
PCNR
PDDR
PFCC
PGMR
PGUID
PLTC
PMAOS
PMCR
PMLP
PMMP
PMPD
PMPT
PMTU
PORT_STATE_BEHAVIOR
POWER_SETTINGS
PPAD
PPAOS
PPCC
PPCNT
PPHCR
PPLM
PPLR
PPRT
PPTB
PPTT
PREI
PTER
PTYS
PVLS
QCAM
QEEC
QETCR
QHLL
QPDP
QPDPM
QPRT
QPTS
QSHR
QSPCP
QSPIP
QTCT
ROCE_ACCL
Resource_dump_registers
SBCAM
SBCM
SBCTC
SBCTR
SBCTS
SBDCC
SBDCM
SBDCR
SBGCR
SBHBR
SBHBR_V2
SBHPC
SBHRR
SBHRR_V2
SBIB
SBME
SBMM
SBPM
SBPR
SBSNS
SBSNT
SBSNTE
SBSR
SET_NODE
SLRED
SLRG
SLTP
UNIT_PERF_COUNTERS_
VHCA_TRUST_LEVEL
ZTT
node-0:~/mft-4.22.1-11-x86_64-deb>

Can you please point me to resources for correctly configuring the mellanox crypto driver?

Hello,
Here is some more debugging information from my machine. The kernel modules are loaded correctly. I’m not sure why the --get and --set operations are not working correctly.

Hello @ckeshavabs,

Have you solved this problem?

Thank you in advance for your answer, thank you.

I have the exact same problem in 2024. How could this problem persist for so long?