DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DPDK on LS1046A rte_vdev_init failing for crypto_dpaa_sec

ソリューションへジャンプ
3,072件の閲覧回数
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,006件の閲覧回数
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,012件の閲覧回数
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,007件の閲覧回数
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,955件の閲覧回数
IanHailey
Contributor II

Thank you for your input, much appreciated.

0 件の賞賛
3,020件の閲覧回数
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,604件の閲覧回数
Brand
Contributor I

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

0 件の賞賛