bug in cryptodev enqueue/dequeue callbacks?

Honnappa Nagarahalli Honnappa.Nagarahalli at arm.com
Fri Nov 15 15:02:54 CET 2024



> On Nov 14, 2024, at 8:41 AM, Konstantin Ananyev <konstantin.ananyev at huawei.com> wrote:
> 
> Hi everyone,
> 
> Looking at implementation of cryptodev callbacks
> (it uses DPDK RCU), it seems like there is a bug here:
> 
> at init time we don't call rte_rcu_qsbr_thread_register().
> As I understand without it rte_rcu_qsbr_check() wouldn't
> work properly for that thread.
Yes, this understanding is correct. However, the responsibility of calling the rte_rcu_qsbr_thread_register lies with the application. The roles and responsibilities are documented at [1]

[1] https://doc.dpdk.org/guides/prog_guide/rcu_lib.html#resource-reclamation-framework-for-dpdk

> 
> Probably need to add:
> static int
> cryptodev_cb_init(struct rte_cryptodev *dev)
> {
> ....
> if (rte_rcu_qsbr_init(qsbr, max_threads)) {...}
> + rte_rcu_qsbr_thread_register(qsbr, 0); 
> 
> Unless I am missing something obvious here?
> Konstantin
> 



More information about the dev mailing list