Issue with dpdk-l2fwd-crypto Application SW on Ubuntu 20.04 PC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue with dpdk-l2fwd-crypto Application SW on Ubuntu 20.04 PC

Jump to solution
356 Views
sheikfaaruk
Contributor III

I am testing dpdk application in PC with PCI-E Dual-RJ45 gigabit NIC card to develop a network based application. I have started my project with dpdk 21.08 and Codewarrior IDE.

PC details :

uname -a
Linux mglocadmin-ThinkCentre-M73 5.15.0-105-generic #115~20.04.1-Ubuntu SMP Mon Apr 15 17:33:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

The following steps to install DPDK (Data Plane Development Kit) on Ubuntu 20.04:

sudo apt update
sudo apt install build-essential meson python3-pyelftools libnuma-dev pkgconf
wget https://fast.dpdk.org/rel/dpdk-21.08.tar.xz
tar -xf dpdk-21.08.tar.xz
meson build
ninja -C build
meson -Dexamples=all build
sudo ninja install
sudo ldconfig

Setup hugepage in PC:

mkdir -p /dev/hugepages
mountpoint -q /dev/hugepages || mount -t hugetlbfs nodev /dev/hugepages
echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages

Setup NIC card in PC:

sudo ifconfig enp2s0f1 down
sudo ifconfig enp2s0f0 down

cd /<Path>/dpdk-21.08/usertools/
sudo modprobe uio
sudo modprobe uio_pci_generic
sudo dpdk-devbind.py -b uio_pci_generic 02:00.0
sudo dpdk-devbind.py -b uio_pci_generic 02:00.1
dpdk-devbind.py -s

Log "dpdk-devbind.py -s":
Network devices using DPDK-compatible driver
0000:02:00.0 '82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications) 105e' drv=uio_pci_generic unused=e1000e,vfio-pci
0000:02:00.1 '82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications) 105e' drv=uio_pci_generic unused=e1000e,vfio-pci
Network devices using kernel driver
0000:03:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 8168' if=enp3s0 drv=r8169 unused=vfio-pci,uio_pci_generic *Active*

cd /<PATH>/dpdk-21.08/build/examples
sudo ./dpdk-l2fwd -c 0x3 -n 4 -- -p 0x3 -q 8 --no-mac-updating

Openssl and cryptodev details:
mglocadmin@mglocadmin$ sudo modprobe cryptodev
[sudo] password for mglocadmin:
mglocadmin@mglocadmin$ openssl version
OpenSSL 1.1.1f 31 Mar 2020
mglocadmin@mglocadmin$ ls /dev/crypto
/dev/crypto

NOTE : DPDK-L2fwd application is working

But ,I am unable to get dpdk-l2fwd-crypto to function properly on my Ubuntu 20.04 system. I've checked the dependencies, ensured that DPDK is properly configured, and attempted various troubleshooting steps, but to no avail.

 

ERROR log:
sudo ./dpdk-l2fwd-crypto -l 1 -n 2 --vdev "crypto_openssl0" --vdev "crypto_openssl1" -- -p 0x3 --chain CIPHER_ONLY --cdev_type SW --cipher_algo aes-cbc --cipher_op ENCRYPT --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f --cipher_iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f --no-mac-updating
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: failed to parse device "crypto_openssl0"
EAL: Unable to parse device 'crypto_openssl0'
EAL: Error - exiting with code: 1
Cause: Invalid EAL arguments

kindly help us to resolve this issue.

0 Kudos
1 Solution
242 Views
yipingwang
NXP TechSupport
NXP TechSupport

After configuring PKG_CONFIG_PATH, you need to recompiling DPDK with "meson arm64-build" command.

For details, please refer to section "Compiling DPDK using meson" in LSDK 21.08 user manual.

View solution in original post

0 Kudos
5 Replies
307 Views
yipingwang
NXP TechSupport
NXP TechSupport

Can you please check whether DPDK is being compiled with "openssl" library.

Below path is must to compile DPDK with openssl:

 

export PKG_CONFIG_PATH=<OpenSSL lib path>/lib/pkgconfig:$PKG_CONFIG_PATH

 

Please refer to the following line in flexbuild_lsdk2108_github/packages/apps/networking/dpdk.mk

export PKG_CONFIG_PATH=$(DESTDIR)/usr/local/lib/pkgconfig:$(PKG_CONFIG_PATH) && \

0 Kudos
300 Views
sheikfaaruk
Contributor III

Thank you for reply @yipingwang ...

But I was tried to build and run dpdk-l2fwd-crypto application in PC .so I am directly install DPDK not with flex-builder.

Is there any configuration in DPDK i need to change or modify for enable openssl ?

Tags (1)
0 Kudos
253 Views
yipingwang
NXP TechSupport
NXP TechSupport

As I mentioned previously, please execute the following before building DPDK.

export PKG_CONFIG_PATH=<OpenSSL lib path>/lib/pkgconfig:$PKG_CONFIG_PATH

0 Kudos
248 Views
sheikfaaruk
Contributor III

The step which i followed is below :
mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08$ export PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig:$PKG_CONFIG_PATH

mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08$ cd build/
mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build$ sudo ninja install

mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build$ cd examples/
mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build/examples$ sudo modprobe cryptodev
mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build/examples$ ls /dev/crypto
/dev/crypto
mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build/examples$ openssl engine
(rdrand) Intel RDRAND engine
(dynamic) Dynamic engine loading support

mglocadmin@mglocadmin-ThinkCentre-M73:~/NIC/dpdk-21.08/build/examples$ sudo ./dpdk-l2fwd-crypto -l 1 -n 2 --vdev "crypto_openssl0" --vdev "crypto_openssl1" -- -p 0x3 --chain CIPHER_ONLY --cdev_type SW --cipher_algo aes-cbc --cipher_op ENCRYPT --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f --cipher_iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f --no-mac-updating

EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: failed to parse device "crypto_openssl0"
EAL: Unable to parse device 'crypto_openssl0'
EAL: Error - exiting with code: 1
Cause: Invalid EAL arguments

Still same issue @yipingwang 

0 Kudos
243 Views
yipingwang
NXP TechSupport
NXP TechSupport

After configuring PKG_CONFIG_PATH, you need to recompiling DPDK with "meson arm64-build" command.

For details, please refer to section "Compiling DPDK using meson" in LSDK 21.08 user manual.

0 Kudos