DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

cancel
Showing results for 
Search instead for 
Did you mean: 

DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

Jump to solution
1,244 Views
IanHailey
Contributor II

Hi, I am trying to get DPDK crypto ciphering working with an LS1046A but find that the call to rte_vdev_init is failing returning "No such file or directory”. I am requesting the crypto_dpaa_sec driver when calling rte_vdev_init.

I am following the example code from Crypto Dev Guide and have verified this works ok with x86 platforms when using the crypto_aesni_mb0 driver.

I am passing the following args to rte_vdev_init:

--log-level=eal,8 -d librte_pmd_dpaa_sec.so -d librte_mempool_ring.so -d librte_bus_dpaa.so

The LS1046A kernel has been built with:

CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR_UIO=y

My application will perform ciphering independently from the network stack using:

rte_cryptodev_enqueue_burst
rte_cryptodev_dequeue_burst

Again this works fine with an x86 when using the crypto_aesni_mb0 driver.

Can anyone offer any advice as to how to get DPDK working with crypto_dpaa_sec on an LS1046A or why rte_vdev_init might be failing with the "No such file or directory” error?

When run with strace I notice just before the failure I see the following fstat call which may have nothing to do with the problem.

fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0

I am attaching the small program I used to test this and it's output.

Thanks.

Labels (1)
Tags (5)
0 Kudos
1 Solution
1,178 Views
yipingwang
NXP TechSupport
NXP TechSupport

If you needn't NIC, and want to test SEC module by build local packet, you can refer to DPDK exmample located in dpdk/app/test.

DPAA test suit "test_cryptodev_dpaa_sec" is registed in commands list.

For example test case "test_AES_cipheronly_dpaa_sec_all", it will finally call rte_cryptodev_enqueue_burst/rte_cryptodev_dequeue_burst to complete DPAA SEC enqueue/dequeue.

View solution in original post

4 Replies
1,184 Views
IanHailey
Contributor II

Thanks for the reply. If crypto_dpaa_sec is not a valid vdev then this indeed would explain why I have an issue. This raises another question however as my application will not send any packets via a NIC, in this case how do I access crypto_dpaa_sec? Examples l2fwd-crypto / ipsec-secgw both expect to packets via the NIC so I am not sure if they can be used as a basis for my own work. If I look at the DPAA DPDK - Poll Mode Driver Overview section it seems to always expect that a NIC is involved, does this mean that it is impossible to directly access DPAA SEC via rte_cryptodev_enqueue_burst / rte_cryptodev_dequeue_burst?

0 Kudos
1,179 Views
yipingwang
NXP TechSupport
NXP TechSupport

If you needn't NIC, and want to test SEC module by build local packet, you can refer to DPDK exmample located in dpdk/app/test.

DPAA test suit "test_cryptodev_dpaa_sec" is registed in commands list.

For example test case "test_AES_cipheronly_dpaa_sec_all", it will finally call rte_cryptodev_enqueue_burst/rte_cryptodev_dequeue_burst to complete DPAA SEC enqueue/dequeue.

1,127 Views
IanHailey
Contributor II

Thank you for your input, much appreciated.

0 Kudos
1,192 Views
yipingwang
NXP TechSupport
NXP TechSupport

LS1046 DPDK DPAA SEC driver "crypto_dpaa_sec" is registed on dpaa bus, not on vdev bus.

Actually, custoemr can refer to dpdk example "l2fwd-crypto" or "ipsec-secgw" on how to enable dpaa sec.

0 Kudos