* bug in cryptodev enqueue/dequeue callbacks?
@ 2024-11-14 14:41 Konstantin Ananyev
2024-11-15 14:02 ` Honnappa Nagarahalli
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Ananyev @ 2024-11-14 14:41 UTC (permalink / raw)
To: dev; +Cc: gakhil, abhinandan.gujjar, honnappa.nagarahalli
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.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug in cryptodev enqueue/dequeue callbacks?
2024-11-14 14:41 bug in cryptodev enqueue/dequeue callbacks? Konstantin Ananyev
@ 2024-11-15 14:02 ` Honnappa Nagarahalli
0 siblings, 0 replies; 2+ messages in thread
From: Honnappa Nagarahalli @ 2024-11-15 14:02 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: dev, gakhil, abhinandan.gujjar, nd
> On Nov 14, 2024, at 8:41 AM, Konstantin Ananyev <konstantin.ananyev@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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-15 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 14:41 bug in cryptodev enqueue/dequeue callbacks? Konstantin Ananyev
2024-11-15 14:02 ` Honnappa Nagarahalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).