[PATCH] net/virtio-user: fix eventfd sharing in secondary process
samar yadav
samaryadav5 at gmail.com
Fri Jun 26 10:04:15 CEST 2026
On Wed, 24 Jun 2026 08:10:36 -0700
Stephen Hemminger <stephen at networkplumber.org> 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.
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);
Samar Yadav
More information about the dev
mailing list