Bug 934 - crypto_aesni_mb PMD found crash in access mb_mgr on primary process after secondary process launch scan/probe
Summary: crypto_aesni_mb PMD found crash in access mb_mgr on primary process after sec...
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: cryptodev (show other bugs)
Version: 20.11
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2022-02-07 01:35 CET by changchun zhang
Modified: 2022-02-07 01:41 CET (History)
1 user (show)



Attachments

Description changchun zhang 2022-02-07 01:35:57 CET
This is a bug for AESNI_MB PMD in DPDK 20.11. The issue may have been resolved in latest DPDK, but wondering if a patch can be applied for 20.11.

The AESNI_MB PMD in DPDK 20.11 does not work well in supporting multi-process.
The crash can be seen by this sequence:
1. The crypto_aesni_mb is started successfuly on primary process by rte_vdev_init. 
2. The secondary process launches the scanning/prob procedure and the primary process received the sync req and replied the secondary process. The crypto_aesni_mb is also started by the probe on receiving the reply of the vdev_scan.
3. On primary process, the packet process tries to create the crypto session and it crashes on accessing the mb_mgr of dev->data->dev_private, in aesni_mb_set_session_auth_parameters()

It is found in cryptodev_aesni_mb_create(), 
mb_mgr = alloc_init_mb_mgr(vector_mode);
can be triggered on both primary process and second process. Thus after the device is started on primary, the dev->data->dev_private->mb_mgr can be updated when second process started the device again. This is incorrect. 

The mb_mgr allocation should be limited to primary process. The same should be applied to the qp->mb_mgr when setup the queue pair.

Note You need to log in before you can comment on or make changes to this bug.