[PATCH] net/virtio-user: fix eventfd sharing in secondary process

Samar Yadav samaryadav5 at gmail.com
Fri Jun 26 09:41:49 CEST 2026


Agreed Stephen, will switch to rte_calloc in patch v2:

- pp->kickfds = rte_malloc("virtio_user_proc_priv",
- total_queues * sizeof(int), 0);
- pp->callfds = rte_malloc("virtio_user_proc_priv",
- total_queues * sizeof(int), 0);
+ pp->kickfds = rte_calloc("virtio_user_proc_priv",
+ total_queues, sizeof(int), 0);
+ pp->callfds = rte_calloc("virtio_user_proc_priv",
+ total_queues, sizeof(int), 0);


On Wed, Jun 24, 2026 at 8:47 PM Stephen Hemminger <
stephen at networkplumber.org> wrote:

> On Wed, 24 Jun 2026 08:57:41 +0000
> Samar Yadav <samaryadav5 at gmail.com> wrote:
>
> > +     pp = rte_zmalloc("virtio_user_proc_priv", sizeof(*pp), 0);
> > +     if (pp == NULL)
> > +             return -ENOMEM;
> > +
> > +     pp->kickfds = rte_malloc("virtio_user_proc_priv",
> > +                              total_queues * sizeof(int), 0);
> > +     pp->callfds = rte_malloc("virtio_user_proc_priv",
> > +                              total_queues * sizeof(int), 0);
>
> Better to use rte_calloc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20260626/960ca410/attachment.htm>


More information about the dev mailing list