[P4] dpdk crypto_openssl

Dániel Horpácsi daniel-h at elte.hu
Thu Mar 7 23:16:15 CET 2019


Sziasztok!

Próbálgattam a dpdk-s openssl példát és keresgéltem, miért kapjuk a 
"failed to parse device" hibát. A helyzet az, hogy a fejlesztők is 
tudnak a hibáról 
(http://mails.dpdk.org/archives/dev/2017-August/072248.html), de ha jól 
értem, nincs megállapodás arról, hogy hogyan kellene javítani. Egy 
workaround után mondjuk elindulni látszik:

$ sudo ./examples/l2fwd-crypto/build/l2fwd-crypto -l 0-1 -n 4 --vdev 
"crypto_openssl" -- -p 0x3 --chain CIPHER_HASH --cipher_op ENCRYPT 
--cipher_algo aes-cbc --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:ff --auth_op GENERATE 
--auth_algo sha1-hmac --auth_key 
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11

EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:00:19.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:155a net_e1000_em
CRYPTODEV: Creating cryptodev crypto_openssl
CRYPTODEV: Initialisation parameters - name: crypto_openssl,socket id: 
0, max queue pairs: 8
MAC updating enabled
No Ethernet ports - bye
EAL: Error - exiting with code: 1
   Cause: Failed to initial Ethernet ports

Lépések:
  - sudo apt install openssl libssl-dev
  - build config-ban hozzáadni: CONFIG_RTE_LIBRTE_PMD_OPENSSL=y
  - eal.c-ben rte_eal_cpu_init() és eal_plugins_init() hívások megcserélése
  - dpdk újrafordítás, example újrafordítás

Nyilván nem túl jó az eal.c-be belenyúlni, de egyelőre nem találtam más 
megoldást.

Üdv,
Dani



More information about the P4 mailing list