DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

跳至解决方案
3,066 次查看
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.

标签 (1)
标记 (5)
0 项奖励
1 解答
3,000 次查看
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.

在原帖中查看解决方案

5 回复数
3,006 次查看
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 项奖励
3,001 次查看
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.

2,949 次查看
IanHailey
Contributor II

Thank you for your input, much appreciated.

0 项奖励
3,014 次查看
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 项奖励
1,598 次查看
Brand
Contributor I

Is there any limiation for hugepage size on dpaa_sec part? I used 2M hugepage size, dequeue will crash

0 项奖励